# API Reference Overview Source: https://novita.ai/docs/api-reference/api-reference-overview ## Welcome to Novita AI API Reference This documentation provides comprehensive reference for all Novita AI APIs. Our APIs are organized into several categories: ## Base URLs All API requests should be made to: ``` https://api.novita.ai ``` **OpenAI-Compatible Endpoints:** ``` https://api.novita.ai/openai ``` ## API Groups ### Basic APIs Fundamental APIs for authentication, billing, and account management. | Endpoint | Description | File Path | | --------------------------------------------------------------------------- | ----------------------------- | --------------------------------------------------- | | [Authentication](/api-reference/basic-authentication) | API key authentication | `api-reference/basic-authentication.mdx` | | [Error Codes](/api-reference/basic-error-code) | Unified error response format | `api-reference/basic-error-code.mdx` | | [Get User Balance](/api-reference/basic-get-user-balance) | Query account balance | `api-reference/basic-get-user-balance.mdx` | | [Query Monthly Bill](/api-reference/basic-query-monthly-bill) | Query monthly billing | `api-reference/basic-query-monthly-bill.mdx` | | [Query Usage-Based Billing](/api-reference/basic-query-usage-based-billing) | Query usage-based billing | `api-reference/basic-query-usage-based-billing.mdx` | | [Query Fixed-Term Billing](/api-reference/basic-query-fixed-term-billing) | Query fixed-term billing | `api-reference/basic-query-fixed-term-billing.mdx` | ### Model APIs #### LLM APIs Large Language Model APIs with OpenAI compatibility. | Endpoint | Description | File Path | | ------------------------------------------------------------------------------ | ------------------------ | --------------------------------------------------------- | | [Create Chat Completion](/api-reference/model-apis-llm-create-chat-completion) | Create a chat completion | `api-reference/model-apis-llm-create-chat-completion.mdx` | | [Create Completion](/api-reference/model-apis-llm-create-completion) | Create a completion | `api-reference/model-apis-llm-create-completion.mdx` | | [Create Embeddings](/api-reference/model-apis-llm-create-embeddings) | Create embeddings | `api-reference/model-apis-llm-create-embeddings.mdx` | | [Create Rerank](/api-reference/model-apis-llm-create-rerank) | Rerank search results | `api-reference/model-apis-llm-create-rerank.mdx` | | [List Models](/api-reference/model-apis-llm-list-models) | List available models | `api-reference/model-apis-llm-list-models.mdx` | | [Retrieve Model](/api-reference/model-apis-llm-retrieve-model) | Get model details | `api-reference/model-apis-llm-retrieve-model.mdx` | **Batch Operations:** | Endpoint | Description | File Path | | -------------------------------------------------------------------------------- | --------------------- | ---------------------------------------------------------- | | [Create Batch](/api-reference/model-apis-llm-create-batch) | Create a batch job | `api-reference/model-apis-llm-create-batch.mdx` | | [Retrieve Batch](/api-reference/model-apis-llm-retrieve-batch) | Get batch job status | `api-reference/model-apis-llm-retrieve-batch.mdx` | | [Cancel Batch](/api-reference/model-apis-llm-cancel-batch) | Cancel a batch job | `api-reference/model-apis-llm-cancel-batch.mdx` | | [List Batches](/api-reference/model-apis-llm-list-batches) | List all batch jobs | `api-reference/model-apis-llm-list-batches.mdx` | | [Upload Batch Input File](/api-reference/model-apis-llm-upload-batch-input-file) | Upload file for batch | `api-reference/model-apis-llm-upload-batch-input-file.mdx` | | [List Files](/api-reference/model-apis-llm-list-files) | List uploaded files | `api-reference/model-apis-llm-list-files.mdx` | | [Query File](/api-reference/model-apis-llm-query-file) | Get file metadata | `api-reference/model-apis-llm-query-file.mdx` | | [Delete File](/api-reference/model-apis-llm-delete-file) | Delete a file | `api-reference/model-apis-llm-delete-file.mdx` | | [Retrieve File Content](/api-reference/model-apis-llm-retrieve-file-content) | Get file content | `api-reference/model-apis-llm-retrieve-file-content.mdx` | #### Image, Audio and Video APIs Multimodal AI APIs for content generation and editing. **Core Endpoints:** | Endpoint | Description | File Path | | ---------------------------------------------------- | ---------------------- | ------------------------------------------ | | [Webhook](/api-reference/model-apis-webhook) | Webhook configuration | `api-reference/model-apis-webhook.mdx` | | [Get Model](/api-reference/model-apis-get-model) | Query available models | `api-reference/model-apis-get-model.mdx` | | [Task Result](/api-reference/model-apis-task-result) | Get async task results | `api-reference/model-apis-task-result.mdx` | **Image Generation:** | Endpoint | Description | File Path | | ---------------------------------------------------------- | ------------------------- | ------------------------------------------------- | | [Text to Image](/api-reference/model-apis-txt2img) | Generate images from text | `api-reference/model-apis-txt2img.mdx` | | [Image to Image](/api-reference/model-apis-img2img) | Transform existing images | `api-reference/model-apis-img2img.mdx` | | [Reimagine](/api-reference/model-apis-reimagine) | Reimagine compositions | `api-reference/model-apis-reimagine.mdx` | | [FLUX.1 Schnell](/api-reference/model-apis-flux-1-schnell) | Fast image generation | `api-reference/model-apis-flux-1-schnell.mdx` | | [Seedream 3.0](/api-reference/model-apis-seedream-3-0-t2i) | High-quality generation | `api-reference/model-apis-seedream-3-0-t2i.mdx` | | [Seedream 4.0](/api-reference/model-apis-seedream-4-0) | Advanced generation | `api-reference/model-apis-seedream-4-0.mdx` | | [Qwen Image](/api-reference/model-apis-qwen-image-txt2img) | Qwen image generation | `api-reference/model-apis-qwen-image-txt2img.mdx` | **Image Editing:** | Endpoint | Description | File Path | | ------------------------------------------------------------------ | ---------------------- | ------------------------------------------------- | | [Upscale](/api-reference/model-apis-upscale) | Image upscaling | `api-reference/model-apis-upscale.mdx` | | [Remove Background](/api-reference/model-apis-remove-background) | Background removal | `api-reference/model-apis-remove-background.mdx` | | [Replace Background](/api-reference/model-apis-replace-background) | Background replacement | `api-reference/model-apis-replace-background.mdx` | | [Inpainting](/api-reference/model-apis-inpainting) | Image inpainting | `api-reference/model-apis-inpainting.mdx` | | [Image to Prompt](/api-reference/model-apis-image-to-prompt) | Reverse engineering | `api-reference/model-apis-image-to-prompt.mdx` | **Video Generation:** | Endpoint | Description | File Path | | -------------------------------------------------------------------- | ------------------------- | ---------------------------------------------------- | | [Text to Video](/api-reference/model-apis-txt2video) | Generate videos from text | `api-reference/model-apis-txt2video.mdx` | | [Image to Video](/api-reference/model-apis-img2video) | Animate images | `api-reference/model-apis-img2video.mdx` | | [Hunyuan Video Fast](/api-reference/model-apis-hunyuan-video-fast) | Fast video generation | `api-reference/model-apis-hunyuan-video-fast.mdx` | | [Wan 2.5 T2V Preview](/api-reference/model-apis-wan-2.5-t2v-preview) | Wan 2.5 preview | `api-reference/model-apis-wan-2.5-t2v-preview.mdx` | | [Kling V2.1 Master](/api-reference/model-apis-kling-v2.1-t2v-master) | Kling V2.1 master | `api-reference/model-apis-kling-v2.1-t2v-master.mdx` | | [Minimax Hailuo 02](/api-reference/model-apis-minimax-hailuo-02) | Minimax Hailuo | `api-reference/model-apis-minimax-hailuo-02.mdx` | | [Vidu Q1](/api-reference/model-apis-vidu-q1-text2video) | Vidu Q1 generation | `api-reference/model-apis-vidu-q1-text2video.mdx` | **Audio:** | Endpoint | Description | File Path | | --------------------------------------------------------------------- | ---------------------- | ---------------------------------------------------- | | [Minimax Speech 02](/api-reference/model-apis-minimax-speech-02-hd) | Minimax TTS HD | `api-reference/model-apis-minimax-speech-02-hd.mdx` | | [Minimax Speech 2.8](/api-reference/model-apis-minimax-speech-2.8-hd) | Minimax 2.8 HD | `api-reference/model-apis-minimax-speech-2.8-hd.mdx` | | [GLM TTS](/api-reference/model-apis-glm-tts) | GLM text-to-speech | `api-reference/model-apis-glm-tts.mdx` | | [GLM ASR](/api-reference/model-apis-glm-asr) | GLM speech recognition | `api-reference/model-apis-glm-asr.mdx` | ### GPU APIs GPU instance management and serverless GPU endpoints. #### GPU Instance | Endpoint | Description | File Path | | -------------------------------------------------------------- | -------------------- | ------------------------------------------------ | | [Create Instance](/api-reference/gpu-instance-create-instance) | Create GPU instance | `api-reference/gpu-instance-create-instance.mdx` | | [List Instances](/api-reference/gpu-instance-list-instances) | List all instances | `api-reference/gpu-instance-list-instances.mdx` | | [Get Instance](/api-reference/gpu-instance-get-instance) | Get instance details | `api-reference/gpu-instance-get-instance.mdx` | | [Start Instance](/api-reference/gpu-instance-start-instance) | Start instance | `api-reference/gpu-instance-start-instance.mdx` | | [Stop Instance](/api-reference/gpu-instance-stop-instance) | Stop instance | `api-reference/gpu-instance-stop-instance.mdx` | | [Delete Instance](/api-reference/gpu-instance-delete-instance) | Delete instance | `api-reference/gpu-instance-delete-instance.mdx` | **Template Management:** | Endpoint | Description | File Path | | -------------------------------------------------------------- | -------------------- | ------------------------------------------------ | | [Create Template](/api-reference/gpu-instance-create-template) | Create template | `api-reference/gpu-instance-create-template.mdx` | | [List Templates](/api-reference/gpu-instance-list-templates) | List templates | `api-reference/gpu-instance-list-templates.mdx` | | [Get Template](/api-reference/gpu-instance-get-template) | Get template details | `api-reference/gpu-instance-get-template.mdx` | **Product & Pricing:** | Endpoint | Description | File Path | | ---------------------------------------------------------- | ----------------- | ---------------------------------------------- | | [List Products](/api-reference/gpu-instance-list-products) | List GPU products | `api-reference/gpu-instance-list-products.mdx` | #### Serverless GPUs | Endpoint | Description | File Path | | ------------------------------------------------------------ | -------------------- | ---------------------------------------------- | | [Create Endpoint](/api-reference/serverless-create-endpoint) | Create endpoint | `api-reference/serverless-create-endpoint.mdx` | | [List Endpoint](/api-reference/serverless-list-endpoint) | List endpoints | `api-reference/serverless-list-endpoint.mdx` | | [Get Endpoint](/api-reference/serverless-get-endpoint) | Get endpoint details | `api-reference/serverless-get-endpoint.mdx` | | [Update Endpoint](/api-reference/serverless-update-endpoint) | Update endpoint | `api-reference/serverless-update-endpoint.mdx` | | [Delete Endpoint](/api-reference/serverless-delete-endpoint) | Delete endpoint | `api-reference/serverless-delete-endpoint.mdx` | ## Quick Start ### 1. Get Your API Key Visit the [settings page](https://novita.ai/settings/key-management) to create and manage your API keys. ### 2. Make Your First Request ```bash theme={"system"} curl --location 'https://api.novita.ai/v1/models' \ --header 'Authorization: Bearer {{API Key}}' ``` ### 3. Explore SDKs We provide official SDKs for popular languages: * [Python SDK](/guides/model-apis-sdks#python) * [JavaScript/TypeScript SDK](/guides/model-apis-sdks#javascripttypescript) ## Authentication All API requests require authentication using Bearer tokens. Include your API key in the Authorization header: ``` Authorization: Bearer {{API Key}} ``` See [Authentication](/api-reference/basic-authentication) for details. ## Error Handling Novita AI uses standard HTTP status codes and returns errors in a unified format. See [Error Codes](/api-reference/basic-error-code) for complete error reference. ## Common Use Cases | User Query | Go To | | ---------------------------- | ----------------------------------------------------------------------------------- | | "How to get started?" | [Quick Start](#quick-start) + [Authentication](/api-reference/basic-authentication) | | "API not working, error 401" | [Error Codes](/api-reference/basic-error-code) | | "Generate images from text" | [Text to Image](/api-reference/model-apis-txt2img) | | "Create chatbot with LLM" | [Chat Completion](/api-reference/model-apis-llm-create-chat-completion) | | "Generate videos" | [Text to Video](/api-reference/model-apis-txt2video) | | "Deploy GPU instance" | [Create Instance](/api-reference/gpu-instance-create-instance) | | "Check my balance" | [Get User Balance](/api-reference/basic-get-user-balance) | | "OpenAI compatible API" | [LLM API Guide](/guides/llm-api) | ## Need Help? * [Discord Community](https://discord.gg/YyPFAzwp7P) * [Email Support](mailto:support@novita.ai) * [Console](https://novita.ai/console) # Authentication Source: https://novita.ai/docs/api-reference/basic-authentication The `Novita AI` API uses API keys in the `request headers` to authenticate requests. You can view and manage your API keys in [settings page](https://novita.ai/settings/key-management?utm_source=getstarted). ```js theme={"system"} { "Authorization": "Bearer {{API Key}}" } ``` # API Error Codes Source: https://novita.ai/docs/api-reference/basic-error-code ## Image / Video / Audio
| Error Name | Status Code | Description |
|---|---|---|
| INVALID\_REQUEST\_BODY | 400 | Request parameter validation failed |
| IMAGE\_FILE\_EXCEEDS\_MAX\_SIZE | 400 | Image size exceeds limit |
| INVALID\_IMAGE\_FORMAT | 400 | Image format does not meet requirements |
| IMAGE\_EXCEEDS\_MAX\_RESOLUTION | 400 | Image resolution exceeds limit |
| INVALID\_IMAGE\_SIZE | 400 | Image width or height exceeds limit |
| API\_NOT\_FOUND | 404 | API not found |
| IMAGE\_NO\_FACE\_DETECTED | 400 | No face detected |
| INVALID\_CUSTOM\_OUTPUT\_PATH | 400 | Invalid OSS path |
| ILLEGAL\_PROMPT | 400 | Prompt contains inappropriate content |
| ILLEGAL\_IMAGE\_CONTENT | 400 | Image contains inappropriate content |
| INVALID\_AUDIO\_FILE | 400 | Invalid audio input |
| BILLING\_FAILED | 500 | Billing service error |
| BILLING\_AUTH\_FAILED | 403 | Billing service authentication failed |
| BILLING\_BALANCE\_NOT\_ENOUGH | 400 | Insufficient balance |
| MISSING\_API\_KEY | 400 | API Key not provided |
| INVALID\_API\_KEY | 403 | API Key validation failed |
| FEATURE\_NOT\_ALLOWED | 403 | No permission to upload model |
| API\_NOT\_ALLOWED | 403 | No permission to use this API |
| RATE\_LIMIT\_EXCEEDED | 429 | Rate limit exceeded |
| NEED\_REAL\_NAME\_VERIFY | 403 | Enterprise verification not completed |
| CREATE\_TASK\_FAILED | 500 | Failed to create task |
| TASK\_NOT\_FOUND | 404 | Task not found |
| GET\_RESULT\_FAILED | 500 | Failed to get task result |
| TASK\_FAILED | 500 | Task execution failed |
| Error Name | Status Code | Description |
|---|---|---|
| INVALID\_API\_KEY | 403 | API Key not provided |
| MODEL\_NOT\_FOUND | 404 | Model not found |
| FAILED\_TO\_AUTH | 401 | Authentication failed |
| NOT\_ENOUGH\_BALANCE | 403 | Insufficient balance |
| INVALID\_REQUEST\_BODY | 400 | Request body format error, see message for details |
| RATE\_LIMIT\_EXCEEDED | 429 | Too many requests, please try again later |
| TOKEN\_LIMIT\_EXCEEDED | 429 | Token limit exceeded, please try again later |
| SERVICE\_NOT\_AVAILABLE | 503 | Service unavailable |
| ACCESS\_DENY | 403 | Access denied |
| Error Name | Status Code | Description |
|---|---|---|
| UNKNOWN | 500 | Unknown error |
| GET\_TOKEN\_FAILED | 400 | Failed to obtain token |
| FORBIDDEN | 403 | Access forbidden / No permission |
| UNAUTHORIZED | 401 | Unauthorized |
| USER\_ALREADY\_EXISTS | 400 | User already exists |
| INVALID\_USER\_OR\_PASSWORD | 400 | Invalid username or password |
| INVALID\_CODE | 400 | Invalid verification code |
| USER\_NOT\_FOUND | 400 | User not found |
| USER\_PHONE\_NOT\_CONSIST | 400 | User phone number mismatch |
| SEND\_CODE\_TOO\_FAST | 429 | Verification code sent too frequently |
| INVALID\_PUBLIC\_KEY | 400 | Invalid public key |
| USER\_NOT\_ACTIVATED | 400 | User not activated |
| USER\_ALREADY\_ACTIVATED | 400 | User already activated |
| INVALID\_USER\_TOKEN | 400 | Invalid user token |
| BANNED\_USER | 400 | Account has been banned |
| RATE\_LIMIT\_EXCEEDED | 429 | Request rate limit exceeded |
| RESOURCE\_NOT\_FOUND | 400 | Resource not found (e.g., container not found) |
| CONFLICT | 400 | Conflict (e.g., container conflict) |
| VALIDATOR\_PARAM | 400 | Parameter validation failed / Invalid parameter |
| REQUEST | 400 | Request error |
| OPERATION\_LIMIT | 400 | Operation limit reached |
| INSUFFICIENT\_RESOURCE | 400 | Insufficient resources |
| CLUSTER\_STATUS | 400 | Cluster status abnormal |
| NODE\_STATUS | 400 | Node status abnormal |
| DEPENDENT\_RESOURCE\_STATE | 400 | Dependent resource state abnormal |
| PREPAID\_INSTANCE\_NOT\_SUPPORT\_RELEASE | 400 | Prepaid instance does not support release |
| CREATING\_INSTANCE\_NOT\_SUPPORT\_RENEWAL | 400 | Instance in creation does not support renewal |
| INSTANCE\_LOCAL\_STORAGE\_NOT\_FOUND | 400 | Instance local storage not found |
| INVALID\_COMMAND\_PARAM | 400 | Invalid instance startup command parameter |
| GPU\_SPEC\_USED | 400 | GPU specification already in use |
| INCORRECT\_USER\_SYNCER\_REQUIRE\_PARAMS | 400 | Incorrect user syncer request parameters |
| MIGRATE\_INSUFFICIENT\_RESOURCE | 400 | Insufficient resources for migration |
| WALLET\_NOT\_FOUND | 500 | Wallet not found |
| WALLET\_UNSUPPORT\_RECHARGE\_METHOD | 400 | Unsupported wallet recharge method |
| BALANCE\_NOT\_ENOUGH | 400 | Insufficient balance |
| UNSUPPORTED\_BILLING\_MODE | 400 | Unsupported billing mode |
| EXPIRED\_OR\_BALANCE\_NOT\_ENOUGH | 400 | Expired or insufficient balance |
| ORDER\_NOT\_FOUND | 400 | Order not found |
| SAVING\_PLAN\_ALREADY\_EXISTS | 400 | Saving plan already exists |
| CREATE\_INSTANCE\_LIMIT | 400 | Instance creation limit reached, please recharge or delete other instances |
| NETWORK\_STORAGE\_TOO\_LARGE | 400 | Network storage size exceeds limit |
| CUR\_CLUSTER\_NETWORK\_STORAGE\_NOT\_SUPPORT | 400 | Network storage not supported in current region |
| NETWORK\_STORAGE\_IN\_USE | 400 | Network storage is in use |
| NETWORK\_STORAGE\_UNAVAILABLE | 400 | Network storage unavailable |
| NETWORK\_STORAGE\_NOT\_FOUND | 400 | Network storage not found |
| IMAGE\_NOT\_FOUND | 400 | Image not found |
| IMAGE\_AUTH\_IN\_USE | 400 | Image authentication in use |
| NETWORK\_NOT\_FOUND | 400 | Instance network not found |
| NETWORK\_IN\_USE | 400 | Instance network in use |
| NETWORK\_MAX\_LIMIT | 400 | Instance network creation limit exceeded |
| SEND\_MSG\_ERROR | 400 | Message sending error |
| JOB\_NOT\_FOUND | 400 | Instance job not found |
| SERVERLESS\_ENDPOINT\_NOT\_FOUND | 400 | Serverless endpoint not found |
| SERVERLESS\_WORKER\_NOT\_FOUND | 400 | Serverless worker not found |
| SERVERLESS\_PRODUCT\_NOT\_FOUND | 400 | Serverless product not found |
| SERVERLESS\_APP\_NAME\_IS\_EXIST | 400 | Serverless application name already exists |
| TEMPLATE\_IS\_PRIVATE | 400 | Template is private |
| TEMPLATE\_NOT\_FOUND | 400 | Template not found |
| Error Name | Status Code | Description |
|---|---|---|
| UNKNOWN | 500 | Unknown error, please contact us |
| LIST\_BILL\_TOO\_FAST | 429 | Requests are too frequent, please try again later |
| INVALID\_PRODUCT\_CATEGORY | 400 | Invalid productCategory parameter |
| INVALID\_BILL\_CYCLE | 400 | Invalid cycle parameter |
| LIST\_BILL\_ERROR | 500 | Query error, please contact us |
Option 1:
You can use the string type to represent the text contents of the message.
Option 2:
Use an array of content parts, object\[]. Detailed fields are as follows:
Only vision language models can be used.
An array of content parts, object\[]. Detailed fields are as follows:
Only models that support video can be used.
An array of content parts, object\[]. Detailed fields are as follows:
Only models that support audio can be used.
Output modality parameters:
An array of content parts, object\[]. Detailed fields are as follows:
text) and preview model (model) are provided in the request body, this parameter returns the preview audio as a URL.
voice\_id.
| Status | Description |
|---|---|
| VALIDATING | The input file is being validated before the batch can begin |
| PROGRESS | Batch is in progress |
| COMPLETED | Batch processing completed successfully |
| FAILED | Batch processing failed |
| EXPIRED | Batch exceeded deadline |
| CANCELLING | Batch is being cancelled |
| CANCELLED | Batch was cancelled |
| Error Code | Description | Solution |
|---|---|---|
| 400 | Invalid request format | Check JSONL syntax and required fields |
| 401 | Authentication failed | Verify API key |
| 404 | Batch not found | Check batch ID |
| 429 | Rate limit exceeded | Reduce request frequency |
| 500 | Server error | Contact us |
| Tier | How to reach |
|---|---|
| T1 | Monthly top-ups did not exceed \$50 in any of the last 3 calendar months. |
| T2 | Monthly top-ups were at least \$50 but did not exceed \$500 in any of the last 3 calendar months. |
| T3 | Monthly top-ups were at least \$500 but did not exceed \$3,000 in any of the last 3 calendar months. |
| T4 | Monthly top-ups were at least \$3,000 but did not exceed \$10,000 in any of the last 3 calendar months. |
| T5 | Monthly top-ups were at least \$10,000 in at least one of the last 3 calendar months. |
| V2 | V3 | Description |
|---|---|---|
| **extra**object | **extra**object | |
| enable\_nsfw\_detection boolean |
enable\_nsfw\_detection boolean |
|
| nsfw\_detection\_level Enum: `0, 1, 2` |
nsfw\_detection\_level Enum: `0, 1, 2` |
|
| enable\_progress\_info | Deprecated | |
| response\_image\_type Enum: `png`, `jpeg` |
response\_image\_type Enum: `png, webp, jpeg` |
V3 adds support for `webp`image format |
| **request**object | New Field All image generation parameters must be passed via the `request`in V3 |
|
| **prompt**string \ |
promptstring | Moved Inside |
| lorasobject\[] | Moved Inside **Migrate LoRA usage: From **`prompt`** to **`request.loras`** parameter** |
|
| model\_namestring | New Field Name of lora, retrieve the corresponding sd\_name\_in\_api value by invoking the [Get Model API](https://novita.ai/docs/api-reference/model-apis-get-model) endpoint with filter.types=lora as the query parameter. |
|
| strengthnumber(float32) | New Field The strength value of lora. The larger the value, the more biased the effect is towards lora, Range \[0, 1] |
|
| **negative\_prompt**string | negative\_promptstring | Moved Inside |
| **sampler\_name**string | sampler\_namestring | Moved Inside |
| **batch\_size**integer | image\_numinteger | Changed `num_images` **→** `request.image_num` |
| **n\_iter** | Deprecated | |
| **steps**string | stepsstring | Moved Inside |
| **cfg\_scale**integer | guidance\_scale number(float32) |
Changed `cfg_scale`**→** `request.guidance_scale` |
| **seed**integer | seedinteger | Moved Inside |
| **height**integer | heightinteger | Moved Inside Range Change: \[128, 2048]. |
| **width**integer | widthinteger | Moved Inside Range Change: \[128, 2048]. |
| **model\_name**string | model\_namestring | Moved Inside This parameter specifies the name of the model checkpoint. Retrieve the corresponding sd\_name value by invoking the [Query Model](https://novita.ai/docs/api-reference/model-apis-get-model) API with filter.types=checkpoint as the query parameter. |
| **restore\_faces**bool | restore\_facesbool | Moved Inside |
| **restore\_faces\_model** | Deprecated | |
| **sd\_vae**string | sd\_vaestring | Moved Inside |
| **clip\_skip**integer | clip\_skipinteger | Moved Inside |
| **enable\_hr**boolean | hires\_fixobject | Changed `enable_hr`**→** `request.hires_fix` |
| **hr\_upscaler** Enum: `Latent`, `ESRGAN_4x`, `R-ESRGAN 4x+`, `R-ESRGAN 4x+ Anime6B` |
upscaler Enum: `RealESRGAN_x4plus_anime_6B`, `RealESRNet_x4plus,Latent` |
Changed `hr_upscaler`**→**`request.hires_fix.upscaler` |
| **hr\_scale**number | Deprecated | |
| **hr\_resize\_x**integer | target\_widthinteger | Changed `hr_resize_x`**→** `request.hires_fix.target_width` |
| **hr\_resize\_y**integer | target\_heightinteger | Changed `hr_resize_y`**→** `request.hires_fix.target_height` |
| **img\_expire\_ttl**integer | Deprecated Default 3600s |
|
| **sd\_refiner**object | refinerobject | Changed `sd_refiner`**→** `request.refiner` |
| checkpointstring | Deprecated | |
| switch\_at number(float32) |
switch\_at number(float32) |
Changed `sd_refiner.switch_at`**→** `request.refiner.switch_at` |
| **controlnet\_units**object\[] | Deprecated `img2img` Only |
| V2 | V3 | Description |
|---|---|---|
| **code** | Deprecated | |
| **msg** | Deprecated | |
| **data** | Deprecated | |
| task\_id | **task\_id** | Changed `data.task_id`**→** `task_id` |
| warn | Deprecated |
| V2 | V3 | Description |
|---|---|---|
| **extra**object | **extra**object | |
| enable\_nsfw\_detection boolean |
enable\_nsfw\_detection boolean |
|
| nsfw\_detection\_level Enum: `0, 1, 2` |
nsfw\_detection\_level Enum: `0, 1, 2` |
|
| enable\_progress\_info | Deprecated | |
| response\_image\_type Enum: `png`, `jpeg` |
response\_image\_type Enum: `png, webp, jpeg` |
V3 adds support for `webp`image format |
| **request**object | New field All image generation parameters must be passed via the `request`in V3 |
|
| **prompt**string \ |
promptstring | Moved Inside |
| lorasobject\[] | Moved Inside **Migrate LoRA usage: From **`prompt`** to **`request.loras`** parameter** |
|
| model\_namestring | New Field Name of lora, retrieve the corresponding sd\_name\_in\_api value by invoking the [Get Model API](https://novita.ai/docs/api-reference/model-apis-get-model) endpoint with filter.types=lora as the query parameter. |
|
| strength number(float32) |
New Field The strength value of lora. The larger the value, the more biased the effect is towards lora, Range \[0, 1] |
|
| **negative\_prompt**string | negative\_prompt string |
Moved Inside |
| **sampler\_name**string | sampler\_namestring | Moved Inside |
| **batch\_size**integer | image\_numinteger | Changed `batch_size`**→** `request.image_num` |
| **n\_iter**integer | Deprecated | |
| **steps**string | stepsstring | Moved Inside |
| **cfg\_scale**integer | guidance\_scale number(float32) |
Changed `cfg_scale`**→** `request.guidance_scale` |
| **seed**integer | seedinteger | Moved Inside |
| **height**integer | heightinteger | Moved Inside Range Change: \[128, 2048]. |
| **width**integer | widthinteger | Moved Inside Range Change: \[128, 2048]. |
| **model\_name**string | model\_namestring | Moved Inside This parameter specifies the name of the model checkpoint. Retrieve the corresponding sd\_name value by invoking the [Query Model](https://novita.ai/docs/api-reference/model-apis-get-model) API with filter.types=checkpoint as the query parameter. |
| **init\_images**string\[] | image\_base64string | Changed `init_images`**→** `request.image_base64` |
| **denoising\_strength** number(float) |
strength number(float) |
Changed `denoising_strength`**→** `request.strength` |
| **restore\_faces**bool | Deprecated | |
| **sd\_vae**string | sd\_vaestring | Moved Inside |
| **clip\_skip**integer | clip\_skipinteger | Moved Inside |
| **mask**string | Deprecated Recommendation: Use V3 Inpainting API |
|
| **mask\_blur**integer | Deprecated Recommendation: Use V3 Inpainting API |
|
| **resize\_mode**integer | Deprecated | |
| **image\_cfg\_scale**integer | Deprecated | |
| **inpainting\_fill**integer | Deprecated Recommendation: Use V3 Inpainting API |
|
| **inpaint\_full\_res**integer | Deprecated Recommendation: Use V3 Inpainting API |
|
| **inpaint\_full\_res\_padding** integer |
Deprecated Recommendation: Use V3 Inpainting API |
|
| **inpainting\_mask\_invert** integer |
Deprecated Recommendation: Use V3 Inpainting API |
|
| **initial\_noise\_multiplier** number(float32) |
Deprecated | |
| **img\_expire\_ttl**integer | Deprecated Default 3600s |
|
| **sd\_refiner**object | refinerobject | Changed `sd_refiner`**→** `request.refiner` |
| checkpoint | Deprecated | |
| switch\_at number(float32) |
switch\_at number(float32) |
Moved Inside |
| controlnetobject | New Field | |
| **controlnet\_units**object\[] | unitsobject\[] | Changed `controlnet_units`**→** `request.controlnet.units` |
| modelstring | model\_name string |
Changed `controlnet_units.model`**→** `request.controlnet.units.model_name` |
| weightnumber | strength number(float32) |
Changed `controlnet_units.weight`**→** `request.controlnet.units.strength` |
| input\_imagestring | image\_base64 string |
Changed `controlnet_units.input_image`**→** `request.controlnet.units.image_base64` |
| modulestring,Enum | preprocessor string,Enum |
Changed `controlnet_units.module`**→** `request.controlnet.units.preprocessor` |
| control\_mode | Deprecated | |
| mask | Deprecated Recommendation: Use V3 Inpainting API |
|
| resize\_mode | Deprecated | |
| processor\_res | Deprecated | |
| threshold\_a | Deprecated | |
| threshold\_b | Deprecated | |
| guidance\_start number(float32) |
guidance\_start number(float32) |
Moved Inside |
| guidance\_end number(float32) |
guidance\_end number(float32) |
Moved Inside |
| pixel\_perfect | Deprecated |
| V2 | V3 | Description |
|---|---|---|
| code | Deprecated | |
| msg | Deprecated | |
| data | Deprecated | |
| task\_id | **task\_id** | Changed `data.task_id`**→** `task_id` |
| warn | Deprecated |
| Billing Item | Description |
|---|---|
| CPU | Billed based on the number of vCPU cores used and usage duration (accurate to the second). Current pricing can be found on the [here](https://novita.ai/pricing?sandbox=1). No billing occurs after the Sandbox is stopped. |
| RAM (memory) | Billed based on allocated memory capacity and usage duration (accurate to the second). Current pricing can be found on the [here](https://novita.ai/pricing?sandbox=1). No billing occurs after the Sandbox is stopped. |
| Storage | Current pricing can be found on the [here](https://novita.ai/pricing?sandbox=1). |
| Templates | Currently free. |
| vCPUs (cores) | Unit Price |
|---|---|
| 1 | \$0.0000098/s |
| 2 | \$0.0000196/s |
| 3 | \$0.0000294/s |
| 4 | \$0.0000392/s |
| 5 | \$0.000049/s |
| 6 | \$0.0000588/s |
| 7 | \$0.0000686/s |
| 8 | \$0.0000784/s |
| Memory (MiB) | Unit Price |
|---|---|
| Valid values: multiples of 512 MiB, from 512 MiB to 8192 MiB | \$0.0000032/GiB/s |
| 512 MiB | \$0.0000016/s |
| 1 GiB | \$0.0000032/s |
| 2 GiB | \$0.0000064/s |
| Memory (MiB) | Unit Price |
|---|---|
| Each account includes 60 GB of free storage. Usage beyond this limit is billed on a pay-as-you-go basis. | \$0.00009/GB/h |
| Configuration Item | Description |
|---|---|
| Min Worker Count | The minimum number of worker instances to keep for the endpoint. Setting a higher minimum helps reduce cold start time. If set to 0, there will be no idle workers when there are no requests, which may increase response time for incoming requests. For latency-sensitive scenarios, use 0 with caution. |
| Max Worker Count | The maximum number of worker instances that the endpoint can scale up to. When request volume increases, the platform automatically increases workers up to this maximum. This limit helps control costs. |
| Idle Timeout (seconds) | When a worker is about to be released due to autoscaling down, the platform will keep the worker alive for the specified idle timeout period to be able to react quickly to new requests. Note that you will be charged for the worker during this period. |
| Max Concurrent Requests | The maximum number of concurrent requests handled by a single worker. If this is exceeded, requests will be routed to other workers. If all workers are fully occupied, excess requests will be queued until execution is possible. |
| GPUs / Worker | Number of GPU cards allocated to each worker. |
| CUDA Version | Specify the CUDA version supported for the worker. |