API Documentation

NovAI provides an OpenAI-compatible REST API. If you've used OpenAI's API before, you already know how to use NovAI — just change the base URL and API key.

NovAI pricing at a glance (current billing configuration)
Catalog116 live models, including 31 audio/video models and 5 free models
Chat & embeddingsCurrent NovAI input/output rates per 1M tokens; embeddings charge input tokens only
TokenHub media$1.54 / 1M tokens; charge = actual tokens ÷ 1,000,000 × $1.54
Per-second videoSeedance rates vary by resolution; charge = seconds × current resolution rate
Per-character TTSQwen3 TTS Flash: $0.0145 / 1K characters
Free tier$2 signup credit; 5 free-to-call models within current daily limits; no card required
Token-based media examples are reference estimates, not fixed totals. Final charges use actual tokens. Authoritative machine-readable configuration: media-pricing.json.

Billing and price display

Every displayed price is generated from the same NovAI billing configuration used for settlement. The model page shows the current unit, formula and, where reliable reference usage exists, a lightweight estimator.

  • Token models: actual tokens ÷ 1,000,000 × the displayed NovAI rate. TokenHub audio/video currently use $1.54 per 1M tokens.
  • Per-second models: seconds × the displayed rate for the selected resolution.
  • Per-character models: characters ÷ 1,000 × the displayed NovAI rate.
  • Per-image, per-generation and free models: the displayed current NovAI rate applies; free models remain subject to current limits.

Estimator results and per-second, per-song or per-image examples for token-billed models are reference estimates only. The final charge is reconciled to actual usage. Models without reliable reference usage show the real billing unit and formula but no invented fixed total.

Overview

NovAI is an AI API gateway based in Hong Kong, offering low-latency access to Chinese AI models through a unified, OpenAI-compatible interface.

NovAI supports both the Chat Completions API (/v1/chat/completions) and the new Responses API (/v1/responses). The endpoint translates supported Responses API requests into provider-compatible chat requests.

Authentication

All API requests require an API key passed via the Authorization header:

Authorization: Bearer nvai-your-api-key-here

Get your API key by signing up at aiapi-pro.com. Registration requires only an email address.

Base URL

https://aiapi-pro.com/v1

Replace https://api.openai.com/v1 with the URL above in any existing OpenAI integration.

Available Models

Free model available! Start building immediately with GLM-4.6V-Flash — no credit card required. Click model ID to copy.

Chat Models

Model ID (click to copy)ProviderInputOutputContextNotes
glm-4.6v-flashZhipu AIFreeFree128KFree multimodal FREE
glm-5Zhipu AI$0.60$1.92128KMultimodal flagship
glm-5.1Zhipu AI$1.05$3.50128K8-hour autonomous coding
glm-5.2Zhipu AI$1.19$3.741M1M context flagship NEW
glm-5.3Zhipu AI$1.25$4.001MNewest flagship, coding & agents NEW
glm-5v-turboZhipu AI$1.10$3.70128KVision + coding multimodal NEW
minimax-text-01MiniMax$0.14$1.101M1M context window
minimax-m3.1-flashMiniMax$0.15$0.601MFast low-cost tier of the M3 family NEW
glm-4.6vZhipu AI$0.30$0.90128KMultimodal vision
hy4-previewTencent$0.834$2.5011MNext-gen flagship preview NEW
hy4Tencent$0.417$1.25051MHunyuan hy4 production flagship NEW
hy4-flashTencent$0.035$0.14051MCost-efficient hy4 flash tier, reasoning NEW
glm-5.3-flashZhipu AI$0.08$0.281MBudget flagship, coding & agents NEW
kimi-k2.8-previewMoonshot$0.93$3.89256KNext-gen agentic reasoning preview NEW
kimi-k3.1-proMoonshot$2.00$10.001MPremium tier above Kimi K3 NEW
kimi-k3.1-pro-highspeedMoonshot$4.00$20.92311MLow-latency tier of Kimi K3.1 Pro NEW
hunyuan-t1-visionTencent$0.55$1.64—HY-Vision-1.5-Thinking, deep-reasoning vision NEW
hy-mt2-plusTencent$0.072$0.2878KMachine translation, 30+ languages NEW
hy-mt2-liteTencent$0.043$0.1728KBudget machine translation NEW
hy-vision-2.0-instructTencent$1.154$2.692—Fast multimodal vision-language (OCR, VQA) NEW
hunyuan-turbos-vision-videoTencent$0.462$1.385—Image & video frame understanding NEW
hy-roleTencent$0.369$1.47732KRole-play & character model NEW
deepseek-v4.1-flashDeepSeek$0.308$1.231128KFast reasoning LLM for chat & agents NEW
deepseek-v4-flash-visionDeepSeek$0.308$1.231128KFast vision-language (experimental) NEW

Embedding Models

