> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/integrations/catalog/novita-ai.md).

# Novita AI

Create chat completions and asynchronous image and video tasks with Novita AI.

### Connectors

Choose the connector that matches your authentication method. The options below use the names shown in StackAI.

| Connector | Authentication |
| --------- | -------------- |
| Novita AI | API Key        |

#### Novita AI

Connect to Novita AI for chat completions and asynchronous media generation.

**Set up in Novita AI**

1. Prepare the Novita AI account or service that the workflow will access. Grant access to the required resources and operations.
2. **API Key:** Create an API key in the Novita AI console.

**Set up in StackAI**

1. Open **Settings → Connections**, add a connection, and select **Novita AI**.
2. Enter the credentials and connection details in the fields below.
3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

**Connection fields**

| StackAI field | Required | What to enter                                                                                                   |
| ------------- | -------- | --------------------------------------------------------------------------------------------------------------- |
| API Key       | Yes      | Create an API key in the Novita AI console. [Provider instructions](https://novita.ai/settings/key-management). |

#### Verify the connection

Check that the connection is healthy. Then run a read operation against a resource the connected account can access. A successful connection check confirms authentication; it does not guarantee permission for every action.

If access is denied, check the credential or OAuth permissions, the selected account or environment, and access to the specific resource. Update expired credentials or reconnect after permissions change.

### Use an action

1. Add the required **Novita AI** action to the workflow.
2. Select a connection when the action requests one.
3. Complete the required fields. Use the reference picker when a value comes from another workflow step.
4. Run the workflow and inspect the action’s output. Check the result before using it in a later step.

### Actions

#### Create chat completion

Generate a response from a prompt with a hosted Novita AI chat model.

**Inputs**

| Field                 | Type            | Required | Description                                                                 |
| --------------------- | --------------- | -------- | --------------------------------------------------------------------------- |
| Model                 | select (string) | Yes      | The Novita AI chat model to use. Options load from the selected connection. |
| Prompt                | textarea        | Yes      | The request or question for the model.                                      |
| System instructions   | textarea        | No       | Optional instructions that shape how the model responds.                    |
| Maximum output tokens | integer         | No       | The maximum number of tokens Novita may generate. Default: 1024.            |
| Temperature           | number          | No       | Controls how varied the response can be. Default: 1.0.                      |

**Outputs**

| Field             | Type    | Description                                       |
| ----------------- | ------- | ------------------------------------------------- |
| Completion ID     | string  | Novita's identifier for the completion.           |
| Model             | string  | The model that produced the response.             |
| Response          | string  | The generated text response.                      |
| Reasoning         | string  | Reasoning text returned by models that expose it. |
| Finish reason     | string  | Why generation stopped.                           |
| Prompt tokens     | integer | Tokens used by the input.                         |
| Completion tokens | integer | Tokens used by the generated response.            |
| Total tokens      | integer | Total tokens used by the request.                 |

#### Generate image from text

Submit a Qwen image-generation task from a text prompt.

**Inputs**

| Field      | Type     | Required | Description                                                 |
| ---------- | -------- | -------- | ----------------------------------------------------------- |
| Prompt     | textarea | Yes      | A description of the image to generate.                     |
| Image size | string   | No       | The output width and height in pixels. Default: 1024\*1024. |

**Outputs**

| Field   | Type   | Description                             |
| ------- | ------ | --------------------------------------- |
| Task ID | string | The task to check for generated images. |

#### Generate Video from Text

Submit a Wan 2.7 video-generation task from a text prompt.

**Inputs**

| Field                | Type            | Required | Description                                                                                                                                                                                                         |
| -------------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Prompt               | textarea        | Yes      | A description of the video to generate.                                                                                                                                                                             |
| Show advanced fields | boolean         | No       | Show video size, duration, and optional generation controls. Default: false.                                                                                                                                        |
| Video size           | select (string) | No       | The output width and height in pixels. Available values: 1280 by 720, 720 by 1280, 960 by 960, 1088 by 832, 832 by 1088, 1920 by 1080, 1080 by 1920, 1440 by 1440, 1632 by 1248, 1248 by 1632. Default: 1920\*1080. |
| Duration in seconds  | integer         | No       | How long the generated video should be. Default: 5.                                                                                                                                                                 |
| Negative prompt      | textarea        | No       | Details to avoid in the generated video.                                                                                                                                                                            |
| Seed                 | integer         | No       | A seed for reproducible generation.                                                                                                                                                                                 |
| Audio URL            | string          | No       | Optional audio to use in the video.                                                                                                                                                                                 |
| Add watermark        | boolean         | No       | Whether Novita should add a watermark. Default: false.                                                                                                                                                              |
| Expand prompt        | boolean         | No       | Whether Novita should enrich the prompt before generation. Default: true.                                                                                                                                           |

**Outputs**

| Field   | Type   | Description                             |
| ------- | ------ | --------------------------------------- |
| Task ID | string | The task to check for generated videos. |

#### Upscale image

Submit an image-upscaling task for a public image URL.

**Inputs**

| Field         | Type            | Required | Description                                                                         |
| ------------- | --------------- | -------- | ----------------------------------------------------------------------------------- |
| Image URL     | string          | Yes      | The public image to upscale.                                                        |
| Resolution    | select (string) | No       | The target image resolution. Available values: 2K, 4K, 8K. Default: 4k.             |
| Output format | select (string) | No       | The format of the upscaled image. Available values: JPEG, PNG, WebP. Default: jpeg. |

**Outputs**

| Field   | Type   | Description                               |
| ------- | ------ | ----------------------------------------- |
| Task ID | string | The task to check for the upscaled image. |

#### Get async task result

Check the status and outputs of one Novita AI media task.

**Inputs**

| Field   | Type   | Required | Description                     |
| ------- | ------ | -------- | ------------------------------- |
| Task ID | string | Yes      | The Novita media task to check. |

**Outputs**

| Field             | Type          | Description                                                            |
| ----------------- | ------------- | ---------------------------------------------------------------------- |
| Task ID           | string        | The task returned by Novita.                                           |
| Task type         | string        | The type of media task.                                                |
| Status            | string        | The current task state.                                                |
| Reason            | string        | Novita's explanation for the current result.                           |
| Estimated seconds | number        | Estimated seconds remaining.                                           |
| Progress percent  | number        | The reported task progress.                                            |
| Images            | object\_array | Generated image results with URL, expiry, and format.                  |
| Videos            | object\_array | Generated video results with URL, expiry, and format.                  |
| Audio             | object\_array | Generated audio results with URL, expiry, format, and timing metadata. |

### Important behavior

Actions that create, update, send, or delete data can change the connected service. Review their inputs before running them. A retry can repeat an operation; consider this when configuring retries for actions that change data.

The catalog lists the fields and capabilities available in the supplied provider definition. Availability can also depend on your deployment and organization’s Feature Access settings.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/integrations/catalog/novita-ai.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