Model ID (click to copy)ProviderInputModalityDimsNotes
kinfra-text-embedding-4bTencent$0.0923Text2560High-quality text vectors for RAG & search NEW
kinfra-text-embedding-0.6bTencent$0.0769Text1024Fast, compact text vectors NEW
kinfra-vl-embedding-8bTencent$0.0923Multimodal—Text + image + video vectors NEW
kinfra-vl-embedding-2bTencent$0.0769Multimodal—Fast multimodal vectors NEW

Quick Start Example

curl https://aiapi-pro.com/v1/chat/completions \
  -H "Authorization: Bearer nvai-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-4.6v-flash",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

API Playground TRY FREE — NO SIGNUP

Test the API right here in your browser. Uses the free GLM-5.3-FlashX demo through Tencent Cloud TokenHub — no API key required.

Model No-signup demo works without API key. Paid models require free signup + your key.
API Key
Prompt
Click "Send Request" to test the API...
Want to use all 116 models? Sign up free and get $2.00 credit — try DeepSeek, Qwen, Kimi, and more.
Start Free →

Chat Completions

POST /v1/chat/completions

Creates a model response for the given conversation.

Request Body

ParameterTypeRequiredDescription
modelstringRequiredModel ID to use (see table above)
messagesarrayRequiredList of messages in the conversation
temperaturefloatOptionalSampling temperature (0-2). Default: 1.0
max_tokensintegerOptionalMaximum tokens to generate
streambooleanOptionalEnable streaming responses. Default: false
toolsarrayOptionalTool definitions for models that support function calling
tool_choicestring | objectOptionalControls whether the model may call a tool; support varies by model
parallel_tool_callsbooleanOptionalAllows multiple tool calls where supported. Default: true
top_pfloatOptionalNucleus sampling parameter. Default: 1.0

Message Object

FieldTypeDescription
rolestringsystem, user, or assistant
contentstringThe message content

Example Request

curl https://aiapi-pro.com/v1/chat/completions \
  -H "Authorization: Bearer nvai-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Hello!"}
    ],
    "temperature": 0.7,
    "max_tokens": 500
  }'

Example Response

{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "created": 1709942400,
  "model": "glm-5",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! How can I help you today?"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 20,
    "completion_tokens": 9,
    "total_tokens": 29
  }
}

Responses API RESPONSES FORMAT

POST /v1/responses

NovAI supports a Responses API-compatible endpoint for supported Chinese AI models. This enables Responses API-based applications to use models such as GLM and MiniMax through a unified base URL.

Why this matters: Chinese AI providers (Zhipu, MiniMax) only support the legacy /v1/chat/completions endpoint. NovAI automatically translates Responses API format to Chat Completions format, making Chinese models accessible to all modern agent tools.

Request Body

ParameterTypeRequiredDescription
modelstringRequiredModel ID to use
inputstring | arrayRequiredText prompt or message array
instructionsstringOptionalSystem instructions for the model
streambooleanOptionalEnable SSE streaming. Default: false
temperaturefloatOptionalSampling temperature (0-2). Default: 0.7
max_output_tokensintegerOptionalMaximum tokens to generate
toolsarrayOptionalFunction/tool definitions
tool_choicestringOptionalauto, required, or none

Example: Simple Request

curl https://aiapi-pro.com/v1/responses \
  -H "Authorization: Bearer nvai-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5",
    "input": "Explain quantum computing simply.",
    "stream": false
  }'

Example: Conversation with Instructions

curl https://aiapi-pro.com/v1/responses \
  -H "Authorization: Bearer nvai-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5",
    "instructions": "You are a senior code reviewer.",
    "input": [
      {"role": "user", "content": "Review: def add(a,b): return a+b"}
    ],
    "stream": true
  }'

Example Response

{
  "id": "resp_abc123...",
  "object": "response",
  "status": "completed",
  "model": "glm-5",
  "output": [
    {
      "type": "message",
      "role": "assistant",
      "content": [
        {"type": "output_text", "text": "Quantum computing uses..."}
      ]
    }
  ],
  "usage": {
    "input_tokens": 12,
    "output_tokens": 150,
    "total_tokens": 162
  }
}

Compatible Tools

The following tools work out of the box with NovAI's Responses API endpoint:

  • Open Cowork — Set Base URL to https://aiapi-pro.com/v1
  • OpenAI Agents SDK — Pass NovAI client to Runner
  • OpenAI Python SDK (responses mode) — Set base_url
  • Any custom application using POST /v1/responses

Read the full guide: Responses API for Chinese Models →

Function Calling & Streaming Reliability

The following reflects NovAI's own gateway testing, cross-checked by an independent reviewer. Use it to choose models for agent / tool-calling workloads.

Reliable for tool calling: DeepSeek V4 family, Doubao Seed 2.x, GLM-5.1 / GLM-5.3, Kimi K2.5 / K2.6 / K2.7-code, Hunyuan T1.

Known upstream caveats (model behavior, not gateway bugs):

  • Some models (GLM-4.6v, MiniMax-M3, Kimi-K2.8-preview) may emit assistant content before tool_calls in streaming responses. If your framework assumes tool_calls arrive first, prefer the reliable list above.
  • Several chat-capable models do not support tool calling; treat tool-calling support as per-model.
  • reasoning_tokens is reported by the upstream provider. For some thinking models (e.g. step-5-preview-fast) upstream may return reasoning_tokens = 0 while still streaming reasoning_content; if you need exact reasoning-token counts, estimate locally from the reasoning text.
  • glm-4.6v-flash is a free flash tier that can return HTTP 429 under upstream load; use glm-4.6v for production tool-calling.

Function Calling

Function calling is a two-step protocol: the model returns a structured tool call, your application executes that tool, and you append the result as a tool message before the next request. Tool support varies by model; check the model page and handle models that return ordinary text instead.

1. Send a request with a tool definition

curl https://aiapi-pro.com/v1/chat/completions \
  -H "Authorization: Bearer $NOVAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.1",
    "messages": [{"role": "user", "content": "What is the weather in Paris?"}],
    "tools": [{
      "type": "function",
      "function": {
        "name": "get_weather",
        "description": "Get the current weather for a city",
        "parameters": {
          "type": "object",
          "properties": {"city": {"type": "string"}},
          "required": ["city"]
        }
      }
    }],
    "tool_choice": "auto"
  }'

2. Read the tool call; do not execute model text blindly

{
  "choices": [{
    "message": {
      "role": "assistant",
      "content": null,
      "tool_calls": [{
        "id": "call_abc123",
        "type": "function",
        "function": {"name": "get_weather", "arguments": "{\"city\":\"Paris\"}"}
      }]
    },
    "finish_reason": "tool_calls"
  }]
}

Validate the function name and parse the JSON arguments in your application. Enforce your own allowlist, permissions and argument schema before executing anything.

3. Execute the tool and send the result back

{
  "model": "glm-5.1",
  "messages": [
    {"role": "user", "content": "What is the weather in Paris?"},
    {"role": "assistant", "content": null, "tool_calls": [{
      "id": "call_abc123", "type": "function",
      "function": {"name": "get_weather", "arguments": "{\"city\":\"Paris\"}"}
    }]},
    {"role": "tool", "tool_call_id": "call_abc123", "content": "{\"temperature_c\":18,\"condition\":\"cloudy\"}"}
  ],
  "tools": [{
    "type": "function",
    "function": {
      "name": "get_weather",
      "description": "Get the current weather for a city",
      "parameters": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}
    }
  }]
}

The next response can use the tool result to produce a user-facing answer. In streaming mode, accumulate delta.tool_calls fragments by index and id before parsing arguments. Never assume tool calls arrive before assistant content.

Embeddings NEW

POST /v1/embeddings

Creates a vector representation of the input, powered by Tencent Kinfra embedding models. Text models return 1024–2560 dimension vectors; multimodal (VL) models embed text, images and video in one shared space for cross-modal retrieval.

Available models

ModelModalityDimensionsNovAI price / 1M input tokens
kinfra-text-embedding-4bText2560$0.0923 / 1M input tokens
1M input tokens: $0.0923 reference estimate
kinfra-text-embedding-0.6bText1024$0.0769 / 1M input tokens
1M input tokens: $0.0769 reference estimate
kinfra-vl-embedding-8bMultimodal (text + image + video)—$0.0923 / 1M input tokens
1M input tokens: $0.0923 reference estimate
kinfra-vl-embedding-2bMultimodal (text + image + video)—$0.0769 / 1M input tokens
1M input tokens: $0.0769 reference estimate

Request Body

ParameterTypeRequiredDescription
modelstringRequiredEmbedding model ID (see table above)
inputstring | arrayRequiredText models: a string or list of strings. Multimodal (VL) models: an object array such as [{"type":"text","text":"..."}] or [{"type":"image_url","image_url":"..."}]

Example Request (text)

curl https://aiapi-pro.com/v1/embeddings \
  -H "Authorization: Bearer nvai-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kinfra-text-embedding-4b",
    "input": "The quick brown fox"
  }'

Example Request (multimodal)

curl https://aiapi-pro.com/v1/embeddings \
  -H "Authorization: Bearer nvai-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kinfra-vl-embedding-8b",
    "input": [{"type": "text", "text": "a cat sitting on a mat"}]
  }'

Example Response

{
  "object": "list",
  "data": [
    {"object": "embedding", "index": 0, "embedding": [0.0023, -0.0091, ...]}
  ],
  "model": "kinfra-text-embedding-4b",
  "usage": {"prompt_tokens": 5, "total_tokens": 5}
}

Billing: only input tokens are charged (at the per-1M rate above); the returned vectors are free.

Image Generation NEW

POST /v1/images/generations

Generates images from a text prompt, powered by Tencent Hunyuan, Vidu, ByteDance Seedream, WAND Vega and MiniMax image models via the TokenHub gateway. Returns an OpenAI-compatible {created, data:[{url}]} response. Even for models that are asynchronous upstream, NovAI polls to completion internally and returns the final image URL synchronously.

Available models

ModelVendorMax sizeReference imagesNovAI current billing
hy-image-v3Tencent Hunyuan≤1024²0–3$1.54 / 1M tokens
vidu-image-q2Vidu (Shengshu)1080p–4K0–7$1.54 / 1M tokens
seedream-image-v5.0-proByteDance Seedream1K–2K≤10$1.54 / 1M tokens
seedream-image-v5.0-liteByteDance Seedream2K–4K≤14$1.54 / 1M tokens
wand-vega-image-liteTencent WAND Vega1K–4K0–3$1.54 / 1M tokens
wand-vega-image-flashTencent WAND Vega1K–4K0–6$1.54 / 1M tokens
wand-vega-image-proTencent WAND Vega1K–4K0–6$1.54 / 1M tokens
minimax-image-h3MiniMax1K testedT2I$1.54 / 1M tokens
minimax-image-h3-highspeedMiniMax1K testedT2I$1.54 / 1M tokens
TokenHub image models are billed by actual token usage at the current NovAI token rate, not a flat per-image fee. Per-image figures are reference estimates at the stated resolution and scale with actual usage. Legacy flat-price and free models keep their listed current NovAI rate.

Request Body

ParameterTypeRequiredDescription
modelstringRequiredImage model ID (see table above)
promptstringRequiredText description of the image to generate
nintegerOptionalNumber of images to generate (1–4, default 1)
sizestringOptionalImage size as WxH (e.g. 1024x1024). Mapped to each vendor's allowed sizes / aspect ratios.
imagesstring | arrayOptionalReference image URL(s) for image-to-image editing (count limit varies by model)

Example Request (text-to-image)

curl https://aiapi-pro.com/v1/images/generations \
  -H "Authorization: Bearer nvai-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "hy-image-v3",
    "prompt": "a cute orange cat on a windowsill, soft sunlight",
    "size": "1024x1024",
    "n": 1
  }'

Example Request (image editing)

curl https://aiapi-pro.com/v1/images/generations \
  -H "Authorization: Bearer nvai-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "vidu-image-q2",
    "prompt": "change the background to a snowy mountain",
    "images": ["https://example.com/input.jpg"],
    "size": "1024x1024"
  }'

Example Response

{
  "created": 1730000000,
  "data": [
    {"url": "https://.../generated-image.png"}
  ],
  "usage": {"total_tokens": 20000}
}

Billing: the response usage.total_tokens is the actual token count; the charge is total_tokens ÷ 1,000,000 × $1.54 for TokenHub models. For example, 20,000 tokens is a $0.0308 reference charge. Final charges use actual usage.

Audio NEW

Two OpenAI-compatible audio endpoints powered by MiniMax and Tencent models via the TokenHub gateway: /v1/audio/speech (text → audio: TTS + music) and /v1/audio/transcriptions (audio → text: ASR). Both are synchronous.

Speech & music models — POST /v1/audio/speech

ModelVendorTypeNovAI current billing
minimax-speech-2.8-hdMiniMaxTTS (flagship)$1.54 / 1M tokens
1,000 characters: $0.0539 reference estimate
minimax-speech-2.8-turboMiniMaxTTS (fast)$1.54 / 1M tokens
1,000 characters: $0.0308 reference estimate
minimax-speech-2.6-hdMiniMaxTTS$1.54 / 1M tokens
1,000 characters: $0.0539 reference estimate
minimax-speech-2.6-turboMiniMaxTTS (fast)$1.54 / 1M tokens
1,000 characters: $0.0308 reference estimate
minimax-speech-02-hdMiniMaxTTS$1.54 / 1M tokens
1,000 characters: $0.0539 reference estimate
minimax-speech-02-turboMiniMaxTTS (fast)$1.54 / 1M tokens
1,000 characters: $0.0308 reference estimate
minimax-music-v3.0MiniMaxMusic (lyrics→song)$1.54 / 1M tokens
1 song: $0.154 reference estimate
minimax-music-v2.6MiniMaxMusic (lyrics→song)$1.54 / 1M tokens
1 song: $0.154 reference estimate

Transcription models — POST /v1/audio/transcriptions

ModelVendorFeaturesNovAI current billing
hy-asr-3.0-previewTencent HunyuanTimestamps, SRT subtitles$1.54 / 1M tokens
5 seconds: $0.000169 reference estimate
wand-asr-v1Tencent WANDMultilingual, language detection$1.54 / 1M tokens
5 seconds: $0.000385 reference estimate
MiniMax Speech, Music and ASR models are billed by actual tokens at $1.54 / 1M tokens. The per-unit figures above are reference estimates based on published usage references; final charges use actual tokens. Qwen3 TTS Flash is billed separately at $0.0145 per 1K characters.

Speech request body

ParameterTypeRequiredDescription
modelstringRequiredSpeech or music model ID (see tables above)
inputstringRequiredText to speak (TTS). For music models pass lyrics and prompt instead.
voicestringOptionalVoice ID (TTS). Default male-qn-qingse.
response_formatstringOptionalmp3 (default, binary audio), wav/opus/aac/flac/pcm, or url (NovAI extension: JSON with an audio_url).
speed / vol / pitch / emotionnumber/stringOptionalVoice tweaks (TTS): speed 0.5–2, vol 0–10, pitch −12–12.
lyrics / promptstringOptionalMusic models only: song lyrics and style prompt.

Example Request (TTS → audio URL)

curl https://aiapi-pro.com/v1/audio/speech \
  -H "Authorization: Bearer nvai-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "minimax-speech-2.8-hd",
    "input": "Hello, welcome to NovAI.",
    "voice": "male-qn-qingse",
    "response_format": "url"
  }'

Example Response (response_format=url)

{
  "id": "audgen-...",
  "model": "minimax-speech-2.8-hd",
  "status": "completed",
  "audio_url": "https://.../speech/....mp3",
  "usage": {"total_tokens": 1505, "characters": 43}
}

With the default response_format=mp3 the endpoint instead streams raw audio bytes (Content-Type: audio/mpeg), exactly like OpenAI’s native /v1/audio/speech — so the OpenAI SDK works unchanged.

Example Request (transcription)

# JSON form: transcribe from a URL
curl https://aiapi-pro.com/v1/audio/transcriptions \
  -H "Authorization: Bearer nvai-your-key" \
  -H "Content-Type: application/json" \
  -d '{"model": "wand-asr-v1", "file_url": "https://example.com/audio.mp3"}'

# OpenAI multipart form: upload a file
curl https://aiapi-pro.com/v1/audio/transcriptions \
  -H "Authorization: Bearer nvai-your-key" \
  -F model=hy-asr-3.0-preview \
  -F [email protected]

Example Response (transcription)

{
  "text": "Hello, welcome to NovAI.",
  "language": "en",
  "duration_ms": 2426,
  "sentences": [{"begin_ms": 0, "end_ms": 2426, "text": "Hello, welcome to NovAI."}],
  "subtitle_url": "https://.../....srt",
  "usage": {"total_tokens": 121}
}

Billing: the charge is usage.total_tokens ÷ 1,000,000 × $1.54. Transcription accepts either a multipart file upload (OpenAI-native) or a JSON file_url / base64 data field.

Video Generation NEW

POST /v1/video/generations  +  GET /v1/video/generations/{id}

Generates video from a text prompt (and optional source image), powered by MiniMax Hailuo and Tencent Hunyuan video models via the TokenHub gateway. Video generation is asynchronous: submit a task to get an id, then poll the GET endpoint until status is succeeded (the mp4 is in video_url) or failed (auto-refunded).

Available models

ModelVendorCapabilitiesResolutionReference usage (if published)NovAI current billing
minimax-video-h3MiniMax (海螺)T2V768P/2K768p: 50,000 tokens/s; 2k: 80,000 tokens/s$1.54 / 1M tokens
768p · 5 seconds: $0.385 reference estimate
minimax-video-h3-maxMiniMax (海螺)T2V (top quality)480P/768PNot published; no fixed per-unit estimate$1.54 / 1M tokens
minimax-video-v2.3MiniMax (海螺)T2V768P/1080PNot published; no fixed per-unit estimate$1.54 / 1M tokens
minimax-video-v2.3-fastMiniMax (海螺)I2V only768P/1080PNot published; no fixed per-unit estimate$1.54 / 1M tokens
hy-video-v1.5Tencent HunyuanT2V + I2V720p/1080pNot published; no fixed per-unit estimate$1.54 / 1M tokens
TokenHub video models are billed by actual tokens at $1.54 / 1M tokens. H3 reference examples: 768P for 5 seconds ≈ 250,000 tokens ≈ $0.385; 2K for 5 seconds ≈ 400,000 tokens ≈ $0.616. These are reference estimates, not fixed per-second prices. Models without a reliable published usage reference show no per-second estimate. Seedance models are billed per second by resolution, and CogVideoX-Flash is free within current limits.

Submit request body

ParameterTypeRequiredDescription
modelstringRequiredVideo model ID (see table above)
promptstringRequiredText description of the video to generate
imagestringOptionalSource image URL for image-to-video. Required for minimax-video-v2.3-fast (I2V-only).
durationnumberOptionalClip length in seconds (default 5)
resolutionstringOptionalDefault 720p (maps to 768P). minimax-video-h3: 768p/2k; minimax-video-h3-max: 480p/768p; other MiniMax models: 720p/1080p (mapped to 768P/1080P). Unsupported tiers return 400.
ratiostringOptionalAspect ratio, e.g. 16:9 (default), 9:16, 1:1

Example Request (text-to-video)

curl https://aiapi-pro.com/v1/video/generations \
  -H "Authorization: Bearer nvai-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "minimax-video-h3",
    "prompt": "A red sports car driving along a coastal road at sunset, cinematic",
    "resolution": "720p",
    "duration": 5,
    "ratio": "16:9"
  }'

Example Request (image-to-video)

curl https://aiapi-pro.com/v1/video/generations \
  -H "Authorization: Bearer nvai-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "hy-video-v1.5",
    "prompt": "Animate this scene with smooth cinematic motion",
    "image": "https://example.com/first-frame.jpg",
    "duration": 5
  }'

Example Response (submit)

{
  "id": "<task_id>",
  "status": "queued",
  "model": "minimax-video-h3",
  "resolution": "720p",
  "duration": 5
}

Poll the task

curl "https://aiapi-pro.com/v1/video/generations/<task_id>?model=minimax-video-h3" \
  -H "Authorization: Bearer nvai-your-key"

Example Response (poll, completed)

{
  "id": "<task_id>",
  "status": "succeeded",
  "video_url": "https://.../output.mp4",
  "video_result": [{"url": "https://.../output.mp4"}],
  "duration": 5,
  "tokenhub_usage": {"total_tokens": 250000},
  "novai_token_settlement": {
    "prepaid_usd": 0.384625, "actual_usd": 0.384625,
    "adjustment_usd": 0.0, "total_tokens": 250000
  }
}

Billing: while status is queued/processing keep polling (generation typically takes 1–5 minutes). On succeeded the pre-deducted estimate is reconciled to the real token count and novai_token_settlement reports the adjustment. On failed/cancelled the pre-deducted amount is automatically refunded.

3D Generation NEW

POST /v1/three_d/generations  +  GET /v1/three_d/generations/{id}

Generates a 3D model (mesh) from a text prompt and/or a source image, powered by Tencent Hunyuan 3D, Tencent Miora and Tripo (VAST) models via the TokenHub gateway. 3D generation is asynchronous: submit a task to get an id, then poll the GET endpoint until status is succeeded (downloadable model URLs are in outputs, primary in model_url) or failed (auto-refunded).

Available models

ModelVendorInputOutput formatsPrice / generation
hy-3d-expressTencent Hunyuan—obj (zip)$0.277
hy-3d-3.0Tencent Hunyuan—obj (zip) + glb$0.369
hy-3d-3.1Tencent Hunyuan—obj (zip) + glb$0.369
hy-3d-motionTencent Hunyuan—fbx$0.185
hy-3d-polygen-imageTencent Hunyuan—glb + obj + fbx$0.554
tripo-3d-3.1Tripo (VAST)—glb$0.323
tripo-3d-p1Tripo (VAST)—glb$0.323
miora-3d-1.2Tencent Miora—glb + obj$0.462
miora-3d-t1Tencent Miora—glb + obj$0.369
Unlike image/video/audio (which are billed by upstream token usage), TokenHub 3D models are billed upstream by credits and return no token usage on query. NovAI therefore charges a flat per-generation price (default tier): the full price is pre-deducted at submit and refunded in full if the job fails or is cancelled — you only pay for successful generations. Only the default generation mode is exposed (no PBR / high-poly / extra-format upcharges), so the flat price always matches the upstream cost.

Submit request body

ParameterTypeRequiredDescription
modelstringRequired3D model ID (see table above)
promptstringConditionalText description of the 3D asset. Required for text-to-3D; at least one of prompt / image must be provided.
imagestringConditionalSource image URL for image-to-3D. Required for hy-3d-polygen-image.

Example Request (text-to-3D)

curl https://aiapi-pro.com/v1/three_d/generations \
  -H "Authorization: Bearer nvai-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "hy-3d-3.1",
    "prompt": "a cute cartoon dog"
  }'

Example Request (image-to-3D)

curl https://aiapi-pro.com/v1/three_d/generations \
  -H "Authorization: Bearer nvai-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "tripo-3d-3.1",
    "image": "https://example.com/object.png"
  }'

Example Response (submit)

{
  "id": "<task_id>",
  "request_id": "3dgen-...",
  "status": "queued",
  "model": "hy-3d-3.1"
}

Poll the task

curl "https://aiapi-pro.com/v1/three_d/generations/<task_id>?model=hy-3d-3.1" \
  -H "Authorization: Bearer nvai-your-key"

Example Response (poll, completed)

{
  "id": "<task_id>",
  "status": "succeeded",
  "upstream_status": "completed",
  "model_url": "https://.../model.glb",
  "outputs": [
    {"type": "obj", "url": "https://.../model.obj.zip", "preview_image_url": "https://.../preview.png"},
    {"type": "glb", "url": "https://.../model.glb", "preview_image_url": "https://.../preview.png"}
  ],
  "model": "hy-3d-3.1"
}

Billing: while status is queued/processing keep polling (generation typically takes 1–8 minutes). On succeeded the flat pre-deducted price is final (no token reconciliation). On failed/cancelled the pre-deducted amount is automatically refunded (novai_refund is reported in the response). model_url is the primary downloadable asset (glb preferred); outputs lists every available format.

Streaming

Set "stream": true to receive responses as Server-Sent Events (SSE):

curl https://aiapi-pro.com/v1/chat/completions \
  -H "Authorization: Bearer nvai-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5",
    "messages": [{"role": "user", "content": "Hello"}],
    "stream": true
  }'

Each SSE event contains a JSON chunk with delta.content for the new token. The stream ends with [DONE].

List Models

GET /v1/models

Returns a list of all available models.

curl https://aiapi-pro.com/v1/models \
  -H "Authorization: Bearer nvai-your-key"

Context Windows and History

The Context column is the model's maximum combined input context, not a guaranteed output allowance. System instructions, tool definitions, prior messages, retrieved documents, images and the current user input all consume context. max_tokens limits generated output and should be budgeted separately.

  • Keep a rolling history and summarize or retrieve older turns before reaching the model limit.
  • Leave headroom for the response; a request that fits the input window can still fail if the requested output exceeds the remaining budget.
  • Token counts vary by tokenizer and modality. Use usage from actual responses rather than character-count estimates for billing decisions.
  • For Responses API requests, instructions, input and tool definitions count toward context.

Retries, Backoff and Request IDs

Retry only transient failures such as connection errors, HTTP 408, 429, 500, 502, 503 and 504. Do not blindly retry authentication, validation or insufficient-balance errors.

  • Use exponential backoff with jitter, for example 1s, 2s, 4s, 8s, capped at 30s. Respect Retry-After when present.
  • Limit total attempts and elapsed time. A 429 can be NovAI free-tier throttling or an upstream provider limit; inspect the error body and provider label.
  • 502/503/504 usually indicate an upstream or gateway failure. They can be transient, but repeated failures should trigger alerting rather than an endless retry loop.
  • Make tool execution idempotent. If a request may have reached the provider before a network failure, do not repeat a non-idempotent side effect without a deduplication key.
  • Reconnecting a partially consumed stream can repeat generation and billing. Treat stream retries as a new request and discard partial output unless your application explicitly reconciles it.

Request IDs

Streaming chat responses include X-Request-Id. Non-streaming chat responses expose the gateway request ID in the JSON id field. Some media endpoints use X-NovAI-Request-Id. Save the value with your logs and include it when contacting support; do not include API keys or sensitive prompt content in support messages.

curl -i https://aiapi-pro.com/v1/chat/completions \
  -H "Authorization: Bearer $NOVAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"glm-5.1","messages":[{"role":"user","content":"Hello"}],"stream":true}'

Error Codes

HTTP CodeMeaningDescription
400Bad RequestInvalid request body or missing required fields
401UnauthorizedInvalid or missing API key
402Insufficient BalanceAccount balance too low (does not apply to free models)
404Not FoundInvalid model ID
429Rate LimitedToo many requests, please slow down
500Server ErrorInternal error; retry with backoff if transient
502Bad GatewayUpstream/provider failure; retry with backoff
503Service UnavailableTemporary gateway or provider unavailability
504Gateway TimeoutUpstream response timed out; retry cautiously

Rate Limits

Current rate limits:

  • Accounts with any completed top-up: no fixed NovAI-side request-rate cap; provider throttling, concurrency controls and fair-use protections can still apply.
  • Never-topped-up accounts: 5 requests/minute, plus up to 10 free-model calls per day (5 free video generations per day); resets at midnight UTC+8.
  • Provider-side congestion: a model vendor may throttle during peak hours. Those 429 responses are labeled with the provider name and reason — they are not NovAI caps.
Topped-up accounts do not have a fixed NovAI-side request-rate cap. A 429 can still come from an upstream provider or a security control; inspect the response body and contact support with the request ID if needed.

SDKs & Libraries

OpenAI-compatible SDKs can be used for supported chat features by setting the base URL. Feature support varies by model:

Python

pip install openai

from openai import OpenAI
client = OpenAI(api_key="nvai-...", base_url="https://aiapi-pro.com/v1")

Node.js

npm install openai

import OpenAI from 'openai';
const client = new OpenAI({ apiKey: 'nvai-...', baseURL: 'https://aiapi-pro.com/v1' });

LangChain

from langchain_openai import ChatOpenAI
llm = ChatOpenAI(model="glm-5", openai_api_key="nvai-...", openai_api_base="https://aiapi-pro.com/v1")

Cursor IDE / Continue

Set base URL to https://aiapi-pro.com/v1 in your IDE settings. See our Cursor setup guide.

More examples: GitHub Repository | Blog & Tutorials

Supported Email Providers

Due to bot attacks targeting our free welcome credit, NovAI restricts new account registration to major email providers. This policy applies to new registrations only — all existing accounts are fully unaffected.

If your email provider is not listed below, please contact [email protected] for manual approval.

Provider Accepted Domains Notes
Googlegmail.com, googlemail.comRecommended
Microsoftoutlook.com, hotmail.com, live.com, msn.comRecommended
Yahooyahoo.com, yahoo.co.jp, yahoo.co.uk
Appleicloud.com, me.com, mac.com
Protonprotonmail.com, proton.mePrivacy-focused
Tutanotatutanota.comPrivacy-focused
Zohozoho.comBusiness / developer
GMXgmx.com, gmx.netEurope popular
AOLaol.com
Mail.commail.com
Yandexyandex.com
Navernaver.comKorea
Daum / Kakaodaum.netKorea
Web.deweb.de, t-online.deGermany
Mail.rumail.ruRussia

Note: Custom domain emails, dynamic DNS addresses, and temporary/disposable email services are not accepted. This restriction was introduced on June 24, 2026 to combat bot abuse. All 3,000+ users registered before this date are fully unaffected.

App Tutorials

Connect NovAI to your favorite tools in 60 seconds. Just change the Base URL and paste your API Key.

🎧
Cherry Studio
Desktop AI client for Mac / Windows / Linux.
Settings → Model Provider → OpenAI
Base URL: https://aiapi-pro.com/v1
API Key: your novai key
💬
ChatBox
Cross-platform AI assistant app.
Settings → AI Model Provider → Custom
API Host: https://aiapi-pro.com
API Path: /v1/chat/completions
✍
Cursor
AI-native code editor.
Cursor Settings → Models
Override OpenAI Base URL
https://aiapi-pro.com/v1
💻
NextChat
One-click deployable web UI.
Settings → OpenAI Endpoint
https://aiapi-pro.com
Select any NovAI model
🌐
Immersive Translate
Bilingual web page translation.
AI Service → OpenAI
Custom API URL: /v1/chat/completions
Host: aiapi-pro.com
🤖
LobeChat
Modern AI chat framework.
App Settings → Language Model
OpenAI Proxy URL: https://aiapi-pro.com/v1
🧱
Dify
LLMOps workflow & agent platform.
Model Provider → OpenAI-API-compatible
API endpoint: https://aiapi-pro.com/v1
🌐
Open WebUI
Self-hosted ChatGPT-style web UI.
Admin Panel → Connections
OpenAI API Base URL: https://aiapi-pro.com/v1

Frequently Asked Questions

Quick answers to common questions. Can't find yours? Contact support.

Is NovAI really OpenAI-compatible?
Our /v1/chat/completions endpoint follows the OpenAI-compatible request and response format for supported features. Set the base URL to https://aiapi-pro.com/v1. Feature support varies by model; the Responses endpoint and media endpoints have their own documented behavior.
How is pricing calculated?
Every price is generated from the current NovAI billing configuration. Billing units vary by model and may be per token, image, generation, second, character or task. Token-based media examples are reference estimates; final charges use actual usage. See each model page for the applicable unit, rate and formula.
What payment methods are supported?
Credit card (Visa/Mastercard/UnionPay), Alipay where available, and TRC20-USDT. Payment availability and minimum amounts vary by method and are shown at checkout.
Are the free image & video models watermarked?
Free models (cogview-3-flash image, cogvideox-flash video) are open to the public API with any API key — no top-up required. Output generated on a never-topped-up account carries a NovAI watermark; once your account has any completed top-up, free-model output is clean and watermark-free.
What is the rate limit?
Never-topped-up accounts run at 5 requests per minute with daily free-model caps. Accounts with a completed top-up do not have a fixed NovAI-side request-rate cap, but provider throttling and security controls can still apply. See Rate Limits for details.
Do you store my prompts or responses?
We log request metadata for billing and abuse detection. Limited prompt/response content may be retained for trial security review, diagnostics or support, including some media requests. We do not use request content to train models. See the Privacy Policy.
How do I get a refund?
Refund eligibility for unused balance is governed by the Refund Policy and applicable consumer rights. Contact support with your order details.
Can I use NovAI for commercial products?
Yes. Commercial use is permitted under our Terms of Service. You retain full ownership of your prompts, responses, and any derivative content.
How does the affiliate program work?
Share your referral link, earn commission on every paid top-up by your referrals. See the page to get your link.
Zhipu AI model provider Volcano Engine model provider Tencent Cloud model provider
Further reading: using Chinese AI APIs from outside China · switching from OpenAI — drop-in migration guide

All 116 models with current NovAI billing rates in one table: NovAI model billing guide.