# Compare multiple chat models Source: https://docs.ninjachat.ai/api-reference/compare-multiple-chat-models /openapi.json post /compare # Create a chat completion Source: https://docs.ninjachat.ai/api-reference/create-a-chat-completion /openapi.json post /chat/completions OpenAI-compatible chat completions with ordered model fallbacks and provider routing policy. Pass model "@slug" to run a saved preset you own — the preset supplies models, prompt, tools, and routing; send only messages. # Create a chat completion (legacy path) Source: https://docs.ninjachat.ai/api-reference/create-a-chat-completion-legacy-path /openapi.json post /chat Backward-compatible path for /chat/completions, including historical field spellings and session memory. # Create a chat session Source: https://docs.ninjachat.ai/api-reference/create-a-chat-session /openapi.json post /sessions # Create a multimodal pipeline Source: https://docs.ninjachat.ai/api-reference/create-a-multimodal-pipeline /openapi.json post /pipelines Run up to five dependent chat, image and video steps as one durable async job. # Create a stateless response Source: https://docs.ninjachat.ai/api-reference/create-a-stateless-response /openapi.json post /responses OpenAI Responses-compatible text, vision, structured-output, and function-calling API. Set stream=true for typed lifecycle events. # Create a video job Source: https://docs.ninjachat.ai/api-reference/create-a-video-job /openapi.json post /videos Submit an async video job. Poll GET /videos/{id}, or register a signed webhook (POST /webhooks or https://www.ninjachat.ai/developers/webhooks) for video.completed / video.failed. # Create a video job (legacy path) Source: https://docs.ninjachat.ai/api-reference/create-a-video-job-legacy-path /openapi.json post /video Backward-compatible alias of /videos. # Create a webhook Source: https://docs.ninjachat.ai/api-reference/create-a-webhook /openapi.json post /webhooks Register an HTTPS URL. NinjaChat POSTs signed JSON for video and pipeline completion, budget.alert (50/80/100% of a spend limit), and balance.low (prepaid $5/$1). The signing secret is returned once. Console: https://www.ninjachat.ai/developers/webhooks # Delete a chat session Source: https://docs.ninjachat.ai/api-reference/delete-a-chat-session /openapi.json delete /sessions/{id} # Delete a webhook Source: https://docs.ninjachat.ai/api-reference/delete-a-webhook /openapi.json delete /webhooks # Estimate request cost Source: https://docs.ninjachat.ai/api-reference/estimate-request-cost /openapi.json post /estimate Public pre-flight estimate; does not deduct credits. # Export a chat session Source: https://docs.ninjachat.ai/api-reference/export-a-chat-session /openapi.json get /sessions/{id}/export # Generate images Source: https://docs.ninjachat.ai/api-reference/generate-images /openapi.json post /images/generations # Generate images (legacy path) Source: https://docs.ninjachat.ai/api-reference/generate-images-legacy-path /openapi.json post /images Backward-compatible alias of /images/generations. # Get a chat session Source: https://docs.ninjachat.ai/api-reference/get-a-chat-session /openapi.json get /sessions/{id} # Get a live model Source: https://docs.ninjachat.ai/api-reference/get-a-live-model /openapi.json get /models/{id} # Get a multimodal pipeline Source: https://docs.ninjachat.ai/api-reference/get-a-multimodal-pipeline /openapi.json get /pipelines/{id} # Get a request trace Source: https://docs.ninjachat.ai/api-reference/get-a-request-trace /openapi.json get /requests/{id} # Get a video job Source: https://docs.ninjachat.ai/api-reference/get-a-video-job /openapi.json get /videos/{id} Poll job status until completed or failed. Prefer a webhook if you do not want to poll. # Get a video job (legacy path) Source: https://docs.ninjachat.ai/api-reference/get-a-video-job-legacy-path /openapi.json get /video/status Query-string compatibility endpoint for /videos/{id}. # Get balance Source: https://docs.ninjachat.ai/api-reference/get-balance /openapi.json get /balance # Get gateway health Source: https://docs.ninjachat.ai/api-reference/get-gateway-health /openapi.json get /health # Get model battle rankings Source: https://docs.ninjachat.ai/api-reference/get-model-battle-rankings /openapi.json get /battles # Get public network statistics Source: https://docs.ninjachat.ai/api-reference/get-public-network-statistics /openapi.json get /network # Get the live price sheet Source: https://docs.ninjachat.ai/api-reference/get-the-live-price-sheet /openapi.json get /pricing Public prices generated from the same tables used by billing. # Get this OpenAPI document Source: https://docs.ninjachat.ai/api-reference/get-this-openapi-document /openapi.json get /openapi # Get usage Source: https://docs.ninjachat.ai/api-reference/get-usage /openapi.json get /usage # List live models Source: https://docs.ninjachat.ai/api-reference/list-live-models /openapi.json get /models # List webhook deliveries Source: https://docs.ninjachat.ai/api-reference/list-webhook-deliveries /openapi.json get /webhooks/deliveries Recent delivery attempts for one endpoint, newest first. # List webhooks Source: https://docs.ninjachat.ai/api-reference/list-webhooks /openapi.json get /webhooks List HTTPS endpoints registered for video completion and spend-alert callbacks. Console: https://www.ninjachat.ai/developers/webhooks # Claude Fable 5 Source: https://docs.ninjachat.ai/api-reference/models/chat/claude-fable-5 claude-fable-5 on NinjaChat — Anthropic's Fable 5 for long-running agents, deep research, and complex multimodal work with a 1M-token context. $10.00 / MTok input, $50.00 / MTok output. `claude-fable-5` Anthropic — served by Anthropic, DeepInfra, GMI Cloud 1,000,000-token context window · 128,000 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Anthropic's Fable 5 for long-running agents, deep research, and complex multimodal work with a 1M-token context. ## Pricing | Input | Output | Cached input | Cache write | | :------------- | :------------- | :------------ | :------------- | | \$10.00 / MTok | \$50.00 / MTok | \$1.00 / MTok | \$12.50 / MTok | Typical request (5K input / 1K output tokens): \~\$0.10. Billing is metered per token. Prices are live at `GET /api/v1/models/claude-fable-5`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "claude-fable-5", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="claude-fable-5", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"claude-fable-5","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `claude-fable-5` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `claude-fable-5` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "claude-fable-5" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("claude-fable-5"); if (!model.servable) throw new Error("claude-fable-5 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Claude Fable 5.1 Source: https://docs.ninjachat.ai/api-reference/models/chat/claude-fable-5-1 claude-fable-5.1 on NinjaChat — Anthropic's Mythos-class Claude Fable 5.1 for hours-long, multi-application agent work. $10.00 / MTok input, $50.00 / MTok output. `claude-fable-5.1` Anthropic 1,000,000-token context window · 128,000 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Anthropic's Mythos-class Claude Fable 5.1 for hours-long, multi-application agent work. ## Pricing | Input | Output | Cached input | Cache write | | :------------- | :------------- | :------------ | :------------- | | \$10.00 / MTok | \$50.00 / MTok | \$0.25 / MTok | \$12.50 / MTok | Typical request (5K input / 1K output tokens): \~\$0.10. Billing is metered per token. Prices are live at `GET /api/v1/models/claude-fable-5.1`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "claude-fable-5.1", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="claude-fable-5.1", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"claude-fable-5.1","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `claude-fable-5.1` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `claude-fable-5.1` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "claude-fable-5.1" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("claude-fable-5.1"); if (!model.servable) throw new Error("claude-fable-5.1 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Claude Haiku 4.5 Source: https://docs.ninjachat.ai/api-reference/models/chat/claude-haiku-4-5 claude-haiku-4.5 on NinjaChat — Anthropic's Haiku 4.5 with vision, tools, extended thinking, and a 64K output ceiling. $1.00 / MTok input, $5.00 / MTok output. `claude-haiku-4.5` Anthropic — served by Anthropic, DeepInfra, GMI Cloud 200,000-token context window · 64,000 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Anthropic's Haiku 4.5 with vision, tools, extended thinking, and a 64K output ceiling. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$1.00 / MTok | \$5.00 / MTok | \$0.10 / MTok | \$1.25 / MTok | Typical request (5K input / 1K output tokens): \~\$0.01. Billing is metered per token. Prices are live at `GET /api/v1/models/claude-haiku-4.5`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "claude-haiku-4.5", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="claude-haiku-4.5", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"claude-haiku-4.5","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `claude-haiku-4.5` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `claude-haiku-4.5` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "claude-haiku-4.5" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("claude-haiku-4.5"); if (!model.servable) throw new Error("claude-haiku-4.5 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Claude Opus 4.6 Source: https://docs.ninjachat.ai/api-reference/models/chat/claude-opus-4-6 claude-opus-4.6 on NinjaChat — Anthropic's Opus 4.6 for deep analysis and complex coding. $5.00 / MTok input, $25.00 / MTok output. `claude-opus-4.6` Anthropic — served by Anthropic, GMI Cloud 200,000-token context window · 8,192 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context Anthropic's Opus 4.6 for deep analysis and complex coding. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------- | :------------ | :------------ | | \$5.00 / MTok | \$25.00 / MTok | \$0.50 / MTok | \$6.25 / MTok | Typical request (5K input / 1K output tokens): \~\$0.05. Billing is metered per token. Prices are live at `GET /api/v1/models/claude-opus-4.6`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "claude-opus-4.6", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="claude-opus-4.6", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"claude-opus-4.6","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `claude-opus-4.6` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `claude-opus-4.6` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "claude-opus-4.6" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("claude-opus-4.6"); if (!model.servable) throw new Error("claude-opus-4.6 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Claude Opus 4.7 Source: https://docs.ninjachat.ai/api-reference/models/chat/claude-opus-4-7 claude-opus-4.7 on NinjaChat — Anthropic's Opus 4.7 for complex analysis, coding, multimodal work, and tool use. $5.00 / MTok input, $25.00 / MTok output. `claude-opus-4.7` Anthropic — served by Anthropic, DeepInfra, GMI Cloud 409,600-token context window · 32,768 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Anthropic's Opus 4.7 for complex analysis, coding, multimodal work, and tool use. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------- | :------------ | :------------ | | \$5.00 / MTok | \$25.00 / MTok | \$0.50 / MTok | \$5.00 / MTok | Typical request (5K input / 1K output tokens): \~\$0.05. Billing is metered per token. Prices are live at `GET /api/v1/models/claude-opus-4.7`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "claude-opus-4.7", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="claude-opus-4.7", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"claude-opus-4.7","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `claude-opus-4.7` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `claude-opus-4.7` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "claude-opus-4.7" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("claude-opus-4.7"); if (!model.servable) throw new Error("claude-opus-4.7 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Claude Opus 4.8 Source: https://docs.ninjachat.ai/api-reference/models/chat/claude-opus-4-8 claude-opus-4.8 on NinjaChat — Anthropic's Opus 4.8 for deep reasoning, coding, visual analysis, and long-horizon agents. $5.00 / MTok input, $25.00 / MTok output. `claude-opus-4.8` Anthropic — served by Anthropic, DeepInfra, GMI Cloud 1,000,000-token context window · 128,000 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Anthropic's Opus 4.8 for deep reasoning, coding, visual analysis, and long-horizon agents. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------- | :------------ | :------------ | | \$5.00 / MTok | \$25.00 / MTok | \$0.50 / MTok | \$5.00 / MTok | Typical request (5K input / 1K output tokens): \~\$0.05. Billing is metered per token. Prices are live at `GET /api/v1/models/claude-opus-4.8`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "claude-opus-4.8", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="claude-opus-4.8", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"claude-opus-4.8","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `claude-opus-4.8` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `claude-opus-4.8` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "claude-opus-4.8" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("claude-opus-4.8"); if (!model.servable) throw new Error("claude-opus-4.8 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Claude Opus 5 Source: https://docs.ninjachat.ai/api-reference/models/chat/claude-opus-5 claude-opus-5 on NinjaChat — Anthropic's Opus 5 for complex agentic coding and enterprise knowledge work. $5.00 / MTok input, $25.00 / MTok output. `claude-opus-5` Anthropic — served by Anthropic, DeepInfra, GMI Cloud 1,000,000-token context window · 128,000 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Anthropic's Opus 5 for complex agentic coding and enterprise knowledge work. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------- | :------------ | :------------ | | \$5.00 / MTok | \$25.00 / MTok | \$0.50 / MTok | \$6.25 / MTok | Typical request (5K input / 1K output tokens): \~\$0.05. Billing is metered per token. Prices are live at `GET /api/v1/models/claude-opus-5`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "claude-opus-5", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="claude-opus-5", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"claude-opus-5","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `claude-opus-5` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `claude-opus-5` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "claude-opus-5" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("claude-opus-5"); if (!model.servable) throw new Error("claude-opus-5 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Claude Sonnet 4.5 Source: https://docs.ninjachat.ai/api-reference/models/chat/claude-sonnet-4-5 claude-sonnet-4.5 on NinjaChat — Anthropic's Sonnet 4.5 — strong at code and analysis. $3.00 / MTok input, $15.00 / MTok output. `claude-sonnet-4.5` Anthropic 200,000-token context window · 8,192 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning Anthropic's Sonnet 4.5 — strong at code and analysis. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------- | :------------ | :------------ | | \$3.00 / MTok | \$15.00 / MTok | \$0.30 / MTok | \$3.75 / MTok | Typical request (5K input / 1K output tokens): \~\$0.03. Billing is metered per token. Prices are live at `GET /api/v1/models/claude-sonnet-4.5`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "claude-sonnet-4.5", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="claude-sonnet-4.5", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"claude-sonnet-4.5","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `claude-sonnet-4.5` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `claude-sonnet-4.5` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "claude-sonnet-4.5" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("claude-sonnet-4.5"); if (!model.servable) throw new Error("claude-sonnet-4.5 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Claude Sonnet 4.6 Source: https://docs.ninjachat.ai/api-reference/models/chat/claude-sonnet-4-6 claude-sonnet-4.6 on NinjaChat — Anthropic's Sonnet 4.6 — strong code and reasoning at mid-tier cost. $3.00 / MTok input, $15.00 / MTok output. `claude-sonnet-4.6` Anthropic — served by Anthropic, DeepInfra 200,000-token context window · 8,192 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context Anthropic's Sonnet 4.6 — strong code and reasoning at mid-tier cost. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------- | :------------ | :------------ | | \$3.00 / MTok | \$15.00 / MTok | \$0.30 / MTok | \$3.75 / MTok | Typical request (5K input / 1K output tokens): \~\$0.03. Billing is metered per token. Prices are live at `GET /api/v1/models/claude-sonnet-4.6`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "claude-sonnet-4.6", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="claude-sonnet-4.6", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"claude-sonnet-4.6","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `claude-sonnet-4.6` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `claude-sonnet-4.6` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "claude-sonnet-4.6" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("claude-sonnet-4.6"); if (!model.servable) throw new Error("claude-sonnet-4.6 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Claude Sonnet 5 Source: https://docs.ninjachat.ai/api-reference/models/chat/claude-sonnet-5 claude-sonnet-5 on NinjaChat — Anthropic's frontier Sonnet for coding and agents, with a native 1M context window. $2.00 / MTok input, $10.00 / MTok output. `claude-sonnet-5` Anthropic — served by Anthropic, DeepInfra, GMI Cloud 1,000,000-token context window · 128,000 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Anthropic's frontier Sonnet for coding and agents, with a native 1M context window. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------- | :------------ | :------------ | | \$2.00 / MTok | \$10.00 / MTok | \$0.20 / MTok | \$2.50 / MTok | Typical request (5K input / 1K output tokens): \~\$0.02. Billing is metered per token. Prices are live at `GET /api/v1/models/claude-sonnet-5`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "claude-sonnet-5", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="claude-sonnet-5", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"claude-sonnet-5","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `claude-sonnet-5` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `claude-sonnet-5` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "claude-sonnet-5" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("claude-sonnet-5"); if (!model.servable) throw new Error("claude-sonnet-5 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Codestral 2508 Source: https://docs.ninjachat.ai/api-reference/models/chat/codestral-2508 codestral-2508 on NinjaChat — Mistral's low-latency coding model for chat generation, function calling, and repository-scale context. $0.30 / MTok input, $0.90 / MTok output. `codestral-2508` Mistral AI — served by Mistral 256,000-token context window · 65,536 max output tokens Streaming, JSON mode, Tool calling, Long context, Multilingual Mistral's low-latency coding model for chat generation, function calling, and repository-scale context. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.30 / MTok | \$0.90 / MTok | \$0.03 / MTok | \$0.30 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0024. Billing is metered per token. Prices are live at `GET /api/v1/models/codestral-2508`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "codestral-2508", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="codestral-2508", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"codestral-2508","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `codestral-2508` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `codestral-2508` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "codestral-2508" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("codestral-2508"); if (!model.servable) throw new Error("codestral-2508 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Command A Source: https://docs.ninjachat.ai/api-reference/models/chat/command-a command-a on NinjaChat — Cohere's high-capability enterprise model for agents, retrieval, tool use, and multilingual production workloads. $2.50 / MTok input, $10.00 / MTok output. `command-a` Cohere 256,000-token context window · 32,000 max output tokens Streaming, JSON mode, Tool calling, Long context, Multilingual Cohere's high-capability enterprise model for agents, retrieval, tool use, and multilingual production workloads. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------- | :------------ | :------------ | | \$2.50 / MTok | \$10.00 / MTok | \$0.25 / MTok | \$2.50 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0225. Billing is metered per token. Prices are live at `GET /api/v1/models/command-a`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "command-a", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="command-a", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"command-a","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `command-a` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `command-a` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "command-a" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("command-a"); if (!model.servable) throw new Error("command-a is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Command R Source: https://docs.ninjachat.ai/api-reference/models/chat/command-r command-r on NinjaChat — Cohere's balanced enterprise model for long-context retrieval, structured work, and multilingual tool use. $0.15 / MTok input, $0.60 / MTok output. `command-r` Cohere 128,000-token context window · 4,000 max output tokens Streaming, JSON mode, Tool calling, Long context, Multilingual Cohere's balanced enterprise model for long-context retrieval, structured work, and multilingual tool use. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.15 / MTok | \$0.60 / MTok | \$0.015 / MTok | \$0.15 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0014. Billing is metered per token. Prices are live at `GET /api/v1/models/command-r`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "command-r", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="command-r", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"command-r","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `command-r` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `command-r` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "command-r" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("command-r"); if (!model.servable) throw new Error("command-r is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Command R7B Source: https://docs.ninjachat.ai/api-reference/models/chat/command-r7b command-r7b on NinjaChat — Cohere's compact Command R model for inexpensive, latency-sensitive agents, retrieval, and multilingual work. $0.0375 / MTok input, $0.15 / MTok output. `command-r7b` Cohere 128,000-token context window · 4,000 max output tokens Streaming, JSON mode, Tool calling, Long context, Multilingual Cohere's compact Command R model for inexpensive, latency-sensitive agents, retrieval, and multilingual work. ## Pricing | Input | Output | Cached input | Cache write | | :-------------- | :------------ | :-------------- | :-------------- | | \$0.0375 / MTok | \$0.15 / MTok | \$0.0037 / MTok | \$0.0375 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0004. Billing is metered per token. Prices are live at `GET /api/v1/models/command-r7b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "command-r7b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="command-r7b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"command-r7b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `command-r7b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `command-r7b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "command-r7b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("command-r7b"); if (!model.servable) throw new Error("command-r7b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # DeepSeek R1 0528 Source: https://docs.ninjachat.ai/api-reference/models/chat/deepseek-r1-0528 deepseek-r1-0528 on NinjaChat — DeepSeek's open R1 reasoning model (May 2025 update) for deep reasoning, mathematics, and research agents. $0.57 / MTok input, $2.29 / MTok output. `deepseek-r1-0528` DeepSeek — served by GMI Cloud, DeepInfra, io.net Intelligence 163,840-token context window · 32,768 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context, Multilingual DeepSeek's open R1 reasoning model (May 2025 update) for deep reasoning, mathematics, and research agents. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.57 / MTok | \$2.29 / MTok | \$0.057 / MTok | \$0.57 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0052. Billing is metered per token. Prices are live at `GET /api/v1/models/deepseek-r1-0528`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "deepseek-r1-0528", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="deepseek-r1-0528", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"deepseek-r1-0528","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `deepseek-r1-0528` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `deepseek-r1-0528` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "deepseek-r1-0528" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("deepseek-r1-0528"); if (!model.servable) throw new Error("deepseek-r1-0528 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # DeepSeek V3 Source: https://docs.ninjachat.ai/api-reference/models/chat/deepseek-v3 deepseek-v3 on NinjaChat — DeepSeek's non-reasoning V3 model for coding, math, and budget tool agents. $1.74 / MTok input, $3.48 / MTok output. `deepseek-v3` DeepSeek — served by DeepInfra 163,840-token context window · 8,192 max output tokens Streaming, JSON mode, Multilingual DeepSeek's non-reasoning V3 model for coding, math, and budget tool agents. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$1.74 / MTok | \$3.48 / MTok | \$0.174 / MTok | \$1.74 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0122. Billing is metered per token. Prices are live at `GET /api/v1/models/deepseek-v3`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "deepseek-v3", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="deepseek-v3", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"deepseek-v3","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `deepseek-v3` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `deepseek-v3` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "deepseek-v3" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("deepseek-v3"); if (!model.servable) throw new Error("deepseek-v3 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # DeepSeek V3 0324 Source: https://docs.ninjachat.ai/api-reference/models/chat/deepseek-v3-0324 deepseek-v3-0324 on NinjaChat — DeepSeek's stable March 2025 V3 snapshot for deterministic, non-reasoning workloads. $0.24 / MTok input, $0.90 / MTok output. `deepseek-v3-0324` DeepSeek — served by DeepInfra 163,840-token context window · 32,768 max output tokens Streaming, JSON mode, Tool calling, Long context, Multilingual DeepSeek's stable March 2025 V3 snapshot for deterministic, non-reasoning workloads. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.24 / MTok | \$0.90 / MTok | \$0.024 / MTok | \$0.24 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0021. Billing is metered per token. Prices are live at `GET /api/v1/models/deepseek-v3-0324`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "deepseek-v3-0324", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="deepseek-v3-0324", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"deepseek-v3-0324","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `deepseek-v3-0324` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `deepseek-v3-0324` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "deepseek-v3-0324" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("deepseek-v3-0324"); if (!model.servable) throw new Error("deepseek-v3-0324 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # DeepSeek V3.1 Source: https://docs.ninjachat.ai/api-reference/models/chat/deepseek-v3-1 deepseek-v3.1 on NinjaChat — DeepSeek's hybrid instruct model served in deterministic non-thinking mode for fast coding, JSON, and tools. $0.25 / MTok input, $0.95 / MTok output. `deepseek-v3.1` DeepSeek — served by DeepInfra 163,840-token context window · 32,768 max output tokens Streaming, JSON mode, Tool calling, Long context, Multilingual DeepSeek's hybrid instruct model served in deterministic non-thinking mode for fast coding, JSON, and tools. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.25 / MTok | \$0.95 / MTok | \$0.13 / MTok | \$0.25 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0022. Billing is metered per token. Prices are live at `GET /api/v1/models/deepseek-v3.1`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "deepseek-v3.1", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="deepseek-v3.1", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"deepseek-v3.1","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `deepseek-v3.1` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `deepseek-v3.1` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "deepseek-v3.1" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("deepseek-v3.1"); if (!model.servable) throw new Error("deepseek-v3.1 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # DeepSeek V3.2 Source: https://docs.ninjachat.ai/api-reference/models/chat/deepseek-v3-2 deepseek-v3.2 on NinjaChat — DeepSeek's V3.2 general-purpose model for budget agents, coding, and reasoning. $0.56 / MTok input, $0.84 / MTok output. `deepseek-v3.2` DeepSeek — served by GMI Cloud, DeepInfra, DigitalOcean Inference, BytePlus (Ark), Novita AI 163,840-token context window · 65,536 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context, Multilingual DeepSeek's V3.2 general-purpose model for budget agents, coding, and reasoning. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.56 / MTok | \$0.84 / MTok | \$0.056 / MTok | \$0.56 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0037. Billing is metered per token. Prices are live at `GET /api/v1/models/deepseek-v3.2`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "deepseek-v3.2", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="deepseek-v3.2", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"deepseek-v3.2","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `deepseek-v3.2` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `deepseek-v3.2` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "deepseek-v3.2" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("deepseek-v3.2"); if (!model.servable) throw new Error("deepseek-v3.2 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # DeepSeek V4 Flash Source: https://docs.ninjachat.ai/api-reference/models/chat/deepseek-v4-flash deepseek-v4-flash on NinjaChat — DeepSeek's current V4 Flash release with a million-token context. $0.14 / MTok input, $0.28 / MTok output. `deepseek-v4-flash` DeepSeek — served by DeepInfra, DigitalOcean Inference, BytePlus (Ark), Atlas Cloud 1,048,576-token context window · 65,536 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context, Multilingual DeepSeek's current V4 Flash release with a million-token context. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.14 / MTok | \$0.28 / MTok | \$0.014 / MTok | \$0.14 / MTok | Typical request (5K input / 1K output tokens): \~\$0.001. Billing is metered per token. Prices are live at `GET /api/v1/models/deepseek-v4-flash`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "deepseek-v4-flash", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="deepseek-v4-flash", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `deepseek-v4-flash` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `deepseek-v4-flash` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "deepseek-v4-flash" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("deepseek-v4-flash"); if (!model.servable) throw new Error("deepseek-v4-flash is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # DeepSeek V4 Flash 0731 Source: https://docs.ninjachat.ai/api-reference/models/chat/deepseek-v4-flash-0731 deepseek-v4-flash-0731 on NinjaChat — DeepSeek's V4 Flash (July 31 build): fast, low-cost reasoning with a 1M-token context. $0.22 / MTok input, $0.66 / MTok output. `deepseek-v4-flash-0731` DeepSeek — served by Fireworks AI, DeepInfra, GMI Cloud, Baseten, DigitalOcean Inference, Tencent Cloud TokenHub, Morph, Chutes, Novita AI 1,048,576-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context DeepSeek's V4 Flash (July 31 build): fast, low-cost reasoning with a 1M-token context. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.22 / MTok | \$0.66 / MTok | \$0.007 / MTok | \$0.22 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0018. Billing is metered per token. Prices are live at `GET /api/v1/models/deepseek-v4-flash-0731`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "deepseek-v4-flash-0731", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="deepseek-v4-flash-0731", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"deepseek-v4-flash-0731","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `deepseek-v4-flash-0731` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `deepseek-v4-flash-0731` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "deepseek-v4-flash-0731" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("deepseek-v4-flash-0731"); if (!model.servable) throw new Error("deepseek-v4-flash-0731 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # DeepSeek V4 Pro Source: https://docs.ninjachat.ai/api-reference/models/chat/deepseek-v4-pro deepseek-v4-pro on NinjaChat — DeepSeek's current V4 Pro release for frontier coding and complex reasoning with a million-token context. $1.74 / MTok input, $3.48 / MTok output. `deepseek-v4-pro` DeepSeek — served by DeepInfra, Fireworks AI, Baseten, DigitalOcean Inference, BytePlus (Ark), Atlas Cloud, Tencent Cloud TokenHub 1,048,576-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context, Multilingual DeepSeek's current V4 Pro release for frontier coding and complex reasoning with a million-token context. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$1.74 / MTok | \$3.48 / MTok | \$0.174 / MTok | \$1.74 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0122. Billing is metered per token. Prices are live at `GET /api/v1/models/deepseek-v4-pro`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "deepseek-v4-pro", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="deepseek-v4-pro", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"deepseek-v4-pro","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `deepseek-v4-pro` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `deepseek-v4-pro` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "deepseek-v4-pro" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("deepseek-v4-pro"); if (!model.servable) throw new Error("deepseek-v4-pro is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # DeepSeek V4 Pro 0813 Source: https://docs.ninjachat.ai/api-reference/models/chat/deepseek-v4-pro-0813 deepseek-v4-pro-0813 on NinjaChat — DeepSeek's V4 Pro (August 13 build) for agentic coding and production reasoning with a 1M-token context. $1.32 / MTok input, $3.96 / MTok output. `deepseek-v4-pro-0813` DeepSeek — served by Fireworks AI, DeepInfra, GMI Cloud, Baseten, DigitalOcean Inference 1,048,576-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context DeepSeek's V4 Pro (August 13 build) for agentic coding and production reasoning with a 1M-token context. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$1.32 / MTok | \$3.96 / MTok | \$0.132 / MTok | \$1.32 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0106. Billing is metered per token. Prices are live at `GET /api/v1/models/deepseek-v4-pro-0813`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "deepseek-v4-pro-0813", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="deepseek-v4-pro-0813", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"deepseek-v4-pro-0813","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `deepseek-v4-pro-0813` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `deepseek-v4-pro-0813` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "deepseek-v4-pro-0813" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("deepseek-v4-pro-0813"); if (!model.servable) throw new Error("deepseek-v4-pro-0813 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Euryale 3.1 70B Source: https://docs.ninjachat.ai/api-reference/models/chat/euryale-70b euryale-70b on NinjaChat — Sao10K's Llama 3.1 70B creative model tuned for immersive dialogue and roleplay. $0.85 / MTok input, $0.85 / MTok output. `euryale-70b` Sao10K — served by DeepInfra 131,072-token context window · 16,384 max output tokens Streaming, JSON mode, Long context, Multilingual Sao10K's Llama 3.1 70B creative model tuned for immersive dialogue and roleplay. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.85 / MTok | \$0.85 / MTok | \$0.085 / MTok | \$0.85 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0051. Billing is metered per token. Prices are live at `GET /api/v1/models/euryale-70b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "euryale-70b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="euryale-70b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"euryale-70b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `euryale-70b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `euryale-70b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "euryale-70b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("euryale-70b"); if (!model.servable) throw new Error("euryale-70b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Gemini 2.5 Flash Source: https://docs.ninjachat.ai/api-reference/models/chat/gemini-2-5-flash gemini-2.5-flash on NinjaChat — Google's high-efficiency Gemini 2.5 Flash. $0.30 / MTok input, $2.50 / MTok output. `gemini-2.5-flash` Google — served by Google, DeepInfra 1,000,000-token context window · 8,192 max output tokens Streaming, JSON mode, Tool calling, Vision, Multilingual Google's high-efficiency Gemini 2.5 Flash. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.30 / MTok | \$2.50 / MTok | \$0.03 / MTok | \$0.30 / MTok | Typical request (5K input / 1K output tokens): \~\$0.004. Billing is metered per token. Prices are live at `GET /api/v1/models/gemini-2.5-flash`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gemini-2.5-flash", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gemini-2.5-flash", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gemini-2.5-flash","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gemini-2.5-flash` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gemini-2.5-flash` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gemini-2.5-flash" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gemini-2.5-flash"); if (!model.servable) throw new Error("gemini-2.5-flash is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Gemini 2.5 Pro Source: https://docs.ninjachat.ai/api-reference/models/chat/gemini-2-5-pro gemini-2.5-pro on NinjaChat — Google's Gemini 2.5 Pro for long documents and research with a 1M-token context. $1.25 / MTok input, $10.00 / MTok output. `gemini-2.5-pro` Google — served by Google, DeepInfra 1,000,000-token context window · 8,192 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Google's Gemini 2.5 Pro for long documents and research with a 1M-token context. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------- | :------------- | :------------ | | \$1.25 / MTok | \$10.00 / MTok | \$0.125 / MTok | \$1.25 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0163. Billing is metered per token. Prices are live at `GET /api/v1/models/gemini-2.5-pro`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gemini-2.5-pro", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gemini-2.5-pro", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gemini-2.5-pro","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gemini-2.5-pro` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gemini-2.5-pro` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gemini-2.5-pro" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gemini-2.5-pro"); if (!model.servable) throw new Error("gemini-2.5-pro is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Gemini 3.1 Flash Lite Source: https://docs.ninjachat.ai/api-reference/models/chat/gemini-3-1-flash-lite gemini-3.1-flash-lite on NinjaChat — Google's low-cost million-token Gemini 3.1 Flash Lite for high-volume multimodal work. $0.25 / MTok input, $1.50 / MTok output. `gemini-3.1-flash-lite` Google — served by GMI Cloud, DeepInfra 1,000,000-token context window · 65,536 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Google's low-cost million-token Gemini 3.1 Flash Lite for high-volume multimodal work. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.25 / MTok | \$1.50 / MTok | \$0.025 / MTok | \$0.25 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0028. Billing is metered per token. Prices are live at `GET /api/v1/models/gemini-3.1-flash-lite`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gemini-3.1-flash-lite", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gemini-3.1-flash-lite", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gemini-3.1-flash-lite","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gemini-3.1-flash-lite` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gemini-3.1-flash-lite` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gemini-3.1-flash-lite" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gemini-3.1-flash-lite"); if (!model.servable) throw new Error("gemini-3.1-flash-lite is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Gemini 3.1 Pro Source: https://docs.ninjachat.ai/api-reference/models/chat/gemini-3-1-pro gemini-3.1-pro on NinjaChat — Google's Gemini 3.1 Pro — top-tier reasoning with a 1M-token context. $2.00 / MTok input, $12.00 / MTok output. `gemini-3.1-pro` Google — served by Google, DeepInfra 1,000,000-token context window · 8,192 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context Google's Gemini 3.1 Pro — top-tier reasoning with a 1M-token context. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------- | :------------ | :------------ | | \$2.00 / MTok | \$12.00 / MTok | \$0.20 / MTok | \$2.00 / MTok | Typical request (5K input / 1K output tokens): \~\$0.022. Billing is metered per token. Prices are live at `GET /api/v1/models/gemini-3.1-pro`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gemini-3.1-pro", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gemini-3.1-pro", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gemini-3.1-pro","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gemini-3.1-pro` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gemini-3.1-pro` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gemini-3.1-pro" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gemini-3.1-pro"); if (!model.servable) throw new Error("gemini-3.1-pro is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Gemini 3.5 Flash Source: https://docs.ninjachat.ai/api-reference/models/chat/gemini-3-5-flash gemini-3.5-flash on NinjaChat — Google's Gemini 3.5 Flash for multimodal agents, million-token analysis, and fast tool use. $1.50 / MTok input, $9.00 / MTok output. `gemini-3.5-flash` Google — served by GMI Cloud, DeepInfra 1,000,000-token context window · 65,536 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Google's Gemini 3.5 Flash for multimodal agents, million-token analysis, and fast tool use. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$1.50 / MTok | \$9.00 / MTok | \$0.15 / MTok | \$1.50 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0165. Billing is metered per token. Prices are live at `GET /api/v1/models/gemini-3.5-flash`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gemini-3.5-flash", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gemini-3.5-flash", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gemini-3.5-flash","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gemini-3.5-flash` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gemini-3.5-flash` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gemini-3.5-flash" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gemini-3.5-flash"); if (!model.servable) throw new Error("gemini-3.5-flash is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Gemini 3.5 Flash-Lite Source: https://docs.ninjachat.ai/api-reference/models/chat/gemini-3-5-flash-lite gemini-3.5-flash-lite on NinjaChat — Google's Gemini 3.5 Flash-Lite for high-volume, low-cost agentic and multimodal workloads. $0.30 / MTok input, $2.50 / MTok output. `gemini-3.5-flash-lite` Google — served by Google, GMI Cloud 1,048,576-token context window · 65,536 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Google's Gemini 3.5 Flash-Lite for high-volume, low-cost agentic and multimodal workloads. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.30 / MTok | \$2.50 / MTok | \$0.03 / MTok | \$0.30 / MTok | Typical request (5K input / 1K output tokens): \~\$0.004. Billing is metered per token. Prices are live at `GET /api/v1/models/gemini-3.5-flash-lite`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gemini-3.5-flash-lite", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gemini-3.5-flash-lite", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gemini-3.5-flash-lite","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gemini-3.5-flash-lite` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gemini-3.5-flash-lite` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gemini-3.5-flash-lite" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gemini-3.5-flash-lite"); if (!model.servable) throw new Error("gemini-3.5-flash-lite is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Gemini 3.6 Flash Source: https://docs.ninjachat.ai/api-reference/models/chat/gemini-3-6-flash gemini-3.6-flash on NinjaChat — Google's high-efficiency Gemini 3.6 Flash for multimodal coding, agentic workflows, and long-context analysis. $1.50 / MTok input, $7.50 / MTok output. `gemini-3.6-flash` Google — served by Google, GMI Cloud 1,048,576-token context window · 65,536 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Google's high-efficiency Gemini 3.6 Flash for multimodal coding, agentic workflows, and long-context analysis. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$1.50 / MTok | \$7.50 / MTok | \$0.15 / MTok | \$1.50 / MTok | Typical request (5K input / 1K output tokens): \~\$0.015. Billing is metered per token. Prices are live at `GET /api/v1/models/gemini-3.6-flash`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gemini-3.6-flash", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gemini-3.6-flash", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gemini-3.6-flash","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gemini-3.6-flash` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gemini-3.6-flash` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gemini-3.6-flash" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gemini-3.6-flash"); if (!model.servable) throw new Error("gemini-3.6-flash is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Gemini 3.7 Flash Source: https://docs.ninjachat.ai/api-reference/models/chat/gemini-3-7-flash gemini-3.7-flash on NinjaChat — Google's Gemini 3.7 Flash for coding, multimodal reasoning, and high-throughput agents. $1.50 / MTok input, $7.50 / MTok output. `gemini-3.7-flash` Google — served by Google, GMI Cloud, DeepInfra 1,048,576-token context window · 65,536 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Google's Gemini 3.7 Flash for coding, multimodal reasoning, and high-throughput agents. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$1.50 / MTok | \$7.50 / MTok | \$0.15 / MTok | \$1.50 / MTok | Typical request (5K input / 1K output tokens): \~\$0.015. Billing is metered per token. Prices are live at `GET /api/v1/models/gemini-3.7-flash`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gemini-3.7-flash", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gemini-3.7-flash", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gemini-3.7-flash","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gemini-3.7-flash` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gemini-3.7-flash` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gemini-3.7-flash" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gemini-3.7-flash"); if (!model.servable) throw new Error("gemini-3.7-flash is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Gemini 3.8 Flash Source: https://docs.ninjachat.ai/api-reference/models/chat/gemini-3-8-flash gemini-3.8-flash on NinjaChat — Google's Gemini 3.8 Flash for coding, multimodal reasoning, and high-throughput agents. $1.50 / MTok input, $7.50 / MTok output. `gemini-3.8-flash` Google — served by GMI Cloud 1,048,576-token context window · 65,536 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Google's Gemini 3.8 Flash for coding, multimodal reasoning, and high-throughput agents. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$1.50 / MTok | \$7.50 / MTok | \$0.15 / MTok | \$1.50 / MTok | Typical request (5K input / 1K output tokens): \~\$0.015. Billing is metered per token. Prices are live at `GET /api/v1/models/gemini-3.8-flash`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gemini-3.8-flash", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gemini-3.8-flash", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gemini-3.8-flash","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gemini-3.8-flash` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gemini-3.8-flash` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gemini-3.8-flash" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gemini-3.8-flash"); if (!model.servable) throw new Error("gemini-3.8-flash is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Gemini 3 Flash Source: https://docs.ninjachat.ai/api-reference/models/chat/gemini-3-flash gemini-3-flash on NinjaChat — Google's Gemini 3 Flash with a 1M-token context window. $0.50 / MTok input, $3.00 / MTok output. `gemini-3-flash` Google 1,000,000-token context window · 8,192 max output tokens Streaming, JSON mode, Vision, Multilingual Google's Gemini 3 Flash with a 1M-token context window. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.50 / MTok | \$3.00 / MTok | \$0.05 / MTok | \$0.50 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0055. Billing is metered per token. Prices are live at `GET /api/v1/models/gemini-3-flash`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gemini-3-flash", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gemini-3-flash", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gemini-3-flash","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `response_format`, `image_url content parts` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gemini-3-flash` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gemini-3-flash` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gemini-3-flash" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gemini-3-flash"); if (!model.servable) throw new Error("gemini-3-flash is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Gemini 3 Pro Source: https://docs.ninjachat.ai/api-reference/models/chat/gemini-3-pro gemini-3-pro on NinjaChat — Google's Gemini 3 Pro for reasoning, coding, and multimodal work. $2.00 / MTok input, $12.00 / MTok output. `gemini-3-pro` Google — served by Google, DeepInfra 1,000,000-token context window · 8,192 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Google's Gemini 3 Pro for reasoning, coding, and multimodal work. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------- | :------------ | :------------ | | \$2.00 / MTok | \$12.00 / MTok | \$0.20 / MTok | \$2.00 / MTok | Typical request (5K input / 1K output tokens): \~\$0.022. Billing is metered per token. Prices are live at `GET /api/v1/models/gemini-3-pro`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gemini-3-pro", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gemini-3-pro", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gemini-3-pro","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gemini-3-pro` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gemini-3-pro` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gemini-3-pro" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gemini-3-pro"); if (!model.servable) throw new Error("gemini-3-pro is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Gemma 3 12B Source: https://docs.ninjachat.ai/api-reference/models/chat/gemma-3-12b gemma-3-12b on NinjaChat — Google's compact multimodal Gemma 3 model for inexpensive vision and tool workloads. $0.05 / MTok input, $0.15 / MTok output. `gemma-3-12b` Google — served by DeepInfra 131,072-token context window · 32,768 max output tokens Streaming, Tool calling, Vision, Long context, Multilingual Google's compact multimodal Gemma 3 model for inexpensive vision and tool workloads. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.05 / MTok | \$0.15 / MTok | \$0.005 / MTok | \$0.05 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0004. Billing is metered per token. Prices are live at `GET /api/v1/models/gemma-3-12b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gemma-3-12b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gemma-3-12b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gemma-3-12b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `image_url content parts` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gemma-3-12b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gemma-3-12b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gemma-3-12b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gemma-3-12b"); if (!model.servable) throw new Error("gemma-3-12b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Gemma 3 27B Source: https://docs.ninjachat.ai/api-reference/models/chat/gemma-3-27b gemma-3-27b on NinjaChat — Google's larger open Gemma 3 model with reliable tool and JSON support. $0.08 / MTok input, $0.16 / MTok output. `gemma-3-27b` Google — served by DeepInfra 131,072-token context window · 32,768 max output tokens Streaming, JSON mode, Tool calling, Long context, Multilingual Google's larger open Gemma 3 model with reliable tool and JSON support. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.08 / MTok | \$0.16 / MTok | \$0.008 / MTok | \$0.08 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0006. Billing is metered per token. Prices are live at `GET /api/v1/models/gemma-3-27b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gemma-3-27b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gemma-3-27b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gemma-3-27b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gemma-3-27b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gemma-3-27b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gemma-3-27b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gemma-3-27b"); if (!model.servable) throw new Error("gemma-3-27b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Gemma 3 4B Source: https://docs.ninjachat.ai/api-reference/models/chat/gemma-3-4b gemma-3-4b on NinjaChat — Google's efficient open 4B multimodal model with tools and structured outputs. $0.05 / MTok input, $0.10 / MTok output. `gemma-3-4b` Google — served by DeepInfra 131,072-token context window · 32,768 max output tokens Streaming, JSON mode, Tool calling, Vision, Long context, Multilingual Google's efficient open 4B multimodal model with tools and structured outputs. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.05 / MTok | \$0.10 / MTok | \$0.005 / MTok | \$0.05 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0004. Billing is metered per token. Prices are live at `GET /api/v1/models/gemma-3-4b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gemma-3-4b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gemma-3-4b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gemma-3-4b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gemma-3-4b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gemma-3-4b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gemma-3-4b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gemma-3-4b"); if (!model.servable) throw new Error("gemma-3-4b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Gemma 4 26B A4B Source: https://docs.ninjachat.ai/api-reference/models/chat/gemma-4-26b-a4b gemma-4-26b-a4b on NinjaChat — Google's sparse Gemma 4 variant with 4B active parameters for efficient multimodal reasoning. $0.13 / MTok input, $0.40 / MTok output. `gemma-4-26b-a4b` Google — served by DeepInfra, GMI Cloud, io.net Intelligence 256,000-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Google's sparse Gemma 4 variant with 4B active parameters for efficient multimodal reasoning. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.13 / MTok | \$0.40 / MTok | \$0.013 / MTok | \$0.13 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0011. Billing is metered per token. Prices are live at `GET /api/v1/models/gemma-4-26b-a4b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gemma-4-26b-a4b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gemma-4-26b-a4b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gemma-4-26b-a4b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gemma-4-26b-a4b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gemma-4-26b-a4b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gemma-4-26b-a4b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gemma-4-26b-a4b"); if (!model.servable) throw new Error("gemma-4-26b-a4b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Gemma 4 31B Source: https://docs.ninjachat.ai/api-reference/models/chat/gemma-4-31b gemma-4-31b on NinjaChat — Google's popular open multimodal model with native reasoning and function calling. $0.18 / MTok input, $0.50 / MTok output. `gemma-4-31b` Google — served by DeepInfra, GMI Cloud, DigitalOcean Inference, Morph, Chutes 262,144-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Google's popular open multimodal model with native reasoning and function calling. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.18 / MTok | \$0.50 / MTok | \$0.018 / MTok | \$0.18 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0014. Billing is metered per token. Prices are live at `GET /api/v1/models/gemma-4-31b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gemma-4-31b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gemma-4-31b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gemma-4-31b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gemma-4-31b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gemma-4-31b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gemma-4-31b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gemma-4-31b"); if (!model.servable) throw new Error("gemma-4-31b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Gemma 4 31B Turbo Source: https://docs.ninjachat.ai/api-reference/models/chat/gemma-4-31b-turbo gemma-4-31b-turbo on NinjaChat — Google's Gemma 4 31B in a low-latency Turbo serving tier with multimodal input and function calling. $0.09 / MTok input, $0.34 / MTok output. `gemma-4-31b-turbo` Google — served by DeepInfra 262,144-token context window · 16,384 max output tokens Streaming, Tool calling, Vision, Reasoning, Long context, Multilingual Google's Gemma 4 31B in a low-latency Turbo serving tier with multimodal input and function calling. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.09 / MTok | \$0.34 / MTok | \$0.009 / MTok | \$0.09 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0008. Billing is metered per token. Prices are live at `GET /api/v1/models/gemma-4-31b-turbo`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gemma-4-31b-turbo", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gemma-4-31b-turbo", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gemma-4-31b-turbo","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gemma-4-31b-turbo` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gemma-4-31b-turbo` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gemma-4-31b-turbo" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gemma-4-31b-turbo"); if (!model.servable) throw new Error("gemma-4-31b-turbo is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Gemma 4 31B Ultra Source: https://docs.ninjachat.ai/api-reference/models/chat/gemma-4-31b-ultra gemma-4-31b-ultra on NinjaChat — Google's Gemma 4 31B in a higher-accuracy Ultra serving tier for reasoning and tool-driven text workloads. $0.27 / MTok input, $0.76 / MTok output. `gemma-4-31b-ultra` Google — served by DeepInfra 131,072-token context window · 65,536 max output tokens Streaming, Tool calling, Reasoning, Long context, Multilingual Google's Gemma 4 31B in a higher-accuracy Ultra serving tier for reasoning and tool-driven text workloads. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.27 / MTok | \$0.76 / MTok | \$0.027 / MTok | \$0.27 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0022. Billing is metered per token. Prices are live at `GET /api/v1/models/gemma-4-31b-ultra`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gemma-4-31b-ultra", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gemma-4-31b-ultra", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gemma-4-31b-ultra","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gemma-4-31b-ultra` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gemma-4-31b-ultra` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gemma-4-31b-ultra" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gemma-4-31b-ultra"); if (!model.servable) throw new Error("gemma-4-31b-ultra is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Gemma 4 E4B Source: https://docs.ninjachat.ai/api-reference/models/chat/gemma-4-e4b gemma-4-e4b on NinjaChat — Google's tiny Gemma 4 E4B model with long-context reasoning and reliable tool calling. $0.02 / MTok input, $0.10 / MTok output. `gemma-4-e4b` Google — served by DeepInfra 131,072-token context window · 32,768 max output tokens Streaming, Tool calling, Reasoning, Long context, Multilingual Google's tiny Gemma 4 E4B model with long-context reasoning and reliable tool calling. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.02 / MTok | \$0.10 / MTok | \$0.002 / MTok | \$0.02 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0002. Billing is metered per token. Prices are live at `GET /api/v1/models/gemma-4-e4b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gemma-4-e4b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gemma-4-e4b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gemma-4-e4b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gemma-4-e4b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gemma-4-e4b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gemma-4-e4b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gemma-4-e4b"); if (!model.servable) throw new Error("gemma-4-e4b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GLM 4.6 Source: https://docs.ninjachat.ai/api-reference/models/chat/glm-4-6 glm-4.6 on NinjaChat — Z.ai's efficient bilingual reasoning and coding model with structured tool support. $0.50 / MTok input, $2.00 / MTok output. `glm-4.6` Z.ai — served by DeepInfra 202,752-token context window · 65,536 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context, Multilingual Z.ai's efficient bilingual reasoning and coding model with structured tool support. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.50 / MTok | \$2.00 / MTok | \$0.05 / MTok | \$0.50 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0045. Billing is metered per token. Prices are live at `GET /api/v1/models/glm-4.6`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "glm-4.6", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="glm-4.6", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"glm-4.6","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `glm-4.6` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `glm-4.6` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "glm-4.6" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("glm-4.6"); if (!model.servable) throw new Error("glm-4.6 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GLM 4.7 Source: https://docs.ninjachat.ai/api-reference/models/chat/glm-4-7 glm-4.7 on NinjaChat — Z.ai's full GLM 4.7 reasoning model for coding and multi-step agent work. $0.60 / MTok input, $2.20 / MTok output. `glm-4.7` Z.ai — served by DeepInfra, Baseten, BytePlus (Ark) 200,000-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context, Multilingual Z.ai's full GLM 4.7 reasoning model for coding and multi-step agent work. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.60 / MTok | \$2.20 / MTok | \$0.06 / MTok | \$0.60 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0052. Billing is metered per token. Prices are live at `GET /api/v1/models/glm-4.7`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "glm-4.7", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="glm-4.7", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"glm-4.7","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `glm-4.7` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `glm-4.7` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "glm-4.7" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("glm-4.7"); if (!model.servable) throw new Error("glm-4.7 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GLM 4.7 Flash Source: https://docs.ninjachat.ai/api-reference/models/chat/glm-4-7-flash glm-4.7-flash on NinjaChat — Z.ai's extremely low-cost GLM reasoning model for fast coding and tool workflows. $0.06 / MTok input, $0.40 / MTok output. `glm-4.7-flash` Z.ai — served by DeepInfra, io.net Intelligence 202,752-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context, Multilingual Z.ai's extremely low-cost GLM reasoning model for fast coding and tool workflows. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.06 / MTok | \$0.40 / MTok | \$0.006 / MTok | \$0.06 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0007. Billing is metered per token. Prices are live at `GET /api/v1/models/glm-4.7-flash`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "glm-4.7-flash", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="glm-4.7-flash", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"glm-4.7-flash","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `glm-4.7-flash` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `glm-4.7-flash` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "glm-4.7-flash" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("glm-4.7-flash"); if (!model.servable) throw new Error("glm-4.7-flash is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GLM-5 Source: https://docs.ninjachat.ai/api-reference/models/chat/glm-5 glm-5 on NinjaChat — Z.ai's GLM-5 with strong bilingual (Chinese/English) capabilities. $1.00 / MTok input, $3.20 / MTok output. `glm-5` Z.ai — served by DigitalOcean Inference, Z.ai (Zhipu), DeepInfra, GMI Cloud, Novita AI 128,000-token context window · 8,192 max output tokens Streaming, JSON mode, Multilingual Z.ai's GLM-5 with strong bilingual (Chinese/English) capabilities. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$1.00 / MTok | \$3.20 / MTok | \$0.10 / MTok | \$1.00 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0082. Billing is metered per token. Prices are live at `GET /api/v1/models/glm-5`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "glm-5", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="glm-5", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"glm-5","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `glm-5` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `glm-5` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "glm-5" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("glm-5"); if (!model.servable) throw new Error("glm-5 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GLM 5.1 Source: https://docs.ninjachat.ai/api-reference/models/chat/glm-5-1 glm-5.1 on NinjaChat — Z.ai's agentic GLM 5.1 model with structured output, reasoning, and function-calling support. $1.40 / MTok input, $4.40 / MTok output. `glm-5.1` Z.ai — served by DigitalOcean Inference, DeepInfra, GMI Cloud, Chutes 163,840-token context window · 163,840 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context, Multilingual Z.ai's agentic GLM 5.1 model with structured output, reasoning, and function-calling support. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$1.40 / MTok | \$4.40 / MTok | \$0.14 / MTok | \$1.40 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0114. Billing is metered per token. Prices are live at `GET /api/v1/models/glm-5.1`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "glm-5.1", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="glm-5.1", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"glm-5.1","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `glm-5.1` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `glm-5.1` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "glm-5.1" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("glm-5.1"); if (!model.servable) throw new Error("glm-5.1 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GLM 5.2 Source: https://docs.ninjachat.ai/api-reference/models/chat/glm-5-2 glm-5.2 on NinjaChat — Z.ai's GLM 5.2 agentic model for engineering, multilingual coding, and long-horizon tasks. $1.40 / MTok input, $4.40 / MTok output. `glm-5.2` Z.ai — served by Fireworks AI, DeepInfra, GMI Cloud, Baseten, DigitalOcean Inference, BytePlus (Ark), Atlas Cloud, Mistral, Morph, Chutes, FriendliAI 1,048,576-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context, Multilingual Z.ai's GLM 5.2 agentic model for engineering, multilingual coding, and long-horizon tasks. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$1.40 / MTok | \$4.40 / MTok | \$0.14 / MTok | \$1.40 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0114. Billing is metered per token. Prices are live at `GET /api/v1/models/glm-5.2`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "glm-5.2", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="glm-5.2", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"glm-5.2","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `glm-5.2` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `glm-5.2` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "glm-5.2" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("glm-5.2"); if (!model.servable) throw new Error("glm-5.2 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GLM 5.2 Fast Source: https://docs.ninjachat.ai/api-reference/models/chat/glm-5-2-fast glm-5.2-fast on NinjaChat — Z.ai's speed-optimized GLM 5.2 for real-time agentic engineering with a full 1M-token context. $2.10 / MTok input, $6.60 / MTok output. `glm-5.2-fast` Z.ai — served by Fireworks AI, Baseten 1,048,576-token context window · 262,144 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context, Multilingual Z.ai's speed-optimized GLM 5.2 for real-time agentic engineering with a full 1M-token context. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$2.10 / MTok | \$6.60 / MTok | \$0.21 / MTok | \$2.10 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0171. Billing is metered per token. Prices are live at `GET /api/v1/models/glm-5.2-fast`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "glm-5.2-fast", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="glm-5.2-fast", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"glm-5.2-fast","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `glm-5.2-fast` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `glm-5.2-fast` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "glm-5.2-fast" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("glm-5.2-fast"); if (!model.servable) throw new Error("glm-5.2-fast is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GLM 5.3 Source: https://docs.ninjachat.ai/api-reference/models/chat/glm-5-3 glm-5.3 on NinjaChat — Z.ai's frontier long-horizon coding model with mandatory adaptive reasoning and 1M context. $1.40 / MTok input, $4.40 / MTok output. `glm-5.3` Z.ai — served by Z.ai (Zhipu), io.net Intelligence 1,048,576-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context, Multilingual Z.ai's frontier long-horizon coding model with mandatory adaptive reasoning and 1M context. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$1.40 / MTok | \$4.40 / MTok | \$0.26 / MTok | \$1.40 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0114. Billing is metered per token. Prices are live at `GET /api/v1/models/glm-5.3`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "glm-5.3", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="glm-5.3", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"glm-5.3","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `glm-5.3` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `glm-5.3` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "glm-5.3" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("glm-5.3"); if (!model.servable) throw new Error("glm-5.3 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GLM 5.3 Flash Source: https://docs.ninjachat.ai/api-reference/models/chat/glm-5-3-flash glm-5.3-flash on NinjaChat — Z.ai's efficient GLM 5.3 variant for high-volume coding, multimodal agents, and million-token work. $0.15 / MTok input, $0.50 / MTok output. `glm-5.3-flash` Z.ai — served by SiliconFlow, io.net Intelligence 1,048,576-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Z.ai's efficient GLM 5.3 variant for high-volume coding, multimodal agents, and million-token work. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.15 / MTok | \$0.50 / MTok | \$0.03 / MTok | \$0.15 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0013. Billing is metered per token. Prices are live at `GET /api/v1/models/glm-5.3-flash`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "glm-5.3-flash", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="glm-5.3-flash", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"glm-5.3-flash","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `glm-5.3-flash` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `glm-5.3-flash` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "glm-5.3-flash" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("glm-5.3-flash"); if (!model.servable) throw new Error("glm-5.3-flash is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GPT-4.1 Source: https://docs.ninjachat.ai/api-reference/models/chat/gpt-4-1 gpt-4.1 on NinjaChat — OpenAI's high-intelligence non-reasoning model with a one-million-token context window, vision, and tool use. $2.00 / MTok input, $8.00 / MTok output. `gpt-4.1` OpenAI 1,047,576-token context window · 32,768 max output tokens Streaming, JSON mode, Tool calling, Vision, Long context, Multilingual OpenAI's high-intelligence non-reasoning model with a one-million-token context window, vision, and tool use. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$2.00 / MTok | \$8.00 / MTok | \$0.50 / MTok | \$2.00 / MTok | Typical request (5K input / 1K output tokens): \~\$0.018. Billing is metered per token. Prices are live at `GET /api/v1/models/gpt-4.1`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gpt-4.1", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gpt-4.1", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-4.1","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gpt-4.1` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gpt-4.1` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gpt-4.1" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gpt-4.1"); if (!model.servable) throw new Error("gpt-4.1 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GPT-4.1 Mini Source: https://docs.ninjachat.ai/api-reference/models/chat/gpt-4-1-mini gpt-4.1-mini on NinjaChat — OpenAI's efficient GPT-4.1 model with million-token context, vision, structured output, and tool use. $0.40 / MTok input, $1.60 / MTok output. `gpt-4.1-mini` OpenAI — served by OpenAI, Atlas Cloud 1,047,576-token context window · 32,768 max output tokens Streaming, JSON mode, Tool calling, Vision, Long context, Multilingual OpenAI's efficient GPT-4.1 model with million-token context, vision, structured output, and tool use. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.40 / MTok | \$1.60 / MTok | \$0.10 / MTok | \$0.40 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0036. Billing is metered per token. Prices are live at `GET /api/v1/models/gpt-4.1-mini`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gpt-4.1-mini", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gpt-4.1-mini", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-4.1-mini","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gpt-4.1-mini` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gpt-4.1-mini` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gpt-4.1-mini" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gpt-4.1-mini"); if (!model.servable) throw new Error("gpt-4.1-mini is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GPT-4o Mini Source: https://docs.ninjachat.ai/api-reference/models/chat/gpt-4o-mini gpt-4o-mini on NinjaChat — OpenAI's compact multimodal model for inexpensive, high-throughput chat, vision, and structured workflows. $0.15 / MTok input, $0.60 / MTok output. `gpt-4o-mini` OpenAI 128,000-token context window · 16,384 max output tokens Streaming, JSON mode, Tool calling, Vision, Long context, Multilingual OpenAI's compact multimodal model for inexpensive, high-throughput chat, vision, and structured workflows. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.15 / MTok | \$0.60 / MTok | \$0.075 / MTok | \$0.15 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0014. Billing is metered per token. Prices are live at `GET /api/v1/models/gpt-4o-mini`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gpt-4o-mini", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gpt-4o-mini", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gpt-4o-mini` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gpt-4o-mini` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gpt-4o-mini" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gpt-4o-mini"); if (!model.servable) throw new Error("gpt-4o-mini is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GPT-5 Source: https://docs.ninjachat.ai/api-reference/models/chat/gpt-5 gpt-5 on NinjaChat — A backwards-compatible NinjaChat API alias that currently serves OpenAI GPT-5.2. $1.75 / MTok input, $14.00 / MTok output. `gpt-5` OpenAI 400,000-token context window · 128,000 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning A backwards-compatible NinjaChat API alias that currently serves OpenAI GPT-5.2. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------- | :------------- | :------------ | | \$1.75 / MTok | \$14.00 / MTok | \$0.175 / MTok | \$1.75 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0228. Billing is metered per token. Prices are live at `GET /api/v1/models/gpt-5`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gpt-5", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gpt-5", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-5","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gpt-5` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gpt-5` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gpt-5" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gpt-5"); if (!model.servable) throw new Error("gpt-5 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GPT-5.3 Codex Source: https://docs.ninjachat.ai/api-reference/models/chat/gpt-5-3-codex gpt-5.3-codex on NinjaChat — OpenAI's coding-specialized reasoning model for complex software engineering and agentic tool use. $1.75 / MTok input, $14.00 / MTok output. `gpt-5.3-codex` OpenAI 400,000-token context window · 128,000 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual OpenAI's coding-specialized reasoning model for complex software engineering and agentic tool use. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------- | :------------- | :------------ | | \$1.75 / MTok | \$14.00 / MTok | \$0.175 / MTok | \$1.75 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0228. Billing is metered per token. Prices are live at `GET /api/v1/models/gpt-5.3-codex`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gpt-5.3-codex", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gpt-5.3-codex", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-5.3-codex","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gpt-5.3-codex` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gpt-5.3-codex` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gpt-5.3-codex" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gpt-5.3-codex"); if (!model.servable) throw new Error("gpt-5.3-codex is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GPT-5.4 Source: https://docs.ninjachat.ai/api-reference/models/chat/gpt-5-4 gpt-5.4 on NinjaChat — OpenAI's GPT-5.4 flagship for hard reasoning and code. $2.50 / MTok input, $15.00 / MTok output. `gpt-5.4` OpenAI 256,000-token context window · 16,384 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning OpenAI's GPT-5.4 flagship for hard reasoning and code. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------- | :------------ | :------------ | | \$2.50 / MTok | \$15.00 / MTok | \$0.25 / MTok | \$2.50 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0275. Billing is metered per token. Prices are live at `GET /api/v1/models/gpt-5.4`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gpt-5.4", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gpt-5.4", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-5.4","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gpt-5.4` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gpt-5.4` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gpt-5.4" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gpt-5.4"); if (!model.servable) throw new Error("gpt-5.4 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GPT-5.4 Mini Source: https://docs.ninjachat.ai/api-reference/models/chat/gpt-5-4-mini gpt-5.4-mini on NinjaChat — OpenAI's compact GPT-5.4 model for fast multimodal agents and structured workloads. $0.75 / MTok input, $4.50 / MTok output. `gpt-5.4-mini` OpenAI — served by GMI Cloud, Atlas Cloud 409,600-token context window · 32,768 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual OpenAI's compact GPT-5.4 model for fast multimodal agents and structured workloads. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.75 / MTok | \$4.50 / MTok | \$0.075 / MTok | \$0.75 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0083. Billing is metered per token. Prices are live at `GET /api/v1/models/gpt-5.4-mini`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gpt-5.4-mini", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gpt-5.4-mini", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-5.4-mini","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gpt-5.4-mini` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gpt-5.4-mini` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gpt-5.4-mini" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gpt-5.4-mini"); if (!model.servable) throw new Error("gpt-5.4-mini is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GPT-5.4 Nano Source: https://docs.ninjachat.ai/api-reference/models/chat/gpt-5-4-nano gpt-5.4-nano on NinjaChat — OpenAI's smallest GPT-5.4 model for routing, extraction, and lightweight agent loops. $0.20 / MTok input, $1.25 / MTok output. `gpt-5.4-nano` OpenAI — served by GMI Cloud, Atlas Cloud 409,600-token context window · 32,768 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual OpenAI's smallest GPT-5.4 model for routing, extraction, and lightweight agent loops. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.20 / MTok | \$1.25 / MTok | \$0.02 / MTok | \$0.20 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0023. Billing is metered per token. Prices are live at `GET /api/v1/models/gpt-5.4-nano`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gpt-5.4-nano", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gpt-5.4-nano", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-5.4-nano","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gpt-5.4-nano` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gpt-5.4-nano` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gpt-5.4-nano" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gpt-5.4-nano"); if (!model.servable) throw new Error("gpt-5.4-nano is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GPT-5.4 Pro Source: https://docs.ninjachat.ai/api-reference/models/chat/gpt-5-4-pro gpt-5.4-pro on NinjaChat — OpenAI's highest-effort GPT-5.4 variant for the most demanding tasks. $30.00 / MTok input, $180.00 / MTok output. `gpt-5.4-pro` OpenAI 256,000-token context window · 16,384 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning OpenAI's highest-effort GPT-5.4 variant for the most demanding tasks. ## Pricing | Input | Output | Cached input | Cache write | | :------------- | :-------------- | :------------ | :------------- | | \$30.00 / MTok | \$180.00 / MTok | \$3.00 / MTok | \$30.00 / MTok | Typical request (5K input / 1K output tokens): \~\$0.33. Billing is metered per token. Prices are live at `GET /api/v1/models/gpt-5.4-pro`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gpt-5.4-pro", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gpt-5.4-pro", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-5.4-pro","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gpt-5.4-pro` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gpt-5.4-pro` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gpt-5.4-pro" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gpt-5.4-pro"); if (!model.servable) throw new Error("gpt-5.4-pro is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GPT-5.5 Source: https://docs.ninjachat.ai/api-reference/models/chat/gpt-5-5 gpt-5.5 on NinjaChat — OpenAI's GPT-5.5 flagship with a million-token context, vision, and tool use. $5.00 / MTok input, $30.00 / MTok output. `gpt-5.5` OpenAI — served by OpenAI, GMI Cloud 1,050,000-token context window · 32,768 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual OpenAI's GPT-5.5 flagship with a million-token context, vision, and tool use. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------- | :------------ | :------------ | | \$5.00 / MTok | \$30.00 / MTok | \$0.50 / MTok | \$5.00 / MTok | Typical request (5K input / 1K output tokens): \~\$0.055. Billing is metered per token. Prices are live at `GET /api/v1/models/gpt-5.5`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gpt-5.5", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gpt-5.5", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-5.5","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gpt-5.5` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gpt-5.5` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gpt-5.5" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gpt-5.5"); if (!model.servable) throw new Error("gpt-5.5 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GPT-5.5 Pro Source: https://docs.ninjachat.ai/api-reference/models/chat/gpt-5-5-pro gpt-5.5-pro on NinjaChat — OpenAI's highest-accuracy GPT-5.5 variant for difficult reasoning, tool use, and long-context professional work. $30.00 / MTok input, $180.00 / MTok output. `gpt-5.5-pro` OpenAI 1,050,000-token context window · 128,000 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual OpenAI's highest-accuracy GPT-5.5 variant for difficult reasoning, tool use, and long-context professional work. ## Pricing | Input | Output | Cached input | Cache write | | :------------- | :-------------- | :------------- | :------------- | | \$30.00 / MTok | \$180.00 / MTok | \$30.00 / MTok | \$30.00 / MTok | Typical request (5K input / 1K output tokens): \~\$0.33. Billing is metered per token. Prices are live at `GET /api/v1/models/gpt-5.5-pro`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gpt-5.5-pro", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gpt-5.5-pro", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-5.5-pro","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gpt-5.5-pro` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gpt-5.5-pro` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gpt-5.5-pro" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gpt-5.5-pro"); if (!model.servable) throw new Error("gpt-5.5-pro is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GPT-5.6 Luna Source: https://docs.ninjachat.ai/api-reference/models/chat/gpt-5-6-luna gpt-5.6-luna on NinjaChat — OpenAI's high-volume GPT-5.6 model with 1.05M context and full tool support. $0.20 / MTok input, $1.20 / MTok output. `gpt-5.6-luna` OpenAI 1,050,000-token context window · 128,000 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual OpenAI's high-volume GPT-5.6 model with 1.05M context and full tool support. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.20 / MTok | \$1.20 / MTok | \$0.02 / MTok | \$0.20 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0022. Billing is metered per token. Prices are live at `GET /api/v1/models/gpt-5.6-luna`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gpt-5.6-luna", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gpt-5.6-luna", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-5.6-luna","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gpt-5.6-luna` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gpt-5.6-luna` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gpt-5.6-luna" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gpt-5.6-luna"); if (!model.servable) throw new Error("gpt-5.6-luna is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GPT-5.6 Sol Source: https://docs.ninjachat.ai/api-reference/models/chat/gpt-5-6-sol gpt-5.6-sol on NinjaChat — OpenAI's flagship GPT-5.6 model for the hardest reasoning and coding workloads. $4.00 / MTok input, $20.00 / MTok output. `gpt-5.6-sol` OpenAI — served by OpenAI, Microsoft Foundry 1,050,000-token context window · 128,000 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual OpenAI's flagship GPT-5.6 model for the hardest reasoning and coding workloads. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------- | :------------ | :------------ | | \$4.00 / MTok | \$20.00 / MTok | \$0.40 / MTok | \$4.00 / MTok | Typical request (5K input / 1K output tokens): \~\$0.04. Billing is metered per token. Prices are live at `GET /api/v1/models/gpt-5.6-sol`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gpt-5.6-sol", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gpt-5.6-sol", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-5.6-sol","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gpt-5.6-sol` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gpt-5.6-sol` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gpt-5.6-sol" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gpt-5.6-sol"); if (!model.servable) throw new Error("gpt-5.6-sol is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GPT-5.6 Terra Source: https://docs.ninjachat.ai/api-reference/models/chat/gpt-5-6-terra gpt-5.6-terra on NinjaChat — OpenAI's balanced GPT-5.6 model for coding, agents, and professional work. $2.00 / MTok input, $12.00 / MTok output. `gpt-5.6-terra` OpenAI 1,050,000-token context window · 128,000 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual OpenAI's balanced GPT-5.6 model for coding, agents, and professional work. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------- | :------------ | :------------ | | \$2.00 / MTok | \$12.00 / MTok | \$0.20 / MTok | \$2.00 / MTok | Typical request (5K input / 1K output tokens): \~\$0.022. Billing is metered per token. Prices are live at `GET /api/v1/models/gpt-5.6-terra`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gpt-5.6-terra", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gpt-5.6-terra", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-5.6-terra","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gpt-5.6-terra` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gpt-5.6-terra` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gpt-5.6-terra" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gpt-5.6-terra"); if (!model.servable) throw new Error("gpt-5.6-terra is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GPT-5 Nano Source: https://docs.ninjachat.ai/api-reference/models/chat/gpt-5-nano gpt-5-nano on NinjaChat — OpenAI's compact GPT-5 Nano for high-throughput reasoning, vision, and agent workloads. $0.05 / MTok input, $0.40 / MTok output. `gpt-5-nano` OpenAI 400,000-token context window · 128,000 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual OpenAI's compact GPT-5 Nano for high-throughput reasoning, vision, and agent workloads. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.05 / MTok | \$0.40 / MTok | \$0.005 / MTok | \$0.05 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0007. Billing is metered per token. Prices are live at `GET /api/v1/models/gpt-5-nano`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gpt-5-nano", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gpt-5-nano", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-5-nano","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gpt-5-nano` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gpt-5-nano` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gpt-5-nano" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gpt-5-nano"); if (!model.servable) throw new Error("gpt-5-nano is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GPT-OSS 120B Source: https://docs.ninjachat.ai/api-reference/models/chat/gpt-oss-120b gpt-oss-120b on NinjaChat — OpenAI's Apache-2.0 open-weight 120B reasoning model for high-volume tool use. $0.35 / MTok input, $0.75 / MTok output. `gpt-oss-120b` OpenAI — served by Fireworks AI, Groq, Baseten, Cerebras, DeepInfra, DigitalOcean Inference, BytePlus (Ark), Amazon Bedrock, Scaleway Generative APIs, Cloudflare Workers AI, Hugging Face Inference Providers, Novita AI 131,072-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context OpenAI's Apache-2.0 open-weight 120B reasoning model for high-volume tool use. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.35 / MTok | \$0.75 / MTok | \$0.035 / MTok | \$0.35 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0025. Billing is metered per token. Prices are live at `GET /api/v1/models/gpt-oss-120b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gpt-oss-120b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gpt-oss-120b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-oss-120b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gpt-oss-120b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gpt-oss-120b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gpt-oss-120b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gpt-oss-120b"); if (!model.servable) throw new Error("gpt-oss-120b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GPT-OSS 120B Turbo Source: https://docs.ninjachat.ai/api-reference/models/chat/gpt-oss-120b-turbo gpt-oss-120b-turbo on NinjaChat — OpenAI's GPT-OSS 120B in a faster Turbo serving tier for tool-driven reasoning and coding workloads. $0.15 / MTok input, $0.60 / MTok output. `gpt-oss-120b-turbo` OpenAI — served by DeepInfra 131,072-token context window · 65,536 max output tokens Streaming, Tool calling, Reasoning, Long context OpenAI's GPT-OSS 120B in a faster Turbo serving tier for tool-driven reasoning and coding workloads. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.15 / MTok | \$0.60 / MTok | \$0.015 / MTok | \$0.15 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0014. Billing is metered per token. Prices are live at `GET /api/v1/models/gpt-oss-120b-turbo`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gpt-oss-120b-turbo", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gpt-oss-120b-turbo", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-oss-120b-turbo","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gpt-oss-120b-turbo` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gpt-oss-120b-turbo` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gpt-oss-120b-turbo" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gpt-oss-120b-turbo"); if (!model.servable) throw new Error("gpt-oss-120b-turbo is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GPT-OSS 120B Ultra Source: https://docs.ninjachat.ai/api-reference/models/chat/gpt-oss-120b-ultra gpt-oss-120b-ultra on NinjaChat — OpenAI's GPT-OSS 120B in a high-speed Ultra serving tier with tools, JSON, and streaming. $0.20 / MTok input, $0.95 / MTok output. `gpt-oss-120b-ultra` OpenAI — served by DeepInfra 131,072-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context OpenAI's GPT-OSS 120B in a high-speed Ultra serving tier with tools, JSON, and streaming. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.20 / MTok | \$0.95 / MTok | \$0.02 / MTok | \$0.20 / MTok | Typical request (5K input / 1K output tokens): \~\$0.002. Billing is metered per token. Prices are live at `GET /api/v1/models/gpt-oss-120b-ultra`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gpt-oss-120b-ultra", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gpt-oss-120b-ultra", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-oss-120b-ultra","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gpt-oss-120b-ultra` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gpt-oss-120b-ultra` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gpt-oss-120b-ultra" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gpt-oss-120b-ultra"); if (!model.servable) throw new Error("gpt-oss-120b-ultra is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # GPT-OSS 20B Source: https://docs.ninjachat.ai/api-reference/models/chat/gpt-oss-20b gpt-oss-20b on NinjaChat — OpenAI's compact 20B open-weight reasoning model for ultra-fast agents and structured outputs. $0.075 / MTok input, $0.45 / MTok output. `gpt-oss-20b` OpenAI — served by Groq, DeepInfra, DigitalOcean Inference, Hugging Face Inference Providers 131,072-token context window · 65,536 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context, Multilingual OpenAI's compact 20B open-weight reasoning model for ultra-fast agents and structured outputs. ## Pricing | Input | Output | Cached input | Cache write | | :------------- | :------------ | :-------------- | :------------- | | \$0.075 / MTok | \$0.45 / MTok | \$0.0075 / MTok | \$0.075 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0009. Billing is metered per token. Prices are live at `GET /api/v1/models/gpt-oss-20b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gpt-oss-20b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gpt-oss-20b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-oss-20b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `gpt-oss-20b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `gpt-oss-20b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "gpt-oss-20b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gpt-oss-20b"); if (!model.servable) throw new Error("gpt-oss-20b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Grok 4 Source: https://docs.ninjachat.ai/api-reference/models/chat/grok-4 grok-4 on NinjaChat — xAI's Grok 4 with strong reasoning and up-to-date knowledge. $1.25 / MTok input, $2.50 / MTok output. `grok-4` xAI 256,000-token context window · 8,192 max output tokens Streaming, JSON mode, Reasoning xAI's Grok 4 with strong reasoning and up-to-date knowledge. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$1.25 / MTok | \$2.50 / MTok | \$0.125 / MTok | \$1.25 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0088. Billing is metered per token. Prices are live at `GET /api/v1/models/grok-4`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "grok-4", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="grok-4", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"grok-4","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `grok-4` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `grok-4` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "grok-4" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("grok-4"); if (!model.servable) throw new Error("grok-4 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Grok 4.20 Source: https://docs.ninjachat.ai/api-reference/models/chat/grok-4-20 grok-4.20 on NinjaChat — xAI's million-token multimodal Grok 4.20 reasoning model for long-context agents and tool orchestration. $1.25 / MTok input, $2.50 / MTok output. `grok-4.20` xAI 1,000,000-token context window · 131,000 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context xAI's million-token multimodal Grok 4.20 reasoning model for long-context agents and tool orchestration. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$1.25 / MTok | \$2.50 / MTok | \$0.20 / MTok | \$1.25 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0088. Billing is metered per token. Prices are live at `GET /api/v1/models/grok-4.20`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "grok-4.20", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="grok-4.20", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"grok-4.20","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `grok-4.20` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `grok-4.20` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "grok-4.20" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("grok-4.20"); if (!model.servable) throw new Error("grok-4.20 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Grok 4.20 Fast Source: https://docs.ninjachat.ai/api-reference/models/chat/grok-4-20-fast grok-4.20-fast on NinjaChat — The non-reasoning Grok 4.20 endpoint for fast million-token multimodal and agentic workloads. $1.25 / MTok input, $2.50 / MTok output. `grok-4.20-fast` xAI 1,000,000-token context window · 131,000 max output tokens Streaming, JSON mode, Tool calling, Vision, Long context The non-reasoning Grok 4.20 endpoint for fast million-token multimodal and agentic workloads. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$1.25 / MTok | \$2.50 / MTok | \$0.20 / MTok | \$1.25 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0088. Billing is metered per token. Prices are live at `GET /api/v1/models/grok-4.20-fast`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "grok-4.20-fast", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="grok-4.20-fast", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"grok-4.20-fast","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `grok-4.20-fast` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `grok-4.20-fast` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "grok-4.20-fast" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("grok-4.20-fast"); if (!model.servable) throw new Error("grok-4.20-fast is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Grok 4.3 Source: https://docs.ninjachat.ai/api-reference/models/chat/grok-4-3 grok-4.3 on NinjaChat — xAI's Grok 4.3 million-token reasoning model with vision, tools, structured output, and December 2025 knowledge. $1.25 / MTok input, $2.50 / MTok output. `grok-4.3` xAI — served by xAI, Atlas Cloud 1,000,000-token context window · 131,000 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context xAI's Grok 4.3 million-token reasoning model with vision, tools, structured output, and December 2025 knowledge. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$1.25 / MTok | \$2.50 / MTok | \$0.20 / MTok | \$1.25 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0088. Billing is metered per token. Prices are live at `GET /api/v1/models/grok-4.3`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "grok-4.3", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="grok-4.3", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"grok-4.3","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `grok-4.3` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `grok-4.3` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "grok-4.3" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("grok-4.3"); if (!model.servable) throw new Error("grok-4.3 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Grok 4.5 Source: https://docs.ninjachat.ai/api-reference/models/chat/grok-4-5 grok-4.5 on NinjaChat — xAI's frontier Grok 4.5 model for coding, STEM, and complex agent workflows. $2.00 / MTok input, $6.00 / MTok output. `grok-4.5` xAI — served by xAI, GMI Cloud 500,000-token context window · 128,000 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context xAI's frontier Grok 4.5 model for coding, STEM, and complex agent workflows. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$2.00 / MTok | \$6.00 / MTok | \$0.30 / MTok | \$2.00 / MTok | Typical request (5K input / 1K output tokens): \~\$0.016. Billing is metered per token. Prices are live at `GET /api/v1/models/grok-4.5`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "grok-4.5", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="grok-4.5", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"grok-4.5","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `grok-4.5` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `grok-4.5` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "grok-4.5" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("grok-4.5"); if (!model.servable) throw new Error("grok-4.5 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Grok 4.6 Source: https://docs.ninjachat.ai/api-reference/models/chat/grok-4-6 grok-4.6 on NinjaChat — xAI's frontier Grok model for coding, agents, and visual knowledge work. $2.00 / MTok input, $6.00 / MTok output. `grok-4.6` xAI — served by xAI, GMI Cloud 500,000-token context window · 128,000 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context xAI's frontier Grok model for coding, agents, and visual knowledge work. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$2.00 / MTok | \$6.00 / MTok | \$0.20 / MTok | \$2.00 / MTok | Typical request (5K input / 1K output tokens): \~\$0.016. Billing is metered per token. Prices are live at `GET /api/v1/models/grok-4.6`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "grok-4.6", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="grok-4.6", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"grok-4.6","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `grok-4.6` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `grok-4.6` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "grok-4.6" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("grok-4.6"); if (!model.servable) throw new Error("grok-4.6 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Grok Build 0.1 Source: https://docs.ninjachat.ai/api-reference/models/chat/grok-build-0-1 grok-build-0.1 on NinjaChat — xAI's cost-efficient coding model tuned for agentic engineering and tool use. $1.00 / MTok input, $2.00 / MTok output. `grok-build-0.1` xAI 256,000-token context window · 65,536 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context xAI's cost-efficient coding model tuned for agentic engineering and tool use. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$1.00 / MTok | \$2.00 / MTok | \$0.20 / MTok | \$1.00 / MTok | Typical request (5K input / 1K output tokens): \~\$0.007. Billing is metered per token. Prices are live at `GET /api/v1/models/grok-build-0.1`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "grok-build-0.1", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="grok-build-0.1", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"grok-build-0.1","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `grok-build-0.1` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `grok-build-0.1` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "grok-build-0.1" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("grok-build-0.1"); if (!model.servable) throw new Error("grok-build-0.1 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Hermes 3 405B Source: https://docs.ninjachat.ai/api-reference/models/chat/hermes-3-405b hermes-3-405b on NinjaChat — Nous Research's 405B Llama 3.1 fine-tune for high-quality general assistance and controlled generation. $1.00 / MTok input, $1.00 / MTok output. `hermes-3-405b` Nous Research — served by DeepInfra 131,072-token context window · 16,384 max output tokens Streaming, JSON mode, Long context, Multilingual Nous Research's 405B Llama 3.1 fine-tune for high-quality general assistance and controlled generation. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$1.00 / MTok | \$1.00 / MTok | \$0.10 / MTok | \$1.00 / MTok | Typical request (5K input / 1K output tokens): \~\$0.006. Billing is metered per token. Prices are live at `GET /api/v1/models/hermes-3-405b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "hermes-3-405b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="hermes-3-405b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"hermes-3-405b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `hermes-3-405b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `hermes-3-405b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "hermes-3-405b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("hermes-3-405b"); if (!model.servable) throw new Error("hermes-3-405b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Hermes 3 70B Source: https://docs.ninjachat.ai/api-reference/models/chat/hermes-3-70b hermes-3-70b on NinjaChat — Nous Research's controllable Llama 3.1 fine-tune for assistants, structured output, and long-form conversation. $0.70 / MTok input, $0.70 / MTok output. `hermes-3-70b` Nous Research — served by DeepInfra 131,072-token context window · 16,384 max output tokens Streaming, JSON mode, Long context, Multilingual Nous Research's controllable Llama 3.1 fine-tune for assistants, structured output, and long-form conversation. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.70 / MTok | \$0.70 / MTok | \$0.07 / MTok | \$0.70 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0042. Billing is metered per token. Prices are live at `GET /api/v1/models/hermes-3-70b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "hermes-3-70b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="hermes-3-70b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"hermes-3-70b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `hermes-3-70b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `hermes-3-70b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "hermes-3-70b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("hermes-3-70b"); if (!model.servable) throw new Error("hermes-3-70b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # HY3 Source: https://docs.ninjachat.ai/api-reference/models/chat/hy3 hy3 on NinjaChat — Tencent's HY3 reasoning and coding model with a 262K-token context. $0.14 / MTok input, $0.58 / MTok output. `hy3` Tencent — served by GMI Cloud, DeepInfra 262,144-token context window · 128,000 max output tokens Streaming, JSON mode, Reasoning, Long context, Multilingual Tencent's HY3 reasoning and coding model with a 262K-token context. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.14 / MTok | \$0.58 / MTok | \$0.014 / MTok | \$0.14 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0013. Billing is metered per token. Prices are live at `GET /api/v1/models/hy3`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "hy3", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="hy3", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"hy3","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `hy3` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `hy3` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "hy3" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("hy3"); if (!model.servable) throw new Error("hy3 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Inkling Source: https://docs.ninjachat.ai/api-reference/models/chat/inkling inkling on NinjaChat — Thinking Machines Lab's 975B multimodal open-weight generalist with 1M context. $1.00 / MTok input, $4.05 / MTok output. `inkling` Thinking Machines Lab — served by Fireworks AI, DeepInfra, Baseten 1,048,576-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Thinking Machines Lab's 975B multimodal open-weight generalist with 1M context. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$1.00 / MTok | \$4.05 / MTok | \$0.10 / MTok | \$1.00 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0091. Billing is metered per token. Prices are live at `GET /api/v1/models/inkling`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "inkling", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="inkling", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"inkling","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `inkling` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `inkling` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "inkling" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("inkling"); if (!model.servable) throw new Error("inkling is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Inkling Small Source: https://docs.ninjachat.ai/api-reference/models/chat/inkling-small inkling-small on NinjaChat — Thinking Machines Lab's efficient 276B/12B-active multimodal reasoner with a 524K context window. $0.50 / MTok input, $1.20 / MTok output. `inkling-small` Thinking Machines Lab — served by DeepInfra, Baseten 524,288-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Thinking Machines Lab's efficient 276B/12B-active multimodal reasoner with a 524K context window. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.50 / MTok | \$1.20 / MTok | \$0.05 / MTok | \$0.50 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0037. Billing is metered per token. Prices are live at `GET /api/v1/models/inkling-small`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "inkling-small", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="inkling-small", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"inkling-small","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `inkling-small` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `inkling-small` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "inkling-small" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("inkling-small"); if (!model.servable) throw new Error("inkling-small is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Kimi K2.5 Source: https://docs.ninjachat.ai/api-reference/models/chat/kimi-k2-5 kimi-k2.5 on NinjaChat — Moonshot AI's native multimodal Kimi K2.5 for advanced coding, visual agents, and long-context reasoning. $0.60 / MTok input, $3.00 / MTok output. `kimi-k2.5` Moonshot AI — served by GMI Cloud, DeepInfra, DigitalOcean Inference 262,144-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Moonshot AI's native multimodal Kimi K2.5 for advanced coding, visual agents, and long-context reasoning. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.60 / MTok | \$3.00 / MTok | \$0.06 / MTok | \$0.60 / MTok | Typical request (5K input / 1K output tokens): \~\$0.006. Billing is metered per token. Prices are live at `GET /api/v1/models/kimi-k2.5`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "kimi-k2.5", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="kimi-k2.5", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"kimi-k2.5","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `kimi-k2.5` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `kimi-k2.5` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "kimi-k2.5" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("kimi-k2.5"); if (!model.servable) throw new Error("kimi-k2.5 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Kimi K2.6 Source: https://docs.ninjachat.ai/api-reference/models/chat/kimi-k2-6 kimi-k2.6 on NinjaChat — Moonshot's multimodal agentic model for long-horizon coding and autonomous execution. $0.95 / MTok input, $4.00 / MTok output. `kimi-k2.6` Moonshot AI — served by Fireworks AI, DeepInfra, GMI Cloud, Baseten, DigitalOcean Inference, Atlas Cloud, Chutes, Tencent Cloud TokenHub 262,144-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Moonshot's multimodal agentic model for long-horizon coding and autonomous execution. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.95 / MTok | \$4.00 / MTok | \$0.095 / MTok | \$0.95 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0088. Billing is metered per token. Prices are live at `GET /api/v1/models/kimi-k2.6`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "kimi-k2.6", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="kimi-k2.6", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"kimi-k2.6","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `kimi-k2.6` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `kimi-k2.6` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "kimi-k2.6" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("kimi-k2.6"); if (!model.servable) throw new Error("kimi-k2.6 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Kimi K2.6 Fast Source: https://docs.ninjachat.ai/api-reference/models/chat/kimi-k2-6-fast kimi-k2.6-fast on NinjaChat — Moonshot's latency-optimized Kimi K2.6 tier for fast reasoning, structured output, and tool use. $2.00 / MTok input, $8.00 / MTok output. `kimi-k2.6-fast` Moonshot AI — served by Fireworks AI 262,144-token context window · 32,768 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context, Multilingual Moonshot's latency-optimized Kimi K2.6 tier for fast reasoning, structured output, and tool use. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$2.00 / MTok | \$8.00 / MTok | \$0.30 / MTok | \$2.00 / MTok | Typical request (5K input / 1K output tokens): \~\$0.018. Billing is metered per token. Prices are live at `GET /api/v1/models/kimi-k2.6-fast`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "kimi-k2.6-fast", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="kimi-k2.6-fast", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"kimi-k2.6-fast","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `kimi-k2.6-fast` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `kimi-k2.6-fast` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "kimi-k2.6-fast" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("kimi-k2.6-fast"); if (!model.servable) throw new Error("kimi-k2.6-fast is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Kimi K2.7 Code Source: https://docs.ninjachat.ai/api-reference/models/chat/kimi-k2-7-code kimi-k2.7-code on NinjaChat — Moonshot's coding-specialized Kimi with faster, more token-efficient long-horizon execution. $0.95 / MTok input, $4.00 / MTok output. `kimi-k2.7-code` Moonshot AI — served by Fireworks AI, DeepInfra, GMI Cloud, Baseten 262,144-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Moonshot's coding-specialized Kimi with faster, more token-efficient long-horizon execution. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.95 / MTok | \$4.00 / MTok | \$0.095 / MTok | \$0.95 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0088. Billing is metered per token. Prices are live at `GET /api/v1/models/kimi-k2.7-code`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "kimi-k2.7-code", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="kimi-k2.7-code", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"kimi-k2.7-code","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `kimi-k2.7-code` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `kimi-k2.7-code` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "kimi-k2.7-code" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("kimi-k2.7-code"); if (!model.servable) throw new Error("kimi-k2.7-code is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Kimi K2.7 Code Fast Source: https://docs.ninjachat.ai/api-reference/models/chat/kimi-k2-7-code-fast kimi-k2.7-code-fast on NinjaChat — Moonshot's high-throughput Kimi K2.7 Code tier for fast long-context engineering and structured code workloads. $1.90 / MTok input, $8.00 / MTok output. `kimi-k2.7-code-fast` Moonshot AI — served by GMI Cloud 262,144-token context window · 32,768 max output tokens Streaming, JSON mode, Reasoning, Long context, Multilingual Moonshot's high-throughput Kimi K2.7 Code tier for fast long-context engineering and structured code workloads. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$1.90 / MTok | \$8.00 / MTok | \$0.38 / MTok | \$1.90 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0175. Billing is metered per token. Prices are live at `GET /api/v1/models/kimi-k2.7-code-fast`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "kimi-k2.7-code-fast", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="kimi-k2.7-code-fast", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"kimi-k2.7-code-fast","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `kimi-k2.7-code-fast` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `kimi-k2.7-code-fast` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "kimi-k2.7-code-fast" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("kimi-k2.7-code-fast"); if (!model.servable) throw new Error("kimi-k2.7-code-fast is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Kimi K3 Source: https://docs.ninjachat.ai/api-reference/models/chat/kimi-k3 kimi-k3 on NinjaChat — Moonshot's Kimi K3 frontier model with native vision and a 1M-token context. $3.00 / MTok input, $15.00 / MTok output. `kimi-k3` Moonshot AI — served by Fireworks AI, DeepInfra, GMI Cloud, Baseten, DigitalOcean Inference, Morph, Chutes 1,048,576-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Moonshot's Kimi K3 frontier model with native vision and a 1M-token context. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------- | :------------ | :------------ | | \$3.00 / MTok | \$15.00 / MTok | \$0.30 / MTok | \$3.00 / MTok | Typical request (5K input / 1K output tokens): \~\$0.03. Billing is metered per token. Prices are live at `GET /api/v1/models/kimi-k3`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "kimi-k3", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="kimi-k3", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"kimi-k3","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `kimi-k3` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `kimi-k3` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "kimi-k3" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("kimi-k3"); if (!model.servable) throw new Error("kimi-k3 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Kimi K3 Fast Source: https://docs.ninjachat.ai/api-reference/models/chat/kimi-k3-fast kimi-k3-fast on NinjaChat — Moonshot's latency-tuned Kimi K3 tier with native vision, tools, structured output, and a 1M-token context. $4.50 / MTok input, $22.50 / MTok output. `kimi-k3-fast` Moonshot AI — served by Fireworks AI 1,048,576-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Moonshot's latency-tuned Kimi K3 tier with native vision, tools, structured output, and a 1M-token context. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------- | :------------ | :------------ | | \$4.50 / MTok | \$22.50 / MTok | \$0.45 / MTok | \$4.50 / MTok | Typical request (5K input / 1K output tokens): \~\$0.045. Billing is metered per token. Prices are live at `GET /api/v1/models/kimi-k3-fast`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "kimi-k3-fast", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="kimi-k3-fast", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"kimi-k3-fast","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `kimi-k3-fast` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `kimi-k3-fast` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "kimi-k3-fast" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("kimi-k3-fast"); if (!model.servable) throw new Error("kimi-k3-fast is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Ling 3.0 Flash Source: https://docs.ninjachat.ai/api-reference/models/chat/ling-3-0-flash ling-3.0-flash on NinjaChat — InclusionAI's 124B/5.1B-active MoE optimized for token-efficient production agents and tool execution. $0.06 / MTok input, $0.18 / MTok output. `ling-3.0-flash` InclusionAI — served by DeepInfra, Novita AI 131,072-token context window · 32,768 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context, Multilingual InclusionAI's 124B/5.1B-active MoE optimized for token-efficient production agents and tool execution. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.06 / MTok | \$0.18 / MTok | \$0.006 / MTok | \$0.06 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0005. Billing is metered per token. Prices are live at `GET /api/v1/models/ling-3.0-flash`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "ling-3.0-flash", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="ling-3.0-flash", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"ling-3.0-flash","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `ling-3.0-flash` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `ling-3.0-flash` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "ling-3.0-flash" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("ling-3.0-flash"); if (!model.servable) throw new Error("ling-3.0-flash is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Llama 3.1 70B Source: https://docs.ninjachat.ai/api-reference/models/chat/llama-3-1-70b llama-3.1-70b on NinjaChat — Meta's widely adopted Llama 3.1 70B instruct model for general agents, RAG, and multilingual chat. $0.40 / MTok input, $0.40 / MTok output. `llama-3.1-70b` Meta — served by DeepInfra 131,072-token context window · 32,768 max output tokens Streaming, JSON mode, Tool calling, Long context, Multilingual Meta's widely adopted Llama 3.1 70B instruct model for general agents, RAG, and multilingual chat. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.40 / MTok | \$0.40 / MTok | \$0.04 / MTok | \$0.40 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0024. Billing is metered per token. Prices are live at `GET /api/v1/models/llama-3.1-70b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "llama-3.1-70b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="llama-3.1-70b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"llama-3.1-70b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `llama-3.1-70b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `llama-3.1-70b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "llama-3.1-70b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("llama-3.1-70b"); if (!model.servable) throw new Error("llama-3.1-70b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Llama 3.1 8B Instruct Source: https://docs.ninjachat.ai/api-reference/models/chat/llama-3-1-8b llama-3.1-8b on NinjaChat — Meta's compact long-context Llama 3.1 8B instruct model for extreme-volume workloads. $0.06 / MTok input, $0.06 / MTok output. `llama-3.1-8b` Meta — served by DeepInfra, Nscale Serverless Inference, Hugging Face Inference Providers 131,072-token context window · 32,768 max output tokens Streaming, JSON mode, Tool calling, Long context, Multilingual Meta's compact long-context Llama 3.1 8B instruct model for extreme-volume workloads. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.06 / MTok | \$0.06 / MTok | \$0.006 / MTok | \$0.06 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0004. Billing is metered per token. Prices are live at `GET /api/v1/models/llama-3.1-8b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "llama-3.1-8b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="llama-3.1-8b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"llama-3.1-8b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `llama-3.1-8b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `llama-3.1-8b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "llama-3.1-8b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("llama-3.1-8b"); if (!model.servable) throw new Error("llama-3.1-8b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Llama 3.3 70B Instruct Turbo Source: https://docs.ninjachat.ai/api-reference/models/chat/llama-3-3-70b llama-3.3-70b on NinjaChat — Meta's multilingual Llama 3.3 70B instruct model in a low-latency Turbo serving tier. $0.10 / MTok input, $0.32 / MTok output. `llama-3.3-70b` Meta — served by DeepInfra 131,072-token context window · 16,384 max output tokens Streaming, JSON mode, Tool calling, Long context, Multilingual Meta's multilingual Llama 3.3 70B instruct model in a low-latency Turbo serving tier. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.10 / MTok | \$0.32 / MTok | \$0.01 / MTok | \$0.10 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0009. Billing is metered per token. Prices are live at `GET /api/v1/models/llama-3.3-70b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "llama-3.3-70b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="llama-3.3-70b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"llama-3.3-70b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `llama-3.3-70b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `llama-3.3-70b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "llama-3.3-70b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("llama-3.3-70b"); if (!model.servable) throw new Error("llama-3.3-70b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Llama 4 Maverick Source: https://docs.ninjachat.ai/api-reference/models/chat/llama-4-maverick llama-4-maverick on NinjaChat — Meta's 128-expert multimodal Llama 4 Maverick model with a full 1M-token context and tool use. $0.25 / MTok input, $0.87 / MTok output. `llama-4-maverick` Meta — served by DeepInfra, DigitalOcean Inference 1,048,576-token context window · 16,384 max output tokens Streaming, JSON mode, Tool calling, Vision, Long context, Multilingual Meta's 128-expert multimodal Llama 4 Maverick model with a full 1M-token context and tool use. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.25 / MTok | \$0.87 / MTok | \$0.025 / MTok | \$0.25 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0022. Billing is metered per token. Prices are live at `GET /api/v1/models/llama-4-maverick`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "llama-4-maverick", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="llama-4-maverick", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"llama-4-maverick","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `llama-4-maverick` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `llama-4-maverick` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "llama-4-maverick" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("llama-4-maverick"); if (!model.servable) throw new Error("llama-4-maverick is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Llama 4 Scout Source: https://docs.ninjachat.ai/api-reference/models/chat/llama-4-scout llama-4-scout on NinjaChat — Meta's efficient multimodal Llama 4 Scout model with tool use and a 327K-token context. $0.11 / MTok input, $0.34 / MTok output. `llama-4-scout` Meta — served by DeepInfra 327,680-token context window · 8,192 max output tokens Streaming, JSON mode, Long context, Multilingual Meta's efficient multimodal Llama 4 Scout model with tool use and a 327K-token context. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.11 / MTok | \$0.34 / MTok | \$0.011 / MTok | \$0.11 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0009. Billing is metered per token. Prices are live at `GET /api/v1/models/llama-4-scout`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "llama-4-scout", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="llama-4-scout", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"llama-4-scout","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `llama-4-scout` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `llama-4-scout` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "llama-4-scout" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("llama-4-scout"); if (!model.servable) throw new Error("llama-4-scout is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # LongCat 2.0 Source: https://docs.ninjachat.ai/api-reference/models/chat/longcat-2-0 longcat-2.0 on NinjaChat — Meituan's native million-token sparse-MoE model for agentic coding and long-horizon tool use. $0.75 / MTok input, $2.95 / MTok output. `longcat-2.0` Meituan — served by SiliconFlow, Atlas Cloud 1,048,576-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context, Multilingual Meituan's native million-token sparse-MoE model for agentic coding and long-horizon tool use. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.75 / MTok | \$2.95 / MTok | \$0.015 / MTok | \$0.75 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0067. Billing is metered per token. Prices are live at `GET /api/v1/models/longcat-2.0`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "longcat-2.0", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="longcat-2.0", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"longcat-2.0","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `longcat-2.0` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `longcat-2.0` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "longcat-2.0" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("longcat-2.0"); if (!model.servable) throw new Error("longcat-2.0 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Lunaris 8B Turbo Source: https://docs.ninjachat.ai/api-reference/models/chat/lunaris-8b lunaris-8b on NinjaChat — Sao10K's Lunaris 8B creative chat model for dialogue-heavy and roleplay workloads. $0.04 / MTok input, $0.05 / MTok output. `lunaris-8b` Sao10K — served by DeepInfra 8,192-token context window · 4,096 max output tokens Streaming, JSON mode Sao10K's Lunaris 8B creative chat model for dialogue-heavy and roleplay workloads. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.04 / MTok | \$0.05 / MTok | \$0.004 / MTok | \$0.04 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0003. Billing is metered per token. Prices are live at `GET /api/v1/models/lunaris-8b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "lunaris-8b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="lunaris-8b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"lunaris-8b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `lunaris-8b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `lunaris-8b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "lunaris-8b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("lunaris-8b"); if (!model.servable) throw new Error("lunaris-8b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # MiMo V2.5 Source: https://docs.ninjachat.ai/api-reference/models/chat/mimo-v2-5 mimo-v2.5 on NinjaChat — Xiaomi's efficient multimodal agent model for coding and tool-driven workflows. $0.14 / MTok input, $0.28 / MTok output. `mimo-v2.5` Xiaomi — served by GMI Cloud, Xiaomi MiMo 1,048,576-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Xiaomi's efficient multimodal agent model for coding and tool-driven workflows. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.14 / MTok | \$0.28 / MTok | \$0.014 / MTok | \$0.14 / MTok | Typical request (5K input / 1K output tokens): \~\$0.001. Billing is metered per token. Prices are live at `GET /api/v1/models/mimo-v2.5`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "mimo-v2.5", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="mimo-v2.5", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"mimo-v2.5","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `mimo-v2.5` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `mimo-v2.5` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "mimo-v2.5" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("mimo-v2.5"); if (!model.servable) throw new Error("mimo-v2.5 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # MiMo V2.5 Pro Source: https://docs.ninjachat.ai/api-reference/models/chat/mimo-v2-5-pro mimo-v2.5-pro on NinjaChat — Xiaomi's higher-capability MiMo V2.5 tier for long-context coding and tool-driven agents. $0.435 / MTok input, $0.87 / MTok output. `mimo-v2.5-pro` Xiaomi — served by GMI Cloud, Xiaomi MiMo 1,050,000-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context, Multilingual Xiaomi's higher-capability MiMo V2.5 tier for long-context coding and tool-driven agents. ## Pricing | Input | Output | Cached input | Cache write | | :------------- | :------------ | :-------------- | :------------- | | \$0.435 / MTok | \$0.87 / MTok | \$0.0435 / MTok | \$0.435 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0031. Billing is metered per token. Prices are live at `GET /api/v1/models/mimo-v2.5-pro`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "mimo-v2.5-pro", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="mimo-v2.5-pro", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"mimo-v2.5-pro","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `mimo-v2.5-pro` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `mimo-v2.5-pro` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "mimo-v2.5-pro" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("mimo-v2.5-pro"); if (!model.servable) throw new Error("mimo-v2.5-pro is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # MiniMax M2.5 Source: https://docs.ninjachat.ai/api-reference/models/chat/minimax-m2-5 minimax-m2.5 on NinjaChat — MiniMax's efficient M2.5 reasoning model for budget agents, coding, and multilingual tool use. $0.30 / MTok input, $1.20 / MTok output. `minimax-m2.5` MiniMax — served by DeepInfra, GMI Cloud, DigitalOcean Inference 196,608-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Multilingual MiniMax's efficient M2.5 reasoning model for budget agents, coding, and multilingual tool use. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.30 / MTok | \$1.20 / MTok | \$0.03 / MTok | \$0.30 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0027. Billing is metered per token. Prices are live at `GET /api/v1/models/minimax-m2.5`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "minimax-m2.5", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="minimax-m2.5", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"minimax-m2.5","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `minimax-m2.5` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `minimax-m2.5` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "minimax-m2.5" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("minimax-m2.5"); if (!model.servable) throw new Error("minimax-m2.5 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # MiniMax M2.7 Source: https://docs.ninjachat.ai/api-reference/models/chat/minimax-m2-7 minimax-m2.7 on NinjaChat — MiniMax's efficient agent model for complex harnesses and multi-step productivity work. $0.30 / MTok input, $1.20 / MTok output. `minimax-m2.7` MiniMax — served by Fireworks AI, DeepInfra, GMI Cloud, Novita AI 196,608-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context, Multilingual MiniMax's efficient agent model for complex harnesses and multi-step productivity work. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.30 / MTok | \$1.20 / MTok | \$0.03 / MTok | \$0.30 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0027. Billing is metered per token. Prices are live at `GET /api/v1/models/minimax-m2.7`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "minimax-m2.7", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="minimax-m2.7", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"minimax-m2.7","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `minimax-m2.7` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `minimax-m2.7` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "minimax-m2.7" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("minimax-m2.7"); if (!model.servable) throw new Error("minimax-m2.7 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # MiniMax M2.7 Turbo Source: https://docs.ninjachat.ai/api-reference/models/chat/minimax-m2-7-turbo minimax-m2.7-turbo on NinjaChat — The high-throughput MiniMax M2.7 variant for reasoning-heavy agents and coding workflows. $0.38 / MTok input, $1.70 / MTok output. `minimax-m2.7-turbo` MiniMax — served by DeepInfra 196,608-token context window · 131,072 max output tokens Streaming, Tool calling, Reasoning, Long context, Multilingual The high-throughput MiniMax M2.7 variant for reasoning-heavy agents and coding workflows. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.38 / MTok | \$1.70 / MTok | \$0.07 / MTok | \$0.38 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0036. Billing is metered per token. Prices are live at `GET /api/v1/models/minimax-m2.7-turbo`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "minimax-m2.7-turbo", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="minimax-m2.7-turbo", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"minimax-m2.7-turbo","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `minimax-m2.7-turbo` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `minimax-m2.7-turbo` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "minimax-m2.7-turbo" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("minimax-m2.7-turbo"); if (!model.servable) throw new Error("minimax-m2.7-turbo is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # MiniMax M3 Source: https://docs.ninjachat.ai/api-reference/models/chat/minimax-m3 minimax-m3 on NinjaChat — MiniMax's low-cost open-weight frontier model with native multimodality and 512K context. $0.30 / MTok input, $1.20 / MTok output. `minimax-m3` MiniMax — served by Fireworks AI, DeepInfra, Morph 512,000-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual MiniMax's low-cost open-weight frontier model with native multimodality and 512K context. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.30 / MTok | \$1.20 / MTok | \$0.03 / MTok | \$0.30 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0027. Billing is metered per token. Prices are live at `GET /api/v1/models/minimax-m3`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "minimax-m3", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="minimax-m3", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"minimax-m3","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `minimax-m3` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `minimax-m3` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "minimax-m3" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("minimax-m3"); if (!model.servable) throw new Error("minimax-m3 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Ministral 3 14B Source: https://docs.ninjachat.ai/api-reference/models/chat/ministral-3-14b ministral-3-14b on NinjaChat — Mistral's largest Ministral 3 model for capable budget agents, visual document work, and multilingual coding. $0.20 / MTok input, $0.20 / MTok output. `ministral-3-14b` Mistral AI — served by Mistral, DigitalOcean Inference 262,144-token context window · 65,536 max output tokens Streaming, JSON mode, Tool calling, Vision, Long context, Multilingual Mistral's largest Ministral 3 model for capable budget agents, visual document work, and multilingual coding. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.20 / MTok | \$0.20 / MTok | \$0.02 / MTok | \$0.20 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0012. Billing is metered per token. Prices are live at `GET /api/v1/models/ministral-3-14b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "ministral-3-14b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="ministral-3-14b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"ministral-3-14b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `ministral-3-14b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `ministral-3-14b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "ministral-3-14b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("ministral-3-14b"); if (!model.servable) throw new Error("ministral-3-14b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Ministral 3 3B Source: https://docs.ninjachat.ai/api-reference/models/chat/ministral-3-3b ministral-3-3b on NinjaChat — Mistral's smallest Ministral 3 model for inexpensive multilingual, visual, and function-calling workloads. $0.10 / MTok input, $0.10 / MTok output. `ministral-3-3b` Mistral AI — served by Mistral 131,072-token context window · 32,768 max output tokens Streaming, JSON mode, Tool calling, Vision, Long context, Multilingual Mistral's smallest Ministral 3 model for inexpensive multilingual, visual, and function-calling workloads. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.10 / MTok | \$0.10 / MTok | \$0.01 / MTok | \$0.10 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0006. Billing is metered per token. Prices are live at `GET /api/v1/models/ministral-3-3b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "ministral-3-3b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="ministral-3-3b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"ministral-3-3b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `ministral-3-3b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `ministral-3-3b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "ministral-3-3b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("ministral-3-3b"); if (!model.servable) throw new Error("ministral-3-3b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Ministral 3 8B Source: https://docs.ninjachat.ai/api-reference/models/chat/ministral-3-8b ministral-3-8b on NinjaChat — Mistral's balanced Ministral 3 model for fast visual understanding, coding, and tool use. $0.15 / MTok input, $0.15 / MTok output. `ministral-3-8b` Mistral AI — served by Mistral 262,144-token context window · 65,536 max output tokens Streaming, JSON mode, Tool calling, Vision, Long context, Multilingual Mistral's balanced Ministral 3 model for fast visual understanding, coding, and tool use. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.15 / MTok | \$0.15 / MTok | \$0.015 / MTok | \$0.15 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0009. Billing is metered per token. Prices are live at `GET /api/v1/models/ministral-3-8b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "ministral-3-8b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="ministral-3-8b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"ministral-3-8b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `ministral-3-8b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `ministral-3-8b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "ministral-3-8b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("ministral-3-8b"); if (!model.servable) throw new Error("ministral-3-8b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Mistral Large Source: https://docs.ninjachat.ai/api-reference/models/chat/mistral-large mistral-large on NinjaChat — Mistral AI's Mistral Large for multilingual tasks, coding, and general-purpose work. $2.00 / MTok input, $6.00 / MTok output. `mistral-large` Mistral AI — served by Mistral 128,000-token context window · 8,192 max output tokens Streaming, JSON mode, Multilingual Mistral AI's Mistral Large for multilingual tasks, coding, and general-purpose work. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$2.00 / MTok | \$6.00 / MTok | \$0.20 / MTok | \$2.00 / MTok | Typical request (5K input / 1K output tokens): \~\$0.016. Billing is metered per token. Prices are live at `GET /api/v1/models/mistral-large`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "mistral-large", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="mistral-large", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"mistral-large","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `mistral-large` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `mistral-large` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "mistral-large" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("mistral-large"); if (!model.servable) throw new Error("mistral-large is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Mistral Large 3 Source: https://docs.ninjachat.ai/api-reference/models/chat/mistral-large-3 mistral-large-3 on NinjaChat — Mistral's open-weight 675B/41B-active general-purpose flagship with native vision and tool use. $0.50 / MTok input, $1.50 / MTok output. `mistral-large-3` Mistral AI — served by Mistral 262,144-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Vision, Long context, Multilingual Mistral's open-weight 675B/41B-active general-purpose flagship with native vision and tool use. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.50 / MTok | \$1.50 / MTok | \$0.05 / MTok | \$0.50 / MTok | Typical request (5K input / 1K output tokens): \~\$0.004. Billing is metered per token. Prices are live at `GET /api/v1/models/mistral-large-3`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "mistral-large-3", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="mistral-large-3", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"mistral-large-3","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `mistral-large-3` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `mistral-large-3` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "mistral-large-3" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("mistral-large-3"); if (!model.servable) throw new Error("mistral-large-3 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Mistral Medium 3.5 Source: https://docs.ninjachat.ai/api-reference/models/chat/mistral-medium-3-5 mistral-medium-3.5 on NinjaChat — Mistral's frontier-class multimodal model optimized for agentic coding and professional work. $1.50 / MTok input, $7.50 / MTok output. `mistral-medium-3.5` Mistral AI — served by Mistral 256,000-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Mistral's frontier-class multimodal model optimized for agentic coding and professional work. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$1.50 / MTok | \$7.50 / MTok | \$0.15 / MTok | \$1.50 / MTok | Typical request (5K input / 1K output tokens): \~\$0.015. Billing is metered per token. Prices are live at `GET /api/v1/models/mistral-medium-3.5`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "mistral-medium-3.5", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="mistral-medium-3.5", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"mistral-medium-3.5","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `mistral-medium-3.5` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `mistral-medium-3.5` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "mistral-medium-3.5" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("mistral-medium-3.5"); if (!model.servable) throw new Error("mistral-medium-3.5 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Mistral Nemo 12B Source: https://docs.ninjachat.ai/api-reference/models/chat/mistral-nemo-12b mistral-nemo-12b on NinjaChat — Mistral's compact multilingual 12B instruct model for bulk summarization and classification. $0.019 / MTok input, $0.03 / MTok output. `mistral-nemo-12b` Mistral AI — served by DeepInfra 131,072-token context window · 32,768 max output tokens Streaming, Long context, Multilingual Mistral's compact multilingual 12B instruct model for bulk summarization and classification. ## Pricing | Input | Output | Cached input | Cache write | | :------------- | :------------ | :-------------- | :------------- | | \$0.019 / MTok | \$0.03 / MTok | \$0.0019 / MTok | \$0.019 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0002. Billing is metered per token. Prices are live at `GET /api/v1/models/mistral-nemo-12b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "mistral-nemo-12b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="mistral-nemo-12b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"mistral-nemo-12b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `mistral-nemo-12b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `mistral-nemo-12b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "mistral-nemo-12b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("mistral-nemo-12b"); if (!model.servable) throw new Error("mistral-nemo-12b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Mistral Nemo 12B TEE Source: https://docs.ninjachat.ai/api-reference/models/chat/mistral-nemo-12b-tee mistral-nemo-12b-tee on NinjaChat — Mistral's compact multilingual 12B model served in a TEE-backed confidential-compute environment. $0.02 / MTok input, $0.10 / MTok output. `mistral-nemo-12b-tee` Mistral AI — served by Chutes 131,072-token context window · 32,768 max output tokens Streaming, JSON mode, Long context, Multilingual Mistral's compact multilingual 12B model served in a TEE-backed confidential-compute environment. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.02 / MTok | \$0.10 / MTok | \$0.002 / MTok | \$0.02 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0002. Billing is metered per token. Prices are live at `GET /api/v1/models/mistral-nemo-12b-tee`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "mistral-nemo-12b-tee", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="mistral-nemo-12b-tee", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"mistral-nemo-12b-tee","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `mistral-nemo-12b-tee` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `mistral-nemo-12b-tee` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "mistral-nemo-12b-tee" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("mistral-nemo-12b-tee"); if (!model.servable) throw new Error("mistral-nemo-12b-tee is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Mistral Small 24B Source: https://docs.ninjachat.ai/api-reference/models/chat/mistral-small-24b mistral-small-24b on NinjaChat — Mistral's efficient 24B instruct model with JSON support for structured generation and multilingual drafting. $0.05 / MTok input, $0.08 / MTok output. `mistral-small-24b` Mistral AI — served by DeepInfra 32,768-token context window · 32,768 max output tokens Streaming, JSON mode, Multilingual Mistral's efficient 24B instruct model with JSON support for structured generation and multilingual drafting. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.05 / MTok | \$0.08 / MTok | \$0.005 / MTok | \$0.05 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0004. Billing is metered per token. Prices are live at `GET /api/v1/models/mistral-small-24b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "mistral-small-24b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="mistral-small-24b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"mistral-small-24b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `mistral-small-24b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `mistral-small-24b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "mistral-small-24b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("mistral-small-24b"); if (!model.servable) throw new Error("mistral-small-24b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Mistral Small 3.2 24B Source: https://docs.ninjachat.ai/api-reference/models/chat/mistral-small-3-2-24b mistral-small-3.2-24b on NinjaChat — Mistral's inexpensive Small 3.2 multimodal instruct model with tools and structured JSON. $0.075 / MTok input, $0.20 / MTok output. `mistral-small-3.2-24b` Mistral AI — served by DeepInfra 128,000-token context window · 32,768 max output tokens Streaming, JSON mode, Tool calling, Vision, Long context, Multilingual Mistral's inexpensive Small 3.2 multimodal instruct model with tools and structured JSON. ## Pricing | Input | Output | Cached input | Cache write | | :------------- | :------------ | :-------------- | :------------- | | \$0.075 / MTok | \$0.20 / MTok | \$0.0075 / MTok | \$0.075 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0006. Billing is metered per token. Prices are live at `GET /api/v1/models/mistral-small-3.2-24b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "mistral-small-3.2-24b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="mistral-small-3.2-24b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"mistral-small-3.2-24b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `mistral-small-3.2-24b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `mistral-small-3.2-24b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "mistral-small-3.2-24b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("mistral-small-3.2-24b"); if (!model.servable) throw new Error("mistral-small-3.2-24b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Mistral Small 4 Source: https://docs.ninjachat.ai/api-reference/models/chat/mistral-small-4 mistral-small-4 on NinjaChat — Mistral's efficient 119B/6.5B-active hybrid model unifying instruct, reasoning, and coding. $0.15 / MTok input, $0.60 / MTok output. `mistral-small-4` Mistral AI — served by Mistral 256,000-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Mistral's efficient 119B/6.5B-active hybrid model unifying instruct, reasoning, and coding. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.15 / MTok | \$0.60 / MTok | \$0.015 / MTok | \$0.15 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0014. Billing is metered per token. Prices are live at `GET /api/v1/models/mistral-small-4`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "mistral-small-4", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="mistral-small-4", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"mistral-small-4","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `mistral-small-4` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `mistral-small-4` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "mistral-small-4" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("mistral-small-4"); if (!model.servable) throw new Error("mistral-small-4 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Muse Glimmer 30B Source: https://docs.ninjachat.ai/api-reference/models/chat/muse-glimmer-30b muse-glimmer-30b on NinjaChat — Meta's fast 30B Muse Glimmer multimodal model with vision and function calling. $0.35 / MTok input, $1.50 / MTok output. `muse-glimmer-30b` Meta — served by Fireworks AI, DeepInfra 131,072-token context window · 65,536 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context Meta's fast 30B Muse Glimmer multimodal model with vision and function calling. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.35 / MTok | \$1.50 / MTok | \$0.035 / MTok | \$0.35 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0033. Billing is metered per token. Prices are live at `GET /api/v1/models/muse-glimmer-30b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "muse-glimmer-30b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="muse-glimmer-30b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"muse-glimmer-30b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `muse-glimmer-30b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `muse-glimmer-30b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "muse-glimmer-30b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("muse-glimmer-30b"); if (!model.servable) throw new Error("muse-glimmer-30b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # MythoMax 13B Source: https://docs.ninjachat.ai/api-reference/models/chat/mythomax-13b mythomax-13b on NinjaChat — Gryphe's established 13B creative model for compact roleplay and dialogue workloads. $0.40 / MTok input, $0.40 / MTok output. `mythomax-13b` Gryphe — served by DeepInfra 4,096-token context window · 2,048 max output tokens Streaming Gryphe's established 13B creative model for compact roleplay and dialogue workloads. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.40 / MTok | \$0.40 / MTok | \$0.04 / MTok | \$0.40 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0024. Billing is metered per token. Prices are live at `GET /api/v1/models/mythomax-13b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "mythomax-13b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="mythomax-13b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"mythomax-13b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `mythomax-13b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `mythomax-13b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "mythomax-13b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("mythomax-13b"); if (!model.servable) throw new Error("mythomax-13b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Nemotron 3.5 Lightning Source: https://docs.ninjachat.ai/api-reference/models/chat/nemotron-3-5-lightning nemotron-3.5-lightning on NinjaChat — NVIDIA's hybrid Mamba-Transformer reasoning model with 3B active parameters. $0.08 / MTok input, $0.20 / MTok output. `nemotron-3.5-lightning` NVIDIA — served by Fireworks AI, DeepInfra 262,144-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context NVIDIA's hybrid Mamba-Transformer reasoning model with 3B active parameters. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.08 / MTok | \$0.20 / MTok | \$0.008 / MTok | \$0.08 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0006. Billing is metered per token. Prices are live at `GET /api/v1/models/nemotron-3.5-lightning`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "nemotron-3.5-lightning", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="nemotron-3.5-lightning", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"nemotron-3.5-lightning","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `nemotron-3.5-lightning` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `nemotron-3.5-lightning` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "nemotron-3.5-lightning" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("nemotron-3.5-lightning"); if (!model.servable) throw new Error("nemotron-3.5-lightning is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Nemotron 3 Nano 30B A3B Source: https://docs.ninjachat.ai/api-reference/models/chat/nemotron-3-nano nemotron-3-nano on NinjaChat — NVIDIA's efficient hybrid MoE reasoning model with 3B active parameters. $0.05 / MTok input, $0.20 / MTok output. `nemotron-3-nano` NVIDIA — served by DeepInfra, Novita AI 262,144-token context window · 16,384 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context, Multilingual NVIDIA's efficient hybrid MoE reasoning model with 3B active parameters. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.05 / MTok | \$0.20 / MTok | \$0.005 / MTok | \$0.05 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0005. Billing is metered per token. Prices are live at `GET /api/v1/models/nemotron-3-nano`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "nemotron-3-nano", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="nemotron-3-nano", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"nemotron-3-nano","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `nemotron-3-nano` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `nemotron-3-nano` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "nemotron-3-nano" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("nemotron-3-nano"); if (!model.servable) throw new Error("nemotron-3-nano is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Nemotron 3 Nano Omni Source: https://docs.ninjachat.ai/api-reference/models/chat/nemotron-3-nano-omni nemotron-3-nano-omni on NinjaChat — NVIDIA's compact Omni model for image-aware reasoning and function-driven agent workloads. $0.50 / MTok input, $0.90 / MTok output. `nemotron-3-nano-omni` NVIDIA — served by DigitalOcean Inference, Chutes 65,536-token context window · 65,536 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context NVIDIA's compact Omni model for image-aware reasoning and function-driven agent workloads. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.50 / MTok | \$0.90 / MTok | \$0.05 / MTok | \$0.50 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0034. Billing is metered per token. Prices are live at `GET /api/v1/models/nemotron-3-nano-omni`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "nemotron-3-nano-omni", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="nemotron-3-nano-omni", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"nemotron-3-nano-omni","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `nemotron-3-nano-omni` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `nemotron-3-nano-omni` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "nemotron-3-nano-omni" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("nemotron-3-nano-omni"); if (!model.servable) throw new Error("nemotron-3-nano-omni is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Nemotron 3 Super Source: https://docs.ninjachat.ai/api-reference/models/chat/nemotron-3-super nemotron-3-super on NinjaChat — NVIDIA's 120B/12B-active hybrid MoE for compute-efficient multi-agent reasoning and tool workflows. $0.30 / MTok input, $0.65 / MTok output. `nemotron-3-super` NVIDIA — served by DeepInfra, DigitalOcean Inference, Amazon Bedrock 262,144-token context window · 16,384 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context NVIDIA's 120B/12B-active hybrid MoE for compute-efficient multi-agent reasoning and tool workflows. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.30 / MTok | \$0.65 / MTok | \$0.03 / MTok | \$0.30 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0022. Billing is metered per token. Prices are live at `GET /api/v1/models/nemotron-3-super`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "nemotron-3-super", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="nemotron-3-super", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"nemotron-3-super","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `nemotron-3-super` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `nemotron-3-super` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "nemotron-3-super" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("nemotron-3-super"); if (!model.servable) throw new Error("nemotron-3-super is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Nemotron 3 Ultra Source: https://docs.ninjachat.ai/api-reference/models/chat/nemotron-3-ultra nemotron-3-ultra on NinjaChat — NVIDIA's 550B/55B-active frontier reasoning model for demanding agent workloads. $0.90 / MTok input, $2.40 / MTok output. `nemotron-3-ultra` NVIDIA — served by Fireworks AI, DeepInfra, Baseten, DigitalOcean Inference 262,144-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context NVIDIA's 550B/55B-active frontier reasoning model for demanding agent workloads. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.90 / MTok | \$2.40 / MTok | \$0.09 / MTok | \$0.90 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0069. Billing is metered per token. Prices are live at `GET /api/v1/models/nemotron-3-ultra`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "nemotron-3-ultra", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="nemotron-3-ultra", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"nemotron-3-ultra","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `nemotron-3-ultra` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `nemotron-3-ultra` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "nemotron-3-ultra" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("nemotron-3-ultra"); if (!model.servable) throw new Error("nemotron-3-ultra is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Nemotron Nano 12B v2 VL Source: https://docs.ninjachat.ai/api-reference/models/chat/nemotron-nano-12b-v2-vl nemotron-nano-12b-v2-vl on NinjaChat — NVIDIA's compact multimodal reasoning model for cost-efficient visual agents and tool workflows. $0.20 / MTok input, $0.60 / MTok output. `nemotron-nano-12b-v2-vl` NVIDIA — served by DigitalOcean Inference 128,000-token context window · 16,384 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context NVIDIA's compact multimodal reasoning model for cost-efficient visual agents and tool workflows. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.20 / MTok | \$0.60 / MTok | \$0.02 / MTok | \$0.20 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0016. Billing is metered per token. Prices are live at `GET /api/v1/models/nemotron-nano-12b-v2-vl`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "nemotron-nano-12b-v2-vl", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="nemotron-nano-12b-v2-vl", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"nemotron-nano-12b-v2-vl","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `nemotron-nano-12b-v2-vl` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `nemotron-nano-12b-v2-vl` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "nemotron-nano-12b-v2-vl" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("nemotron-nano-12b-v2-vl"); if (!model.servable) throw new Error("nemotron-nano-12b-v2-vl is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Nemotron Nano 9B V2 Source: https://docs.ninjachat.ai/api-reference/models/chat/nemotron-nano-9b-v2 nemotron-nano-9b-v2 on NinjaChat — NVIDIA's compact 9B controllable-reasoning model with fast tool calls. $0.06 / MTok input, $0.23 / MTok output. `nemotron-nano-9b-v2` NVIDIA — served by Amazon Bedrock 131,072-token context window · 65,536 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context NVIDIA's compact 9B controllable-reasoning model with fast tool calls. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.06 / MTok | \$0.23 / MTok | \$0.006 / MTok | \$0.06 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0006. Billing is metered per token. Prices are live at `GET /api/v1/models/nemotron-nano-9b-v2`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "nemotron-nano-9b-v2", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="nemotron-nano-9b-v2", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"nemotron-nano-9b-v2","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `nemotron-nano-9b-v2` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `nemotron-nano-9b-v2` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "nemotron-nano-9b-v2" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("nemotron-nano-9b-v2"); if (!model.servable) throw new Error("nemotron-nano-9b-v2 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Nex N2 Pro Source: https://docs.ninjachat.ai/api-reference/models/chat/nex-n2-pro nex-n2-pro on NinjaChat — Nex AGI's frontier agentic model for coding, multimodal reasoning, and long-horizon execution. $0.50 / MTok input, $2.50 / MTok output. `nex-n2-pro` Nex AGI — served by SiliconFlow 262,144-token context window · 256,000 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context Nex AGI's frontier agentic model for coding, multimodal reasoning, and long-horizon execution. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.50 / MTok | \$2.50 / MTok | \$0.25 / MTok | \$0.50 / MTok | Typical request (5K input / 1K output tokens): \~\$0.005. Billing is metered per token. Prices are live at `GET /api/v1/models/nex-n2-pro`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "nex-n2-pro", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="nex-n2-pro", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"nex-n2-pro","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `nex-n2-pro` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `nex-n2-pro` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "nex-n2-pro" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("nex-n2-pro"); if (!model.servable) throw new Error("nex-n2-pro is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Ninja 1 Source: https://docs.ninjachat.ai/api-reference/models/chat/ninja-1 ninja-1 on NinjaChat — NinjaChat's stable default-model alias, currently backed by ByteDance Seed 1.8. $0.25 / MTok input, $2.00 / MTok output. `ninja-1` NinjaChat — served by BytePlus (Seed) 256,000-token context window · 64,000 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning NinjaChat's stable default-model alias, currently backed by ByteDance Seed 1.8. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.25 / MTok | \$2.00 / MTok | \$0.05 / MTok | \$0.25 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0033. Billing is metered per token. Prices are live at `GET /api/v1/models/ninja-1`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "ninja-1", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="ninja-1", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"ninja-1","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `ninja-1` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `ninja-1` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "ninja-1" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("ninja-1"); if (!model.servable) throw new Error("ninja-1 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # o3-mini Source: https://docs.ninjachat.ai/api-reference/models/chat/o3-mini o3-mini on NinjaChat — OpenAI's o3-mini reasoning model for math, logic, and step-by-step problems. $1.10 / MTok input, $4.40 / MTok output. `o3-mini` OpenAI 200,000-token context window · 100,000 max output tokens Streaming, JSON mode, Reasoning OpenAI's o3-mini reasoning model for math, logic, and step-by-step problems. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$1.10 / MTok | \$4.40 / MTok | \$0.11 / MTok | \$1.10 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0099. Billing is metered per token. Prices are live at `GET /api/v1/models/o3-mini`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "o3-mini", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="o3-mini", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"o3-mini","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `o3-mini` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `o3-mini` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "o3-mini" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("o3-mini"); if (!model.servable) throw new Error("o3-mini is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Phi-4 Source: https://docs.ninjachat.ai/api-reference/models/chat/phi-4 phi-4 on NinjaChat — Microsoft's compact 14B reasoning model with reliable structured output. $0.07 / MTok input, $0.14 / MTok output. `phi-4` Microsoft — served by DeepInfra 16,384-token context window · 16,384 max output tokens Streaming, JSON mode, Reasoning Microsoft's compact 14B reasoning model with reliable structured output. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.07 / MTok | \$0.14 / MTok | \$0.007 / MTok | \$0.07 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0005. Billing is metered per token. Prices are live at `GET /api/v1/models/phi-4`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "phi-4", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="phi-4", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"phi-4","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `phi-4` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `phi-4` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "phi-4" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("phi-4"); if (!model.servable) throw new Error("phi-4 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen 2.5 72B Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen-2-5-72b qwen-2.5-72b on NinjaChat — Qwen's capable 72B instruction model for multilingual agents, code, math, and structured output. $0.36 / MTok input, $0.40 / MTok output. `qwen-2.5-72b` Qwen — served by DeepInfra 32,768-token context window · 8,192 max output tokens Streaming, JSON mode, Tool calling, Multilingual Qwen's capable 72B instruction model for multilingual agents, code, math, and structured output. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.36 / MTok | \$0.40 / MTok | \$0.036 / MTok | \$0.36 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0022. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen-2.5-72b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen-2.5-72b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen-2.5-72b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen-2.5-72b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen-2.5-72b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen-2.5-72b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen-2.5-72b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen-2.5-72b"); if (!model.servable) throw new Error("qwen-2.5-72b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen 3.5 122B A10B Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen-3-5-122b-a10b qwen-3.5-122b-a10b on NinjaChat — Qwen's 122B/10B-active multimodal MoE, balancing stronger quality with efficient inference. $0.29 / MTok input, $2.40 / MTok output. `qwen-3.5-122b-a10b` Qwen — served by DeepInfra, SiliconFlow 262,144-token context window · 65,536 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Qwen's 122B/10B-active multimodal MoE, balancing stronger quality with efficient inference. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.29 / MTok | \$2.40 / MTok | \$0.029 / MTok | \$0.29 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0039. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen-3.5-122b-a10b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen-3.5-122b-a10b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen-3.5-122b-a10b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen-3.5-122b-a10b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen-3.5-122b-a10b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen-3.5-122b-a10b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen-3.5-122b-a10b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen-3.5-122b-a10b"); if (!model.servable) throw new Error("qwen-3.5-122b-a10b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen 3.5 27B Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen-3-5-27b qwen-3.5-27b on NinjaChat — Qwen's dense 27B multimodal model for capable coding, reasoning, and visual tool workflows. $0.26 / MTok input, $2.60 / MTok output. `qwen-3.5-27b` Qwen — served by DeepInfra, SiliconFlow 262,144-token context window · 65,536 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Qwen's dense 27B multimodal model for capable coding, reasoning, and visual tool workflows. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.26 / MTok | \$2.60 / MTok | \$0.026 / MTok | \$0.26 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0039. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen-3.5-27b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen-3.5-27b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen-3.5-27b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen-3.5-27b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen-3.5-27b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen-3.5-27b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen-3.5-27b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen-3.5-27b"); if (!model.servable) throw new Error("qwen-3.5-27b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen 3.5 35B A3B Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen-3-5-35b-a3b qwen-3.5-35b-a3b on NinjaChat — Qwen's efficient 35B MoE activates only 3B parameters per token while supporting tools and vision. $0.14 / MTok input, $1.00 / MTok output. `qwen-3.5-35b-a3b` Qwen — served by DeepInfra 262,144-token context window · 81,920 max output tokens Streaming, Tool calling, Vision, Reasoning, Long context, Multilingual Qwen's efficient 35B MoE activates only 3B parameters per token while supporting tools and vision. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.14 / MTok | \$1.00 / MTok | \$0.014 / MTok | \$0.14 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0017. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen-3.5-35b-a3b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen-3.5-35b-a3b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen-3.5-35b-a3b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen-3.5-35b-a3b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen-3.5-35b-a3b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen-3.5-35b-a3b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen-3.5-35b-a3b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen-3.5-35b-a3b"); if (!model.servable) throw new Error("qwen-3.5-35b-a3b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen 3.5 397B A17B Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen-3-5-397b-a17b qwen-3.5-397b-a17b on NinjaChat — Qwen's 397B/17B-active multimodal flagship with broad multilingual, coding, and agentic capability. $0.55 / MTok input, $3.50 / MTok output. `qwen-3.5-397b-a17b` Qwen — served by DeepInfra, DigitalOcean Inference, Morph, Chutes 262,144-token context window · 65,536 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Qwen's 397B/17B-active multimodal flagship with broad multilingual, coding, and agentic capability. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.55 / MTok | \$3.50 / MTok | \$0.055 / MTok | \$0.55 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0063. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen-3.5-397b-a17b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen-3.5-397b-a17b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen-3.5-397b-a17b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen-3.5-397b-a17b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen-3.5-397b-a17b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen-3.5-397b-a17b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen-3.5-397b-a17b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen-3.5-397b-a17b"); if (!model.servable) throw new Error("qwen-3.5-397b-a17b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen 3.5 9B Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen-3-5-9b qwen-3.5-9b on NinjaChat — Qwen's compact 9B multimodal reasoning model with tools and a 262K-token context. $0.10 / MTok input, $0.15 / MTok output. `qwen-3.5-9b` Qwen — served by DeepInfra, SiliconFlow 262,144-token context window · 81,920 max output tokens Streaming, Tool calling, Vision, Reasoning, Long context, Multilingual Qwen's compact 9B multimodal reasoning model with tools and a 262K-token context. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.10 / MTok | \$0.15 / MTok | \$0.01 / MTok | \$0.10 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0007. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen-3.5-9b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen-3.5-9b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen-3.5-9b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen-3.5-9b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen-3.5-9b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen-3.5-9b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen-3.5-9b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen-3.5-9b"); if (!model.servable) throw new Error("qwen-3.5-9b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen 3.5 Flash Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen-3-5-flash qwen-3.5-flash on NinjaChat — Qwen's low-latency vision-language MoE for million-token multimodal analysis, portable tool use, and production agents. $0.10 / MTok input, $0.40 / MTok output. `qwen-3.5-flash` Qwen — served by Alibaba Cloud Model Studio 1,000,000-token context window · 65,536 max output tokens Streaming, Tool calling, Vision, Reasoning, Long context, Multilingual Qwen's low-latency vision-language MoE for million-token multimodal analysis, portable tool use, and production agents. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.10 / MTok | \$0.40 / MTok | \$0.01 / MTok | \$0.10 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0009. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen-3.5-flash`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen-3.5-flash", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen-3.5-flash", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen-3.5-flash","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen-3.5-flash` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen-3.5-flash` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen-3.5-flash" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen-3.5-flash"); if (!model.servable) throw new Error("qwen-3.5-flash is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen 3.6 27B Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen-3-6-27b qwen-3.6-27b on NinjaChat — Qwen's compact 27B multimodal reasoning model for fast agents, agentic coding, and visual reasoning. $0.60 / MTok input, $3.20 / MTok output. `qwen-3.6-27b` Qwen — served by DeepInfra, Groq, Morph, Chutes 131,072-token context window · 16,384 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Qwen's compact 27B multimodal reasoning model for fast agents, agentic coding, and visual reasoning. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.60 / MTok | \$3.20 / MTok | \$0.06 / MTok | \$0.60 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0062. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen-3.6-27b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen-3.6-27b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen-3.6-27b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen-3.6-27b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen-3.6-27b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen-3.6-27b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen-3.6-27b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen-3.6-27b"); if (!model.servable) throw new Error("qwen-3.6-27b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen 3.6 35B A3B Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen-3-6-35b-a3b qwen-3.6-35b-a3b on NinjaChat — Qwen's sparse 35B/3B-active multimodal model for efficient coding and agents. $0.10 / MTok input, $0.95 / MTok output. `qwen-3.6-35b-a3b` Qwen — served by DeepInfra 262,144-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Qwen's sparse 35B/3B-active multimodal model for efficient coding and agents. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.10 / MTok | \$0.95 / MTok | \$0.01 / MTok | \$0.10 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0015. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen-3.6-35b-a3b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen-3.6-35b-a3b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen-3.6-35b-a3b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen-3.6-35b-a3b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen-3.6-35b-a3b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen-3.6-35b-a3b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen-3.6-35b-a3b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen-3.6-35b-a3b"); if (!model.servable) throw new Error("qwen-3.6-35b-a3b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen 3.6 Flash Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen-3-6-flash qwen-3.6-flash on NinjaChat — Qwen's fast native vision-language model for million-token multimodal reasoning, coding, and production agents. $0.25 / MTok input, $1.50 / MTok output. `qwen-3.6-flash` Qwen — served by Alibaba Cloud Model Studio 1,000,000-token context window · 65,536 max output tokens Streaming, Tool calling, Vision, Reasoning, Long context, Multilingual Qwen's fast native vision-language model for million-token multimodal reasoning, coding, and production agents. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.25 / MTok | \$1.50 / MTok | \$0.025 / MTok | \$0.25 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0028. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen-3.6-flash`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen-3.6-flash", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen-3.6-flash", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen-3.6-flash","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen-3.6-flash` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen-3.6-flash` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen-3.6-flash" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen-3.6-flash"); if (!model.servable) throw new Error("qwen-3.6-flash is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen 3.6 Plus Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen-3-6-plus qwen-3.6-plus on NinjaChat — Qwen's native vision-language Plus model for million-token multimodal reasoning, coding, and structured agent work. $0.50 / MTok input, $3.00 / MTok output. `qwen-3.6-plus` Qwen — served by Alibaba Cloud Model Studio 1,000,000-token context window · 65,536 max output tokens Streaming, Tool calling, Vision, Reasoning, Long context, Multilingual Qwen's native vision-language Plus model for million-token multimodal reasoning, coding, and structured agent work. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.50 / MTok | \$3.00 / MTok | \$0.05 / MTok | \$0.50 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0055. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen-3.6-plus`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen-3.6-plus", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen-3.6-plus", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen-3.6-plus","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen-3.6-plus` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen-3.6-plus` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen-3.6-plus" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen-3.6-plus"); if (!model.servable) throw new Error("qwen-3.6-plus is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen 3.7 Flash Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen-3-7-flash qwen-3.7-flash on NinjaChat — Qwen's low-cost million-token multimodal model for fast reasoning, coding, video understanding, tools, and structured output. $0.225 / MTok input, $0.90 / MTok output. `qwen-3.7-flash` Qwen — served by Alibaba Cloud Model Studio 1,000,000-token context window · 65,536 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Qwen's low-cost million-token multimodal model for fast reasoning, coding, video understanding, tools, and structured output. ## Pricing | Input | Output | Cached input | Cache write | | :------------- | :------------ | :------------- | :------------- | | \$0.225 / MTok | \$0.90 / MTok | \$0.045 / MTok | \$0.225 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0021. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen-3.7-flash`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen-3.7-flash", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen-3.7-flash", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen-3.7-flash","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen-3.7-flash` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen-3.7-flash` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen-3.7-flash" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen-3.7-flash"); if (!model.servable) throw new Error("qwen-3.7-flash is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen 3.7 Max Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen-3-7-max qwen-3.7-max on NinjaChat — Qwen's proprietary Max model for long-context coding, analysis, and multilingual knowledge work. $5.00 / MTok input, $15.00 / MTok output. `qwen-3.7-max` Qwen — served by GMI Cloud, DeepInfra 256,000-token context window · 16,384 max output tokens Streaming, JSON mode, Long context, Multilingual Qwen's proprietary Max model for long-context coding, analysis, and multilingual knowledge work. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------- | :------------ | :------------ | | \$5.00 / MTok | \$15.00 / MTok | \$1.00 / MTok | \$5.00 / MTok | Typical request (5K input / 1K output tokens): \~\$0.04. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen-3.7-max`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen-3.7-max", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen-3.7-max", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen-3.7-max","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen-3.7-max` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen-3.7-max` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen-3.7-max" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen-3.7-max"); if (!model.servable) throw new Error("qwen-3.7-max is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen 3.7 Plus Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen-3-7-plus qwen-3.7-plus on NinjaChat — Qwen's fast multimodal flagship for agent loops, coding, and tool use. $0.50 / MTok input, $3.00 / MTok output. `qwen-3.7-plus` Qwen — served by Fireworks AI 262,144-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Qwen's fast multimodal flagship for agent loops, coding, and tool use. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.50 / MTok | \$3.00 / MTok | \$0.05 / MTok | \$0.50 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0055. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen-3.7-plus`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen-3.7-plus", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen-3.7-plus", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen-3.7-plus","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen-3.7-plus` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen-3.7-plus` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen-3.7-plus" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen-3.7-plus"); if (!model.servable) throw new Error("qwen-3.7-plus is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen 3.8 2.4T A95B Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen-3-8-2-4t qwen-3.8-2.4t on NinjaChat — Qwen's open-weight 2.4T-parameter sparse-MoE flagship with 95B active parameters. $2.00 / MTok input, $6.00 / MTok output. `qwen-3.8-2.4t` Qwen — served by Fireworks AI, DeepInfra 262,144-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context, Multilingual Qwen's open-weight 2.4T-parameter sparse-MoE flagship with 95B active parameters. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$2.00 / MTok | \$6.00 / MTok | \$0.20 / MTok | \$2.00 / MTok | Typical request (5K input / 1K output tokens): \~\$0.016. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen-3.8-2.4t`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen-3.8-2.4t", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen-3.8-2.4t", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen-3.8-2.4t","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen-3.8-2.4t` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen-3.8-2.4t` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen-3.8-2.4t" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen-3.8-2.4t"); if (!model.servable) throw new Error("qwen-3.8-2.4t is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen 3.8 27B Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen-3-8-27b qwen-3.8-27b on NinjaChat — Qwen's efficient 27B multimodal model for cost-efficient coding, long-context agents, and multilingual work. $0.45 / MTok input, $3.20 / MTok output. `qwen-3.8-27b` Qwen — served by DeepInfra, GMI Cloud, Chutes 1,048,575-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Qwen's efficient 27B multimodal model for cost-efficient coding, long-context agents, and multilingual work. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.45 / MTok | \$3.20 / MTok | \$0.045 / MTok | \$0.45 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0055. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen-3.8-27b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen-3.8-27b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen-3.8-27b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen-3.8-27b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen-3.8-27b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen-3.8-27b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen-3.8-27b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen-3.8-27b"); if (!model.servable) throw new Error("qwen-3.8-27b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen 3.8 Flash Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen-3-8-flash qwen-3.8-flash on NinjaChat — Alibaba's Qwen 3.8 Flash multimodal reasoning model for coding, agents, and document analysis. $0.15 / MTok input, $0.47 / MTok output. `qwen-3.8-flash` Qwen — served by Novita AI 1,000,000-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual Alibaba's Qwen 3.8 Flash multimodal reasoning model for coding, agents, and document analysis. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.15 / MTok | \$0.47 / MTok | \$0.015 / MTok | \$0.15 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0013. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen-3.8-flash`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen-3.8-flash", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen-3.8-flash", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen-3.8-flash","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen-3.8-flash` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen-3.8-flash` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen-3.8-flash" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen-3.8-flash"); if (!model.servable) throw new Error("qwen-3.8-flash is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen 3.8 Max Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen-3-8-max qwen-3.8-max on NinjaChat — Qwen's 2.4T-parameter sparse-MoE frontier model for autonomous long-horizon work. $2.00 / MTok input, $6.00 / MTok output. `qwen-3.8-max` Qwen — served by DeepInfra, Fireworks AI, GMI Cloud, DigitalOcean Inference, Atlas Cloud 262,144-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context, Multilingual Qwen's 2.4T-parameter sparse-MoE frontier model for autonomous long-horizon work. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$2.00 / MTok | \$6.00 / MTok | \$0.20 / MTok | \$2.00 / MTok | Typical request (5K input / 1K output tokens): \~\$0.016. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen-3.8-max`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen-3.8-max", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen-3.8-max", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen-3.8-max","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen-3.8-max` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen-3.8-max` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen-3.8-max" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen-3.8-max"); if (!model.servable) throw new Error("qwen-3.8-max is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen2.5 Coder 3B Instruct Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen2-5-coder-3b qwen2.5-coder-3b on NinjaChat — Qwen's tiny coding specialist for latency-sensitive and extreme-volume API workloads. $0.01 / MTok input, $0.03 / MTok output. `qwen2.5-coder-3b` Qwen — served by Nscale Serverless Inference 32,768-token context window · 8,192 max output tokens Streaming, JSON mode, Multilingual Qwen's tiny coding specialist for latency-sensitive and extreme-volume API workloads. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.01 / MTok | \$0.03 / MTok | \$0.001 / MTok | \$0.01 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0001. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen2.5-coder-3b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen2.5-coder-3b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen2.5-coder-3b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen2.5-coder-3b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen2.5-coder-3b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen2.5-coder-3b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen2.5-coder-3b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen2.5-coder-3b"); if (!model.servable) throw new Error("qwen2.5-coder-3b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen2.5 Coder 7B Instruct Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen2-5-coder-7b qwen2.5-coder-7b on NinjaChat — Qwen's compact coding specialist for inexpensive generation and structured code workflows. $0.01 / MTok input, $0.03 / MTok output. `qwen2.5-coder-7b` Qwen — served by Nscale Serverless Inference 131,072-token context window · 8,192 max output tokens Streaming, JSON mode, Long context, Multilingual Qwen's compact coding specialist for inexpensive generation and structured code workflows. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.01 / MTok | \$0.03 / MTok | \$0.001 / MTok | \$0.01 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0001. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen2.5-coder-7b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen2.5-coder-7b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen2.5-coder-7b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen2.5-coder-7b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen2.5-coder-7b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen2.5-coder-7b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen2.5-coder-7b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen2.5-coder-7b"); if (!model.servable) throw new Error("qwen2.5-coder-7b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen3 14B Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen3-14b qwen3-14b on NinjaChat — Qwen's compact hybrid reasoning model for economical structured workloads. $0.12 / MTok input, $0.24 / MTok output. `qwen3-14b` Qwen — served by DeepInfra, Nscale Serverless Inference 40,960-token context window · 16,384 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context, Multilingual Qwen's compact hybrid reasoning model for economical structured workloads. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.12 / MTok | \$0.24 / MTok | \$0.012 / MTok | \$0.12 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0009. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen3-14b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen3-14b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen3-14b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen3-14b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen3-14b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen3-14b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen3-14b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen3-14b"); if (!model.servable) throw new Error("qwen3-14b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen3 235B A22B Instruct Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen3-235b-instruct qwen3-235b-instruct on NinjaChat — Qwen's 235B-parameter instruction model combines 22B active parameters with low-cost structured tool use. $0.20 / MTok input, $0.60 / MTok output. `qwen3-235b-instruct` Qwen — served by DeepInfra, Hugging Face Inference Providers 262,144-token context window · 65,536 max output tokens Streaming, JSON mode, Tool calling, Long context, Multilingual Qwen's 235B-parameter instruction model combines 22B active parameters with low-cost structured tool use. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.20 / MTok | \$0.60 / MTok | \$0.02 / MTok | \$0.20 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0016. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen3-235b-instruct`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen3-235b-instruct", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen3-235b-instruct", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen3-235b-instruct","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen3-235b-instruct` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen3-235b-instruct` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen3-235b-instruct" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen3-235b-instruct"); if (!model.servable) throw new Error("qwen3-235b-instruct is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen3 30B A3B Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen3-30b-a3b qwen3-30b-a3b on NinjaChat — Qwen's sparse 30B model with only 3B active parameters for fast reasoning and tools. $0.12 / MTok input, $0.50 / MTok output. `qwen3-30b-a3b` Qwen — served by DeepInfra 40,960-token context window · 16,384 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context, Multilingual Qwen's sparse 30B model with only 3B active parameters for fast reasoning and tools. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.12 / MTok | \$0.50 / MTok | \$0.012 / MTok | \$0.12 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0011. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen3-30b-a3b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen3-30b-a3b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen3-30b-a3b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen3-30b-a3b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen3-30b-a3b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen3-30b-a3b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen3-30b-a3b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen3-30b-a3b"); if (!model.servable) throw new Error("qwen3-30b-a3b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen3 32B Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen3-32b qwen3-32b on NinjaChat — Qwen's efficient dense 32B model served in fast non-thinking mode with direct tool support. $0.08 / MTok input, $0.28 / MTok output. `qwen3-32b` Qwen — served by DeepInfra, Nscale Serverless Inference, Hugging Face Inference Providers 40,960-token context window · 16,384 max output tokens Streaming, JSON mode, Tool calling, Long context, Multilingual Qwen's efficient dense 32B model served in fast non-thinking mode with direct tool support. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.08 / MTok | \$0.28 / MTok | \$0.008 / MTok | \$0.08 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0007. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen3-32b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen3-32b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen3-32b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen3-32b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen3-32b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen3-32b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen3-32b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen3-32b"); if (!model.servable) throw new Error("qwen3-32b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen3 Coder 480B Turbo Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen3-coder-480b-turbo qwen3-coder-480b-turbo on NinjaChat — Qwen's 480B MoE agentic coding model in a low-latency Turbo serving tier. $0.30 / MTok input, $1.00 / MTok output. `qwen3-coder-480b-turbo` Qwen — served by DeepInfra 262,144-token context window · 262,144 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context, Multilingual Qwen's 480B MoE agentic coding model in a low-latency Turbo serving tier. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.30 / MTok | \$1.00 / MTok | \$0.10 / MTok | \$0.30 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0025. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen3-coder-480b-turbo`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen3-coder-480b-turbo", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen3-coder-480b-turbo", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen3-coder-480b-turbo","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen3-coder-480b-turbo` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen3-coder-480b-turbo` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen3-coder-480b-turbo" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen3-coder-480b-turbo"); if (!model.servable) throw new Error("qwen3-coder-480b-turbo is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen3 Coder Next Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen3-coder-next qwen3-coder-next on NinjaChat — Qwen's 80B/3B-active coding MoE for long-horizon software agents, repository navigation, and tool execution. $0.20 / MTok input, $1.50 / MTok output. `qwen3-coder-next` Qwen — served by Novita AI 262,144-token context window · 65,536 max output tokens Streaming, Long context, Multilingual Qwen's 80B/3B-active coding MoE for long-horizon software agents, repository navigation, and tool execution. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.20 / MTok | \$1.50 / MTok | \$0.02 / MTok | \$0.20 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0025. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen3-coder-next`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen3-coder-next", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen3-coder-next", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen3-coder-next","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen3-coder-next` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen3-coder-next` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen3-coder-next" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen3-coder-next"); if (!model.servable) throw new Error("qwen3-coder-next is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen3 Max Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen3-max qwen3-max on NinjaChat — Qwen's flagship non-reasoning model for fast tool-driven production workloads. $1.20 / MTok input, $6.00 / MTok output. `qwen3-max` Qwen — served by DeepInfra 256,000-token context window · 32,768 max output tokens Streaming, Tool calling, Long context, Multilingual Qwen's flagship non-reasoning model for fast tool-driven production workloads. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$1.20 / MTok | \$6.00 / MTok | \$0.24 / MTok | \$1.20 / MTok | Typical request (5K input / 1K output tokens): \~\$0.012. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen3-max`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen3-max", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen3-max", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen3-max","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen3-max` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen3-max` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen3-max" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen3-max"); if (!model.servable) throw new Error("qwen3-max is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen3 Max Thinking Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen3-max-thinking qwen3-max-thinking on NinjaChat — Qwen's flagship thinking model with adaptive tool use and extended test-time reasoning. $1.20 / MTok input, $6.00 / MTok output. `qwen3-max-thinking` Qwen — served by DeepInfra 256,000-token context window · 256,000 max output tokens Streaming, Tool calling, Reasoning, Long context, Multilingual Qwen's flagship thinking model with adaptive tool use and extended test-time reasoning. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$1.20 / MTok | \$6.00 / MTok | \$0.24 / MTok | \$1.20 / MTok | Typical request (5K input / 1K output tokens): \~\$0.012. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen3-max-thinking`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen3-max-thinking", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen3-max-thinking", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen3-max-thinking","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen3-max-thinking` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen3-max-thinking` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen3-max-thinking" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen3-max-thinking"); if (!model.servable) throw new Error("qwen3-max-thinking is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen3 Next 80B A3B Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen3-next-80b-a3b qwen3-next-80b-a3b on NinjaChat — Qwen's efficient 80B instruct model with 3B active parameters for RAG and stable tool use. $0.15 / MTok input, $1.50 / MTok output. `qwen3-next-80b-a3b` Qwen — served by DeepInfra, GMI Cloud, io.net Intelligence, Amazon Bedrock 262,144-token context window · 16,384 max output tokens Streaming, JSON mode, Tool calling, Long context, Multilingual Qwen's efficient 80B instruct model with 3B active parameters for RAG and stable tool use. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.15 / MTok | \$1.50 / MTok | \$0.015 / MTok | \$0.15 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0023. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen3-next-80b-a3b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen3-next-80b-a3b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen3-next-80b-a3b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen3-next-80b-a3b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen3-next-80b-a3b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen3-next-80b-a3b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen3-next-80b-a3b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen3-next-80b-a3b"); if (!model.servable) throw new Error("qwen3-next-80b-a3b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen3 VL 235B A22B Instruct Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen3-vl-235b-a22b qwen3-vl-235b-a22b on NinjaChat — Qwen's large sparse vision-language flagship for high-accuracy OCR, visual reasoning, coding, and tool orchestration. $0.20 / MTok input, $0.88 / MTok output. `qwen3-vl-235b-a22b` Qwen — served by DeepInfra, Novita AI 262,144-token context window · 32,768 max output tokens Streaming, JSON mode, Tool calling, Vision, Long context, Multilingual Qwen's large sparse vision-language flagship for high-accuracy OCR, visual reasoning, coding, and tool orchestration. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.20 / MTok | \$0.88 / MTok | \$0.02 / MTok | \$0.20 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0019. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen3-vl-235b-a22b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen3-vl-235b-a22b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen3-vl-235b-a22b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen3-vl-235b-a22b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen3-vl-235b-a22b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen3-vl-235b-a22b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen3-vl-235b-a22b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen3-vl-235b-a22b"); if (!model.servable) throw new Error("qwen3-vl-235b-a22b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen3 VL 30B A3B Instruct Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen3-vl-30b-a3b qwen3-vl-30b-a3b on NinjaChat — Qwen's efficient 3B-active vision-language model for image-aware agents, OCR, coding, and structured tool use. $0.20 / MTok input, $0.70 / MTok output. `qwen3-vl-30b-a3b` Qwen — served by DeepInfra, Novita AI 262,144-token context window · 32,768 max output tokens Streaming, JSON mode, Tool calling, Vision, Long context, Multilingual Qwen's efficient 3B-active vision-language model for image-aware agents, OCR, coding, and structured tool use. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.20 / MTok | \$0.70 / MTok | \$0.02 / MTok | \$0.20 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0017. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen3-vl-30b-a3b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen3-vl-30b-a3b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen3-vl-30b-a3b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen3-vl-30b-a3b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen3-vl-30b-a3b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen3-vl-30b-a3b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen3-vl-30b-a3b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen3-vl-30b-a3b"); if (!model.servable) throw new Error("qwen3-vl-30b-a3b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Qwen3 VL 32B Instruct Source: https://docs.ninjachat.ai/api-reference/models/chat/qwen3-vl-32b-instruct qwen3-vl-32b-instruct on NinjaChat — Qwen's dense 32B vision-language model for high-precision document recognition, spatial understanding, and image-aware agents. $0.16 / MTok input, $0.64 / MTok output. `qwen3-vl-32b-instruct` Qwen — served by Alibaba Cloud Model Studio 131,072-token context window · 32,768 max output tokens Streaming, JSON mode, Tool calling, Vision, Long context, Multilingual Qwen's dense 32B vision-language model for high-precision document recognition, spatial understanding, and image-aware agents. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.16 / MTok | \$0.64 / MTok | \$0.016 / MTok | \$0.16 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0015. Billing is metered per token. Prices are live at `GET /api/v1/models/qwen3-vl-32b-instruct`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwen3-vl-32b-instruct", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwen3-vl-32b-instruct", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen3-vl-32b-instruct","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwen3-vl-32b-instruct` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwen3-vl-32b-instruct` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwen3-vl-32b-instruct" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen3-vl-32b-instruct"); if (!model.servable) throw new Error("qwen3-vl-32b-instruct is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # QwQ 32B Source: https://docs.ninjachat.ai/api-reference/models/chat/qwq-32b qwq-32b on NinjaChat — Qwen's QwQ 32B reasoning-focused open model, strong at math. $0.29 / MTok input, $0.59 / MTok output. `qwq-32b` Qwen — served by Groq 32,000-token context window · 8,192 max output tokens Streaming, JSON mode, Reasoning Qwen's QwQ 32B reasoning-focused open model, strong at math. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------- | :------------ | | \$0.29 / MTok | \$0.59 / MTok | \$0.029 / MTok | \$0.29 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0021. Billing is metered per token. Prices are live at `GET /api/v1/models/qwq-32b`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "qwq-32b", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="qwq-32b", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwq-32b","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `qwq-32b` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `qwq-32b` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "qwq-32b" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwq-32b"); if (!model.servable) throw new Error("qwq-32b is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Seed 1.8 Source: https://docs.ninjachat.ai/api-reference/models/chat/seed-1-8 seed-1.8 on NinjaChat — ByteDance's long-context multimodal Seed 1.8 reasoning model with a 256K context window. $0.25 / MTok input, $2.00 / MTok output. `seed-1.8` ByteDance — served by BytePlus (Seed), DeepInfra 256,000-token context window · 65,536 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual ByteDance's long-context multimodal Seed 1.8 reasoning model with a 256K context window. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.25 / MTok | \$2.00 / MTok | \$0.05 / MTok | \$0.25 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0033. Billing is metered per token. Prices are live at `GET /api/v1/models/seed-1.8`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "seed-1.8", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="seed-1.8", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"seed-1.8","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `seed-1.8` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `seed-1.8` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "seed-1.8" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("seed-1.8"); if (!model.servable) throw new Error("seed-1.8 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Seed 2.0 Code Source: https://docs.ninjachat.ai/api-reference/models/chat/seed-2-0-code seed-2.0-code on NinjaChat — ByteDance's coding-specialized multimodal Seed 2.0 Code model for repository-scale engineering. $1.00 / MTok input, $6.00 / MTok output. `seed-2.0-code` ByteDance — served by DeepInfra, BytePlus (Ark) 256,000-token context window · 131,072 max output tokens Streaming, JSON mode, Vision, Reasoning, Long context, Multilingual ByteDance's coding-specialized multimodal Seed 2.0 Code model for repository-scale engineering. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$1.00 / MTok | \$6.00 / MTok | \$0.10 / MTok | \$1.00 / MTok | Typical request (5K input / 1K output tokens): \~\$0.011. Billing is metered per token. Prices are live at `GET /api/v1/models/seed-2.0-code`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "seed-2.0-code", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="seed-2.0-code", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"seed-2.0-code","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `seed-2.0-code` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `seed-2.0-code` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "seed-2.0-code" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("seed-2.0-code"); if (!model.servable) throw new Error("seed-2.0-code is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Seed 2.0 Mini Source: https://docs.ninjachat.ai/api-reference/models/chat/seed-2-0-mini seed-2.0-mini on NinjaChat — ByteDance's low-cost multimodal Seed 2.0 Mini reasoning model with a 256K context window. $0.20 / MTok input, $0.80 / MTok output. `seed-2.0-mini` ByteDance — served by DeepInfra, BytePlus (Ark) 256,000-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual ByteDance's low-cost multimodal Seed 2.0 Mini reasoning model with a 256K context window. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.20 / MTok | \$0.80 / MTok | \$0.02 / MTok | \$0.20 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0018. Billing is metered per token. Prices are live at `GET /api/v1/models/seed-2.0-mini`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "seed-2.0-mini", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="seed-2.0-mini", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"seed-2.0-mini","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `seed-2.0-mini` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `seed-2.0-mini` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "seed-2.0-mini" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("seed-2.0-mini"); if (!model.servable) throw new Error("seed-2.0-mini is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Seed 2.0 Pro Source: https://docs.ninjachat.ai/api-reference/models/chat/seed-2-0-pro seed-2.0-pro on NinjaChat — ByteDance's full-capability multimodal Seed 2.0 Pro reasoning model for professional agent workloads. $1.00 / MTok input, $6.00 / MTok output. `seed-2.0-pro` ByteDance — served by DeepInfra, BytePlus (Ark) 256,000-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual ByteDance's full-capability multimodal Seed 2.0 Pro reasoning model for professional agent workloads. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$1.00 / MTok | \$6.00 / MTok | \$0.10 / MTok | \$1.00 / MTok | Typical request (5K input / 1K output tokens): \~\$0.011. Billing is metered per token. Prices are live at `GET /api/v1/models/seed-2.0-pro`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "seed-2.0-pro", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="seed-2.0-pro", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"seed-2.0-pro","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `seed-2.0-pro` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `seed-2.0-pro` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "seed-2.0-pro" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("seed-2.0-pro"); if (!model.servable) throw new Error("seed-2.0-pro is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Seed 2.1 Turbo Source: https://docs.ninjachat.ai/api-reference/models/chat/seed-2-1-turbo seed-2.1-turbo on NinjaChat — ByteDance's current multimodal Seed 2.1 Turbo model for long-context agents and visual reasoning. $0.50 / MTok input, $2.50 / MTok output. `seed-2.1-turbo` ByteDance — served by BytePlus (Ark) 256,000-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Vision, Reasoning, Long context, Multilingual ByteDance's current multimodal Seed 2.1 Turbo model for long-context agents and visual reasoning. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.50 / MTok | \$2.50 / MTok | \$0.10 / MTok | \$0.50 / MTok | Typical request (5K input / 1K output tokens): \~\$0.005. Billing is metered per token. Prices are live at `GET /api/v1/models/seed-2.1-turbo`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "seed-2.1-turbo", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="seed-2.1-turbo", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"seed-2.1-turbo","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `image_url content parts`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `seed-2.1-turbo` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `seed-2.1-turbo` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "seed-2.1-turbo" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("seed-2.1-turbo"); if (!model.servable) throw new Error("seed-2.1-turbo is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Solar Pro 4 Source: https://docs.ninjachat.ai/api-reference/models/chat/solar-pro4 solar-pro4 on NinjaChat — Upstage's long-context agentic model for multi-step work, tools, and evidence-heavy documents. $0.30 / MTok input, $1.20 / MTok output. `solar-pro4` Upstage 524,288-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context, Multilingual Upstage's long-context agentic model for multi-step work, tools, and evidence-heavy documents. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.30 / MTok | \$1.20 / MTok | \$0.06 / MTok | \$0.30 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0027. Billing is metered per token. Prices are live at `GET /api/v1/models/solar-pro4`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "solar-pro4", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="solar-pro4", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"solar-pro4","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `solar-pro4` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `solar-pro4` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "solar-pro4" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("solar-pro4"); if (!model.servable) throw new Error("solar-pro4 is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Step 3.7 Flash Source: https://docs.ninjachat.ai/api-reference/models/chat/step-3-7-flash step-3.7-flash on NinjaChat — StepFun's efficient Step 3.7 Flash reasoning and coding model for fast, high-volume agents. $0.20 / MTok input, $1.15 / MTok output. `step-3.7-flash` StepFun — served by GMI Cloud, DeepInfra, Novita AI 256,000-token context window · 131,072 max output tokens Streaming, JSON mode, Tool calling, Reasoning, Long context, Multilingual StepFun's efficient Step 3.7 Flash reasoning and coding model for fast, high-volume agents. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.20 / MTok | \$1.15 / MTok | \$0.02 / MTok | \$0.20 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0022. Billing is metered per token. Prices are live at `GET /api/v1/models/step-3.7-flash`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "step-3.7-flash", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="step-3.7-flash", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"step-3.7-flash","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `tools`, `tool_choice`, `response_format`, `reasoning`, `reasoning_effort` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `step-3.7-flash` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `step-3.7-flash` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "step-3.7-flash" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("step-3.7-flash"); if (!model.servable) throw new Error("step-3.7-flash is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Uncensored AI Source: https://docs.ninjachat.ai/api-reference/models/chat/uncensored-ai uncensored-ai on NinjaChat — NinjaChat's uncensored model for creative and unrestricted use cases. $0.25 / MTok input, $2.00 / MTok output. `uncensored-ai` NinjaChat — served by BytePlus (Seed) 32,000-token context window · 4,096 max output tokens Streaming, JSON mode, Uncensored NinjaChat's uncensored model for creative and unrestricted use cases. ## Pricing | Input | Output | Cached input | Cache write | | :------------ | :------------ | :------------ | :------------ | | \$0.25 / MTok | \$2.00 / MTok | \$0.05 / MTok | \$0.25 / MTok | Typical request (5K input / 1K output tokens): \~\$0.0033. Billing is metered per token. Prices are live at `GET /api/v1/models/uncensored-ai`; the values above were read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "uncensored-ai", messages: [{ role: "user", content: "Explain edge caching in one paragraph." }], }); console.log(completion.choices[0].message.content); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="uncensored-ai", messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}], ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"uncensored-ai","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Supported parameters `messages`, `temperature`, `max_completion_tokens`, `top_p`, `stop`, `frequency_penalty`, `presence_penalty`, `seed`, `stream`, `user`, `routing`, `response_format` Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so unsupported parameters reduce the rails eligible to serve the request. ## Routing & fallbacks Pin `uncensored-ai` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `uncensored-ai` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry. ```json theme={null} { "models": [ "ninja/auto", "uncensored-ai" ], "messages": [ { "role": "user", "content": "Explain edge caching in one paragraph." } ], "routing": { "allow_fallbacks": true } } ``` You are billed at the resolved model's token rates, and only for the successful execution. ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("uncensored-ai"); if (!model.servable) throw new Error("uncensored-ai is temporarily unavailable"); console.log({ contextWindow: model.contextWindow, maxOutputTokens: model.maxOutputTokens, capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Text generation](/chat) · [Fallbacks](/fallback-chains) · [Smart routing](/smart-routing) · [Pricing](/pricing) · [All models](/models-overview) # Bria 3.2 Source: https://docs.ninjachat.ai/api-reference/models/image/bria-3-2 bria-3.2 on NinjaChat — Bria's 3.2 licensed-data text-to-image model. $0.04 per image. `bria-3.2` Bria — served by DeepInfra \$0.04 per image Text to image Bria's 3.2 licensed-data text-to-image model. ## Pricing | Unit | Price | | :-------- | :----- | | Per image | \$0.04 | Billed per image. Prices are live at `GET /api/v1/models/bria-3.2`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "bria-3.2", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="bria-3.2", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"bria-3.2","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("bria-3.2"); if (!model.servable) throw new Error("bria-3.2 is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # Bria FIBO Source: https://docs.ninjachat.ai/api-reference/models/image/bria-fibo bria-fibo on NinjaChat — Bria's FIBO licensed-data text-to-image model. $0.04 per image. `bria-fibo` Bria — served by DeepInfra \$0.04 per image Text to image Bria's FIBO licensed-data text-to-image model. ## Pricing | Unit | Price | | :-------- | :----- | | Per image | \$0.04 | Billed per image. Prices are live at `GET /api/v1/models/bria-fibo`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "bria-fibo", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="bria-fibo", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"bria-fibo","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("bria-fibo"); if (!model.servable) throw new Error("bria-fibo is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # FLUX 1.1 Pro Source: https://docs.ninjachat.ai/api-reference/models/image/flux-1-1-pro flux-1.1-pro on NinjaChat — Black Forest Labs' FLUX 1.1 Pro for high-quality text-to-image. $0.04 per image. `flux-1.1-pro` Black Forest Labs — served by DeepInfra \$0.04 per image Text to image Black Forest Labs' FLUX 1.1 Pro for high-quality text-to-image. ## Pricing | Unit | Price | | :-------- | :----- | | Per image | \$0.04 | Billed per image. Prices are live at `GET /api/v1/models/flux-1.1-pro`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "flux-1.1-pro", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="flux-1.1-pro", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"flux-1.1-pro","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("flux-1.1-pro"); if (!model.servable) throw new Error("flux-1.1-pro is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # FLUX.1 Dev Source: https://docs.ninjachat.ai/api-reference/models/image/flux-1-dev flux-1-dev on NinjaChat — Black Forest Labs' open-weight FLUX.1 Dev. $0.009 per image. `flux-1-dev` Black Forest Labs — served by DeepInfra \$0.009 per image Text to image Black Forest Labs' open-weight FLUX.1 Dev. ## Pricing | Unit | Price | | :-------- | :------ | | Per image | \$0.009 | Billed per image. Prices are live at `GET /api/v1/models/flux-1-dev`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "flux-1-dev", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="flux-1-dev", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"flux-1-dev","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("flux-1-dev"); if (!model.servable) throw new Error("flux-1-dev is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # FLUX 1.1 Pro Ultra Source: https://docs.ninjachat.ai/api-reference/models/image/flux-1-pro-ultra flux-1-pro-ultra on NinjaChat — Black Forest Labs' FLUX 1.1 Pro Ultra for up to 4MP output. $0.06 per image. `flux-1-pro-ultra` Black Forest Labs \$0.06 per image Text to image Black Forest Labs' FLUX 1.1 Pro Ultra for up to 4MP output. ## Pricing | Unit | Price | | :-------- | :----- | | Per image | \$0.06 | Billed per image. Prices are live at `GET /api/v1/models/flux-1-pro-ultra`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "flux-1-pro-ultra", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="flux-1-pro-ultra", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"flux-1-pro-ultra","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("flux-1-pro-ultra"); if (!model.servable) throw new Error("flux-1-pro-ultra is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # FLUX.2 Dev Source: https://docs.ninjachat.ai/api-reference/models/image/flux-2-dev flux-2-dev on NinjaChat — Black Forest Labs' open-weight FLUX.2 Dev for text-to-image with reference images. $0.024 per image. `flux-2-dev` Black Forest Labs — served by Replicate, DeepInfra \$0.024 per image Image reference Black Forest Labs' open-weight FLUX.2 Dev for text-to-image with reference images. ## Pricing | Unit | Price | | :-------- | :------ | | Per image | \$0.024 | Billed per image. Prices are live at `GET /api/v1/models/flux-2-dev`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "flux-2-dev", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="flux-2-dev", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"flux-2-dev","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("flux-2-dev"); if (!model.servable) throw new Error("flux-2-dev is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # FLUX.2 Flex Source: https://docs.ninjachat.ai/api-reference/models/image/flux-2-flex flux-2-flex on NinjaChat — Black Forest Labs' FLUX.2 Flex with reference-image control and tunable detail. $0.06 per image. `flux-2-flex` Black Forest Labs — served by Replicate \$0.06 per image Image reference Black Forest Labs' FLUX.2 Flex with reference-image control and tunable detail. ## Pricing | Unit | Price | | :-------- | :----- | | Per image | \$0.06 | Billed per image. Prices are live at `GET /api/v1/models/flux-2-flex`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "flux-2-flex", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="flux-2-flex", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"flux-2-flex","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("flux-2-flex"); if (!model.servable) throw new Error("flux-2-flex is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # FLUX.2 Klein Source: https://docs.ninjachat.ai/api-reference/models/image/flux-2-klein flux-2-klein on NinjaChat — Black Forest Labs' fastest, lowest-cost FLUX.2 model. $0.014 per image. `flux-2-klein` Black Forest Labs \$0.014 per image Text to image Black Forest Labs' fastest, lowest-cost FLUX.2 model. ## Pricing | Unit | Price | | :-------- | :------ | | Per image | \$0.014 | Billed per image. Prices are live at `GET /api/v1/models/flux-2-klein`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "flux-2-klein", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="flux-2-klein", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"flux-2-klein","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("flux-2-klein"); if (!model.servable) throw new Error("flux-2-klein is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # FLUX.2 Klein 4B Source: https://docs.ninjachat.ai/api-reference/models/image/flux-2-klein-4b flux-2-klein-4b on NinjaChat — Black Forest Labs' 4B FLUX.2 Klein for the cheapest drafts. $0.014 per image. `flux-2-klein-4b` Black Forest Labs — served by DeepInfra \$0.014 per image Text to image Black Forest Labs' 4B FLUX.2 Klein for the cheapest drafts. ## Pricing | Unit | Price | | :-------- | :------ | | Per image | \$0.014 | Billed per image. Prices are live at `GET /api/v1/models/flux-2-klein-4b`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "flux-2-klein-4b", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="flux-2-klein-4b", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"flux-2-klein-4b","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("flux-2-klein-4b"); if (!model.servable) throw new Error("flux-2-klein-4b is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # FLUX.2 Klein 9B Source: https://docs.ninjachat.ai/api-reference/models/image/flux-2-klein-9b flux-2-klein-9b on NinjaChat — Black Forest Labs' 9B FLUX.2 Klein for fast, low-cost generation. $0.015 per image. `flux-2-klein-9b` Black Forest Labs — served by DeepInfra \$0.015 per image Text to image Black Forest Labs' 9B FLUX.2 Klein for fast, low-cost generation. ## Pricing | Unit | Price | | :-------- | :------ | | Per image | \$0.015 | Billed per image. Prices are live at `GET /api/v1/models/flux-2-klein-9b`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "flux-2-klein-9b", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="flux-2-klein-9b", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"flux-2-klein-9b","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("flux-2-klein-9b"); if (!model.servable) throw new Error("flux-2-klein-9b is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # FLUX.2 Max Source: https://docs.ninjachat.ai/api-reference/models/image/flux-2-max flux-2-max on NinjaChat — Black Forest Labs' highest-quality FLUX.2 model. $0.07 per image. `flux-2-max` Black Forest Labs — served by DeepInfra \$0.07 per image Text to image Black Forest Labs' highest-quality FLUX.2 model. ## Pricing | Unit | Price | | :-------- | :----- | | Per image | \$0.07 | Billed per image. Prices are live at `GET /api/v1/models/flux-2-max`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "flux-2-max", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="flux-2-max", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"flux-2-max","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("flux-2-max"); if (!model.servable) throw new Error("flux-2-max is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # FLUX.2 Pro Source: https://docs.ninjachat.ai/api-reference/models/image/flux-2-pro flux-2-pro on NinjaChat — Black Forest Labs' balanced FLUX.2 model for production text-to-image. $0.03 per image. `flux-2-pro` Black Forest Labs — served by Black Forest Labs, DeepInfra \$0.03 per image Text to image Black Forest Labs' balanced FLUX.2 model for production text-to-image. ## Pricing | Unit | Price | | :-------- | :----- | | Per image | \$0.03 | Billed per image. Prices are live at `GET /api/v1/models/flux-2-pro`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "flux-2-pro", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="flux-2-pro", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"flux-2-pro","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("flux-2-pro"); if (!model.servable) throw new Error("flux-2-pro is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # FLUX.1 Kontext Dev Source: https://docs.ninjachat.ai/api-reference/models/image/flux-kontext-dev flux-kontext-dev on NinjaChat — Black Forest Labs' open-weight Kontext editor; a reference image is required. $0.025 per image. `flux-kontext-dev` Black Forest Labs — served by Replicate \$0.025 per image Image editing, Image reference Black Forest Labs' open-weight Kontext editor; a reference image is required. ## Pricing | Unit | Price | | :-------- | :------ | | Per image | \$0.025 | Billed per image. Prices are live at `GET /api/v1/models/flux-kontext-dev`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). This is an editing model: pass the source image as a public HTTPS URL in `image`. ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "flux-kontext-dev", prompt: "Replace the background with a clean studio backdrop", image: "https://your-cdn.example/source.png", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="flux-kontext-dev", prompt="Replace the background with a clean studio backdrop", image="https://your-cdn.example/source.png", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"flux-kontext-dev","prompt":"Replace the background with a clean studio backdrop","image":"https://your-cdn.example/source.png"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("flux-kontext-dev"); if (!model.servable) throw new Error("flux-kontext-dev is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # FLUX.1 Kontext Max Source: https://docs.ninjachat.ai/api-reference/models/image/flux-kontext-max flux-kontext-max on NinjaChat — Black Forest Labs' highest-fidelity Kontext editing model. $0.08 per image. `flux-kontext-max` Black Forest Labs \$0.08 per image Image reference Black Forest Labs' highest-fidelity Kontext editing model. ## Pricing | Unit | Price | | :-------- | :----- | | Per image | \$0.08 | Billed per image. Prices are live at `GET /api/v1/models/flux-kontext-max`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "flux-kontext-max", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="flux-kontext-max", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"flux-kontext-max","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("flux-kontext-max"); if (!model.servable) throw new Error("flux-kontext-max is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # FLUX.1 Kontext Pro Source: https://docs.ninjachat.ai/api-reference/models/image/flux-kontext-pro flux-kontext-pro on NinjaChat — Black Forest Labs' context-aware image editing with text instructions. $0.04 per image. `flux-kontext-pro` Black Forest Labs \$0.04 per image Image reference Black Forest Labs' context-aware image editing with text instructions. ## Pricing | Unit | Price | | :-------- | :----- | | Per image | \$0.04 | Billed per image. Prices are live at `GET /api/v1/models/flux-kontext-pro`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "flux-kontext-pro", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="flux-kontext-pro", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"flux-kontext-pro","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("flux-kontext-pro"); if (!model.servable) throw new Error("flux-kontext-pro is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # GPT Image 2 Source: https://docs.ninjachat.ai/api-reference/models/image/gpt-image-2 gpt-image-2 on NinjaChat — OpenAI's GPT Image 2 for instruction-following image generation and editing. $0.128 per image. `gpt-image-2` OpenAI \$0.128 per image Image reference OpenAI's GPT Image 2 for instruction-following image generation and editing. ## Pricing | Unit | Price | | :-------- | :------ | | Per image | \$0.128 | Billed per image. Prices are live at `GET /api/v1/models/gpt-image-2`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "gpt-image-2", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="gpt-image-2", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-image-2","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("gpt-image-2"); if (!model.servable) throw new Error("gpt-image-2 is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # Grok Imagine Source: https://docs.ninjachat.ai/api-reference/models/image/grok-imagine grok-imagine on NinjaChat — xAI's Grok Imagine text-to-image model. $0.02 per image. `grok-imagine` xAI \$0.02 per image Image reference xAI's Grok Imagine text-to-image model. ## Pricing | Unit | Price | | :-------- | :----- | | Per image | \$0.02 | Billed per image. Prices are live at `GET /api/v1/models/grok-imagine`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "grok-imagine", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="grok-imagine", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"grok-imagine","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("grok-imagine"); if (!model.servable) throw new Error("grok-imagine is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # Grok Imagine Image 2.0 Source: https://docs.ninjachat.ai/api-reference/models/image/grok-imagine-image-2-0 grok-imagine-image-2.0 on NinjaChat — xAI's second-generation Grok Imagine image model. $0.04 per image. `grok-imagine-image-2.0` xAI \$0.04 per image Text to image xAI's second-generation Grok Imagine image model. ## Pricing | Unit | Price | | :-------- | :----- | | Per image | \$0.04 | Billed per image. Prices are live at `GET /api/v1/models/grok-imagine-image-2.0`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "grok-imagine-image-2.0", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="grok-imagine-image-2.0", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"grok-imagine-image-2.0","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("grok-imagine-image-2.0"); if (!model.servable) throw new Error("grok-imagine-image-2.0 is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # Grok Imagine Image Quality Source: https://docs.ninjachat.ai/api-reference/models/image/grok-imagine-image-quality grok-imagine-image-quality on NinjaChat — xAI's highest-fidelity Grok Imagine image tier. $0.05 per image. `grok-imagine-image-quality` xAI \$0.05 per image Text to image xAI's highest-fidelity Grok Imagine image tier. ## Pricing | Unit | Price | | :-------- | :----- | | Per image | \$0.05 | Billed per image. Prices are live at `GET /api/v1/models/grok-imagine-image-quality`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "grok-imagine-image-quality", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="grok-imagine-image-quality", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"grok-imagine-image-quality","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("grok-imagine-image-quality"); if (!model.servable) throw new Error("grok-imagine-image-quality is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # Nano Banana Source: https://docs.ninjachat.ai/api-reference/models/image/nano-banana nano-banana on NinjaChat — Google's Gemini 2.5 Flash Image for fast conversational image generation and editing. $0.02 per image. `nano-banana` Google \$0.02 per image Image reference Google's Gemini 2.5 Flash Image for fast conversational image generation and editing. ## Pricing | Unit | Price | | :-------- | :----- | | Per image | \$0.02 | Billed per image. Prices are live at `GET /api/v1/models/nano-banana`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "nano-banana", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="nano-banana", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"nano-banana","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("nano-banana"); if (!model.servable) throw new Error("nano-banana is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # Nano Banana 2 Source: https://docs.ninjachat.ai/api-reference/models/image/nano-banana-2 nano-banana-2 on NinjaChat — Google's Gemini 3.1 Flash Image with 4K output and strong text rendering. $0.045 per image. `nano-banana-2` Google \$0.045 per image Image reference Google's Gemini 3.1 Flash Image with 4K output and strong text rendering. ## Pricing | Unit | Price | | :-------- | :------ | | Per image | \$0.045 | Billed per image. Prices are live at `GET /api/v1/models/nano-banana-2`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "nano-banana-2", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="nano-banana-2", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"nano-banana-2","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("nano-banana-2"); if (!model.servable) throw new Error("nano-banana-2 is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # Nano Banana 2 Lite Source: https://docs.ninjachat.ai/api-reference/models/image/nano-banana-2-lite nano-banana-2-lite on NinjaChat — Google's lightest Nano Banana 2 tier for high-volume image generation. $0.034 per image. `nano-banana-2-lite` Google — served by DeepInfra \$0.034 per image Text to image Google's lightest Nano Banana 2 tier for high-volume image generation. ## Pricing | Unit | Price | | :-------- | :------ | | Per image | \$0.034 | Billed per image. Prices are live at `GET /api/v1/models/nano-banana-2-lite`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "nano-banana-2-lite", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="nano-banana-2-lite", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"nano-banana-2-lite","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("nano-banana-2-lite"); if (!model.servable) throw new Error("nano-banana-2-lite is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # Nano Banana Pro Source: https://docs.ninjachat.ai/api-reference/models/image/nano-banana-pro nano-banana-pro on NinjaChat — Google's Gemini 3 Pro Image for complex, multi-element compositions at 4K. $0.08 per image. `nano-banana-pro` Google \$0.08 per image Image reference Google's Gemini 3 Pro Image for complex, multi-element compositions at 4K. ## Pricing | Unit | Price | | :-------- | :----- | | Per image | \$0.08 | Billed per image. Prices are live at `GET /api/v1/models/nano-banana-pro`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "nano-banana-pro", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="nano-banana-pro", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"nano-banana-pro","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("nano-banana-pro"); if (!model.servable) throw new Error("nano-banana-pro is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # Pruna P-Image Source: https://docs.ninjachat.ai/api-reference/models/image/pruna-p-image pruna-p-image on NinjaChat — Pruna AI's P-Image for very low-cost drafts. $0.005 per image. `pruna-p-image` Pruna AI — served by DeepInfra \$0.005 per image Text to image Pruna AI's P-Image for very low-cost drafts. ## Pricing | Unit | Price | | :-------- | :------ | | Per image | \$0.005 | Billed per image. Prices are live at `GET /api/v1/models/pruna-p-image`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "pruna-p-image", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="pruna-p-image", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"pruna-p-image","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("pruna-p-image"); if (!model.servable) throw new Error("pruna-p-image is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # Qwen Image 2512 Source: https://docs.ninjachat.ai/api-reference/models/image/qwen-image-2512 qwen-image-2512 on NinjaChat — Qwen's December 2025 Image release with reference-image support. $0.02 per image. `qwen-image-2512` Qwen — served by Replicate \$0.02 per image Image reference Qwen's December 2025 Image release with reference-image support. ## Pricing | Unit | Price | | :-------- | :----- | | Per image | \$0.02 | Billed per image. Prices are live at `GET /api/v1/models/qwen-image-2512`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "qwen-image-2512", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="qwen-image-2512", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen-image-2512","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen-image-2512"); if (!model.servable) throw new Error("qwen-image-2512 is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # Qwen Image Edit 2511 Source: https://docs.ninjachat.ai/api-reference/models/image/qwen-image-edit-2511 qwen-image-edit-2511 on NinjaChat — Qwen's November 2025 image editor; a reference image is required. $0.03 per image. `qwen-image-edit-2511` Qwen — served by Replicate \$0.03 per image Image editing, Image reference Qwen's November 2025 image editor; a reference image is required. ## Pricing | Unit | Price | | :-------- | :----- | | Per image | \$0.03 | Billed per image. Prices are live at `GET /api/v1/models/qwen-image-edit-2511`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). This is an editing model: pass the source image as a public HTTPS URL in `image`. ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "qwen-image-edit-2511", prompt: "Replace the background with a clean studio backdrop", image: "https://your-cdn.example/source.png", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="qwen-image-edit-2511", prompt="Replace the background with a clean studio backdrop", image="https://your-cdn.example/source.png", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen-image-edit-2511","prompt":"Replace the background with a clean studio backdrop","image":"https://your-cdn.example/source.png"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen-image-edit-2511"); if (!model.servable) throw new Error("qwen-image-edit-2511 is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # Qwen Image Edit Max Source: https://docs.ninjachat.ai/api-reference/models/image/qwen-image-edit-max qwen-image-edit-max on NinjaChat — Qwen's highest-quality image editor; a reference image is required. $0.075 per image. `qwen-image-edit-max` Qwen — served by DeepInfra \$0.075 per image Image editing, Image reference Qwen's highest-quality image editor; a reference image is required. ## Pricing | Unit | Price | | :-------- | :------ | | Per image | \$0.075 | Billed per image. Prices are live at `GET /api/v1/models/qwen-image-edit-max`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). This is an editing model: pass the source image as a public HTTPS URL in `image`. ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "qwen-image-edit-max", prompt: "Replace the background with a clean studio backdrop", image: "https://your-cdn.example/source.png", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="qwen-image-edit-max", prompt="Replace the background with a clean studio backdrop", image="https://your-cdn.example/source.png", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen-image-edit-max","prompt":"Replace the background with a clean studio backdrop","image":"https://your-cdn.example/source.png"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen-image-edit-max"); if (!model.servable) throw new Error("qwen-image-edit-max is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # Qwen Image Max Source: https://docs.ninjachat.ai/api-reference/models/image/qwen-image-max qwen-image-max on NinjaChat — Qwen's highest-quality Image tier. $0.075 per image. `qwen-image-max` Qwen — served by DeepInfra \$0.075 per image Text to image Qwen's highest-quality Image tier. ## Pricing | Unit | Price | | :-------- | :------ | | Per image | \$0.075 | Billed per image. Prices are live at `GET /api/v1/models/qwen-image-max`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "qwen-image-max", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="qwen-image-max", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen-image-max","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("qwen-image-max"); if (!model.servable) throw new Error("qwen-image-max is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # Recraft V3 Source: https://docs.ninjachat.ai/api-reference/models/image/recraft-v3 recraft-v3 on NinjaChat — Recraft V3 for brand-grade vector and raster design assets. $0.04 per image. `recraft-v3` Recraft — served by Replicate \$0.04 per image Text to image Recraft V3 for brand-grade vector and raster design assets. ## Pricing | Unit | Price | | :-------- | :----- | | Per image | \$0.04 | Billed per image. Prices are live at `GET /api/v1/models/recraft-v3`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "recraft-v3", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="recraft-v3", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"recraft-v3","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("recraft-v3"); if (!model.servable) throw new Error("recraft-v3 is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # Runway Gen-4 Image Turbo Source: https://docs.ninjachat.ai/api-reference/models/image/runway-gen4-image-turbo runway-gen4-image-turbo on NinjaChat — Runway's Gen-4 Image Turbo; requires one to three reference images. $0.02 per image. `runway-gen4-image-turbo` Runway \$0.02 per image Image editing, Image reference Runway's Gen-4 Image Turbo; requires one to three reference images. ## Pricing | Unit | Price | | :-------- | :----- | | Per image | \$0.02 | Billed per image. Prices are live at `GET /api/v1/models/runway-gen4-image-turbo`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). This is an editing model: pass the source image as a public HTTPS URL in `image`. ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "runway-gen4-image-turbo", prompt: "Replace the background with a clean studio backdrop", image: "https://your-cdn.example/source.png", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="runway-gen4-image-turbo", prompt="Replace the background with a clean studio backdrop", image="https://your-cdn.example/source.png", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"runway-gen4-image-turbo","prompt":"Replace the background with a clean studio backdrop","image":"https://your-cdn.example/source.png"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("runway-gen4-image-turbo"); if (!model.servable) throw new Error("runway-gen4-image-turbo is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # SDXL Turbo Source: https://docs.ninjachat.ai/api-reference/models/image/sdxl-turbo sdxl-turbo on NinjaChat — Stability AI's SDXL Turbo for near-free single-step drafts. $0.0002 per image. `sdxl-turbo` Stability AI — served by DeepInfra \$0.0002 per image Text to image Stability AI's SDXL Turbo for near-free single-step drafts. ## Pricing | Unit | Price | | :-------- | :------- | | Per image | \$0.0002 | Billed per image. Prices are live at `GET /api/v1/models/sdxl-turbo`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "sdxl-turbo", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="sdxl-turbo", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"sdxl-turbo","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("sdxl-turbo"); if (!model.servable) throw new Error("sdxl-turbo is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # Seedream 4.5 Source: https://docs.ninjachat.ai/api-reference/models/image/seedream seedream on NinjaChat — ByteDance's Seedream 4.5 for fast, high-fidelity text-to-image. $0.04 per image. `seedream` ByteDance — served by BytePlus \$0.04 per image Image reference ByteDance's Seedream 4.5 for fast, high-fidelity text-to-image. ## Pricing | Unit | Price | | :-------- | :----- | | Per image | \$0.04 | Billed per image. Prices are live at `GET /api/v1/models/seedream`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "seedream", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="seedream", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"seedream","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("seedream"); if (!model.servable) throw new Error("seedream is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # Seedream 4.5 Source: https://docs.ninjachat.ai/api-reference/models/image/seedream-4-5 seedream-4.5 on NinjaChat — ByteDance's Seedream 4.5 text-to-image model. $0.04 per image. `seedream-4.5` ByteDance — served by DeepInfra \$0.04 per image Text to image ByteDance's Seedream 4.5 text-to-image model. ## Pricing | Unit | Price | | :-------- | :----- | | Per image | \$0.04 | Billed per image. Prices are live at `GET /api/v1/models/seedream-4.5`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "seedream-4.5", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="seedream-4.5", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"seedream-4.5","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("seedream-4.5"); if (!model.servable) throw new Error("seedream-4.5 is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # Seedream 5.0 Lite Source: https://docs.ninjachat.ai/api-reference/models/image/seedream-5-lite seedream-5-lite on NinjaChat — ByteDance's lower-cost Seedream 5.0 tier. $0.035 per image. `seedream-5-lite` ByteDance — served by BytePlus \$0.035 per image Image reference ByteDance's lower-cost Seedream 5.0 tier. ## Pricing | Unit | Price | | :-------- | :------ | | Per image | \$0.035 | Billed per image. Prices are live at `GET /api/v1/models/seedream-5-lite`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "seedream-5-lite", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="seedream-5-lite", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"seedream-5-lite","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("seedream-5-lite"); if (!model.servable) throw new Error("seedream-5-lite is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # Seedream 5.0 Pro Source: https://docs.ninjachat.ai/api-reference/models/image/seedream-5-pro seedream-5-pro on NinjaChat — ByteDance's flagship Seedream 5.0 text-to-image model. $0.09 per image. `seedream-5-pro` ByteDance — served by BytePlus \$0.09 per image Image reference ByteDance's flagship Seedream 5.0 text-to-image model. ## Pricing | Unit | Price | | :-------- | :----- | | Per image | \$0.09 | Billed per image. Prices are live at `GET /api/v1/models/seedream-5-pro`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "seedream-5-pro", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="seedream-5-pro", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"seedream-5-pro","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("seedream-5-pro"); if (!model.servable) throw new Error("seedream-5-pro is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # Stable Diffusion 3.5 Large Source: https://docs.ninjachat.ai/api-reference/models/image/stable-diffusion-3-5-large stable-diffusion-3.5-large on NinjaChat — Stability AI's Stable Diffusion 3.5 Large. $0.08 per image. `stable-diffusion-3.5-large` Stability AI — served by DigitalOcean Inference \$0.08 per image Text to image Stability AI's Stable Diffusion 3.5 Large. ## Pricing | Unit | Price | | :-------- | :----- | | Per image | \$0.08 | Billed per image. Prices are live at `GET /api/v1/models/stable-diffusion-3.5-large`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "stable-diffusion-3.5-large", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="stable-diffusion-3.5-large", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"stable-diffusion-3.5-large","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("stable-diffusion-3.5-large"); if (!model.servable) throw new Error("stable-diffusion-3.5-large is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # Wan 2.6 Image Source: https://docs.ninjachat.ai/api-reference/models/image/wan-2-6-image wan-2.6-image on NinjaChat — Alibaba's Wan 2.6 text-to-image model. $0.03 per image. `wan-2.6-image` Alibaba — served by DeepInfra \$0.03 per image Text to image Alibaba's Wan 2.6 text-to-image model. ## Pricing | Unit | Price | | :-------- | :----- | | Per image | \$0.03 | Billed per image. Prices are live at `GET /api/v1/models/wan-2.6-image`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "wan-2.6-image", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="wan-2.6-image", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"wan-2.6-image","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("wan-2.6-image"); if (!model.servable) throw new Error("wan-2.6-image is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # Wan 2.7 Image Edit Source: https://docs.ninjachat.ai/api-reference/models/image/wan-2-7-image-edit wan-2.7-image-edit on NinjaChat — Alibaba's Wan 2.7 image editor; a reference image is required. $0.03 per image. `wan-2.7-image-edit` Alibaba — served by DeepInfra \$0.03 per image Image reference Alibaba's Wan 2.7 image editor; a reference image is required. ## Pricing | Unit | Price | | :-------- | :----- | | Per image | \$0.03 | Billed per image. Prices are live at `GET /api/v1/models/wan-2.7-image-edit`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "wan-2.7-image-edit", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="wan-2.7-image-edit", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"wan-2.7-image-edit","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("wan-2.7-image-edit"); if (!model.servable) throw new Error("wan-2.7-image-edit is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # Z-Image Turbo Source: https://docs.ninjachat.ai/api-reference/models/image/z-image-turbo z-image-turbo on NinjaChat — Alibaba Tongyi's Z-Image Turbo for very low-cost text-to-image drafts. $0.01 per image. `z-image-turbo` Alibaba — served by Replicate \$0.01 per image Text to image Alibaba Tongyi's Z-Image Turbo for very low-cost text-to-image drafts. ## Pricing | Unit | Price | | :-------- | :----- | | Per image | \$0.01 | Billed per image. Prices are live at `GET /api/v1/models/z-image-turbo`; the value above was read from that endpoint when this page was generated. ## Use this model The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const image = await client.images.generate({ model: "z-image-turbo", prompt: "Editorial product photograph, precise studio lighting", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} image = client.images.generate( model="z-image-turbo", prompt="Editorial product photograph, precise studio lighting", ) print(image["data"][0]["url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/images/generations \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"z-image-turbo","prompt":"Editorial product photograph, precise studio lighting"}' ``` ## Supported parameters `prompt`, `model`, `n`, `size`, `aspect_ratio`, `image`, `width`, `height` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("z-image-turbo"); if (!model.servable) throw new Error("z-image-turbo is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview) # Grok Imagine Video Source: https://docs.ninjachat.ai/api-reference/models/video/grok-imagine-video grok-imagine-video on NinjaChat — xAI's Grok Imagine text- and image-to-video model. $0.75 per video. `grok-imagine-video` xAI \$0.75 per video Image reference xAI's Grok Imagine text- and image-to-video model. ## Pricing | Unit | Price | | :-------- | :----- | | Per video | \$0.75 | Billed per video. Prices are live at `GET /api/v1/models/grok-imagine-video`; the value above was read from that endpoint when this page was generated. ## Use this model Video is asynchronous: `videos.generate` returns a queued job, and `waitFor` / `wait_for` polls `GET /videos/{id}` until it completes. The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const job = await client.videos.generate({ model: "grok-imagine-video", prompt: "A cinematic aerial push across a desert at blue hour", }); const video = await client.videos.waitFor(job.id); console.log(video.video_url); ``` ```python Python SDK theme={null} job = client.videos.generate( model="grok-imagine-video", prompt="A cinematic aerial push across a desert at blue hour", ) video = client.videos.wait_for(job["id"]) print(video["video_url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/videos \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"grok-imagine-video","prompt":"A cinematic aerial push across a desert at blue hour"}' # then poll until status is "completed" curl https://www.ninjachat.ai/api/v1/videos/$VIDEO_ID \ -H "Authorization: Bearer $NINJACHAT_API_KEY" ``` ## Supported parameters `prompt`, `model`, `duration`, `aspect_ratio`, `image_url`, `reference_images`, `reference_video`, `reference_audio`, `watermark` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("grok-imagine-video"); if (!model.servable) throw new Error("grok-imagine-video is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Video generation](/video-generation) · [Pricing](/pricing) · [All models](/models-overview) # Grok Imagine Video 1.5 Source: https://docs.ninjachat.ai/api-reference/models/video/grok-imagine-video-1-5 grok-imagine-video-1.5 on NinjaChat — xAI's Grok Imagine Video 1.5. $1.20 per video. `grok-imagine-video-1.5` xAI \$1.20 per video Image reference xAI's Grok Imagine Video 1.5. ## Pricing | Unit | Price | | :-------- | :----- | | Per video | \$1.20 | Billed per video. Prices are live at `GET /api/v1/models/grok-imagine-video-1.5`; the value above was read from that endpoint when this page was generated. ## Use this model Video is asynchronous: `videos.generate` returns a queued job, and `waitFor` / `wait_for` polls `GET /videos/{id}` until it completes. The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const job = await client.videos.generate({ model: "grok-imagine-video-1.5", prompt: "A cinematic aerial push across a desert at blue hour", }); const video = await client.videos.waitFor(job.id); console.log(video.video_url); ``` ```python Python SDK theme={null} job = client.videos.generate( model="grok-imagine-video-1.5", prompt="A cinematic aerial push across a desert at blue hour", ) video = client.videos.wait_for(job["id"]) print(video["video_url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/videos \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"grok-imagine-video-1.5","prompt":"A cinematic aerial push across a desert at blue hour"}' # then poll until status is "completed" curl https://www.ninjachat.ai/api/v1/videos/$VIDEO_ID \ -H "Authorization: Bearer $NINJACHAT_API_KEY" ``` ## Supported parameters `prompt`, `model`, `duration`, `aspect_ratio`, `image_url`, `reference_images`, `reference_video`, `reference_audio`, `watermark` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("grok-imagine-video-1.5"); if (!model.servable) throw new Error("grok-imagine-video-1.5 is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Video generation](/video-generation) · [Pricing](/pricing) · [All models](/models-overview) # Kling 2.6 Pro Source: https://docs.ninjachat.ai/api-reference/models/video/kling-video kling-video on NinjaChat — Kuaishou's Kling 2.6 Pro for fluid text- and image-to-video with audio. $1.40 per video. `kling-video` Kuaishou — served by Replicate \$1.40 per video Image reference, Audio output Kuaishou's Kling 2.6 Pro for fluid text- and image-to-video with audio. ## Pricing | Unit | Price | | :-------- | :----- | | Per video | \$1.40 | Billed per video. Prices are live at `GET /api/v1/models/kling-video`; the value above was read from that endpoint when this page was generated. ## Use this model Video is asynchronous: `videos.generate` returns a queued job, and `waitFor` / `wait_for` polls `GET /videos/{id}` until it completes. The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const job = await client.videos.generate({ model: "kling-video", prompt: "A cinematic aerial push across a desert at blue hour", }); const video = await client.videos.waitFor(job.id); console.log(video.video_url); ``` ```python Python SDK theme={null} job = client.videos.generate( model="kling-video", prompt="A cinematic aerial push across a desert at blue hour", ) video = client.videos.wait_for(job["id"]) print(video["video_url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/videos \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"kling-video","prompt":"A cinematic aerial push across a desert at blue hour"}' # then poll until status is "completed" curl https://www.ninjachat.ai/api/v1/videos/$VIDEO_ID \ -H "Authorization: Bearer $NINJACHAT_API_KEY" ``` ## Supported parameters `prompt`, `model`, `duration`, `aspect_ratio`, `image_url`, `reference_images`, `reference_video`, `reference_audio`, `watermark`, `generate_audio` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("kling-video"); if (!model.servable) throw new Error("kling-video is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Video generation](/video-generation) · [Pricing](/pricing) · [All models](/models-overview) # Runway Gen-4.5 Source: https://docs.ninjachat.ai/api-reference/models/video/runway-gen4-5 runway-gen4.5 on NinjaChat — Runway's Gen-4.5 text- and image-to-video model. $1.20 per video. `runway-gen4.5` Runway \$1.20 per video Image reference Runway's Gen-4.5 text- and image-to-video model. ## Pricing | Unit | Price | | :-------- | :----- | | Per video | \$1.20 | Billed per video. Prices are live at `GET /api/v1/models/runway-gen4.5`; the value above was read from that endpoint when this page was generated. ## Use this model Video is asynchronous: `videos.generate` returns a queued job, and `waitFor` / `wait_for` polls `GET /videos/{id}` until it completes. The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const job = await client.videos.generate({ model: "runway-gen4.5", prompt: "A cinematic aerial push across a desert at blue hour", }); const video = await client.videos.waitFor(job.id); console.log(video.video_url); ``` ```python Python SDK theme={null} job = client.videos.generate( model="runway-gen4.5", prompt="A cinematic aerial push across a desert at blue hour", ) video = client.videos.wait_for(job["id"]) print(video["video_url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/videos \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"runway-gen4.5","prompt":"A cinematic aerial push across a desert at blue hour"}' # then poll until status is "completed" curl https://www.ninjachat.ai/api/v1/videos/$VIDEO_ID \ -H "Authorization: Bearer $NINJACHAT_API_KEY" ``` ## Supported parameters `prompt`, `model`, `duration`, `aspect_ratio`, `image_url`, `reference_images`, `reference_video`, `reference_audio`, `watermark` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("runway-gen4.5"); if (!model.servable) throw new Error("runway-gen4.5 is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Video generation](/video-generation) · [Pricing](/pricing) · [All models](/models-overview) # Seedance 2.0 Source: https://docs.ninjachat.ai/api-reference/models/video/seedance-2 seedance-2 on NinjaChat — ByteDance's Seedance 2.0 references-to-video model with audio. $3.636 per video. `seedance-2` ByteDance — served by BytePlus \$3.636 per video Image reference, Audio output ByteDance's Seedance 2.0 references-to-video model with audio. ## Pricing | Unit | Price | | :-------- | :------ | | Per video | \$3.636 | Billed per video. Prices are live at `GET /api/v1/models/seedance-2`; the value above was read from that endpoint when this page was generated. ## Use this model Video is asynchronous: `videos.generate` returns a queued job, and `waitFor` / `wait_for` polls `GET /videos/{id}` until it completes. The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const job = await client.videos.generate({ model: "seedance-2", prompt: "A cinematic aerial push across a desert at blue hour", }); const video = await client.videos.waitFor(job.id); console.log(video.video_url); ``` ```python Python SDK theme={null} job = client.videos.generate( model="seedance-2", prompt="A cinematic aerial push across a desert at blue hour", ) video = client.videos.wait_for(job["id"]) print(video["video_url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/videos \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"seedance-2","prompt":"A cinematic aerial push across a desert at blue hour"}' # then poll until status is "completed" curl https://www.ninjachat.ai/api/v1/videos/$VIDEO_ID \ -H "Authorization: Bearer $NINJACHAT_API_KEY" ``` ## Supported parameters `prompt`, `model`, `duration`, `aspect_ratio`, `image_url`, `reference_images`, `reference_video`, `reference_audio`, `watermark`, `generate_audio` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("seedance-2"); if (!model.servable) throw new Error("seedance-2 is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Video generation](/video-generation) · [Pricing](/pricing) · [All models](/models-overview) # Seedance 2.0 Fast Source: https://docs.ninjachat.ai/api-reference/models/video/seedance-2-0-fast seedance-2.0-fast on NinjaChat — ByteDance's speed tier of Seedance 2.0. $0.63 per video. `seedance-2.0-fast` ByteDance — served by BytePlus \$0.63 per video Image reference, Audio output ByteDance's speed tier of Seedance 2.0. ## Pricing | Unit | Price | | :-------- | :----------------- | | Per video | $0.63 (list $0.84) | Limited offer: 25% off the list price through 2026-09-08. After that the list price applies. Billed per video. Prices are live at `GET /api/v1/models/seedance-2.0-fast`; the value above was read from that endpoint when this page was generated. ## Use this model Video is asynchronous: `videos.generate` returns a queued job, and `waitFor` / `wait_for` polls `GET /videos/{id}` until it completes. The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const job = await client.videos.generate({ model: "seedance-2.0-fast", prompt: "A cinematic aerial push across a desert at blue hour", }); const video = await client.videos.waitFor(job.id); console.log(video.video_url); ``` ```python Python SDK theme={null} job = client.videos.generate( model="seedance-2.0-fast", prompt="A cinematic aerial push across a desert at blue hour", ) video = client.videos.wait_for(job["id"]) print(video["video_url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/videos \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"seedance-2.0-fast","prompt":"A cinematic aerial push across a desert at blue hour"}' # then poll until status is "completed" curl https://www.ninjachat.ai/api/v1/videos/$VIDEO_ID \ -H "Authorization: Bearer $NINJACHAT_API_KEY" ``` ## Supported parameters `prompt`, `model`, `duration`, `aspect_ratio`, `image_url`, `reference_images`, `reference_video`, `reference_audio`, `watermark`, `generate_audio` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("seedance-2.0-fast"); if (!model.servable) throw new Error("seedance-2.0-fast is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Video generation](/video-generation) · [Pricing](/pricing) · [All models](/models-overview) # Seedance 2.0 Mini Source: https://docs.ninjachat.ai/api-reference/models/video/seedance-2-mini seedance-2-mini on NinjaChat — ByteDance's compact Seedance 2.0 with audio. $0.4221 per video. `seedance-2-mini` ByteDance — served by BytePlus \$0.4221 per video Image reference, Audio output ByteDance's compact Seedance 2.0 with audio. ## Pricing | Unit | Price | | :-------- | :--------------------- | | Per video | $0.4221 (list $1.0552) | Limited offer: 60% off the list price through 2026-09-08. After that the list price applies. Billed per video. Prices are live at `GET /api/v1/models/seedance-2-mini`; the value above was read from that endpoint when this page was generated. ## Use this model Video is asynchronous: `videos.generate` returns a queued job, and `waitFor` / `wait_for` polls `GET /videos/{id}` until it completes. The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const job = await client.videos.generate({ model: "seedance-2-mini", prompt: "A cinematic aerial push across a desert at blue hour", }); const video = await client.videos.waitFor(job.id); console.log(video.video_url); ``` ```python Python SDK theme={null} job = client.videos.generate( model="seedance-2-mini", prompt="A cinematic aerial push across a desert at blue hour", ) video = client.videos.wait_for(job["id"]) print(video["video_url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/videos \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"seedance-2-mini","prompt":"A cinematic aerial push across a desert at blue hour"}' # then poll until status is "completed" curl https://www.ninjachat.ai/api/v1/videos/$VIDEO_ID \ -H "Authorization: Bearer $NINJACHAT_API_KEY" ``` ## Supported parameters `prompt`, `model`, `duration`, `aspect_ratio`, `image_url`, `reference_images`, `reference_video`, `reference_audio`, `watermark`, `generate_audio` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("seedance-2-mini"); if (!model.servable) throw new Error("seedance-2-mini is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Video generation](/video-generation) · [Pricing](/pricing) · [All models](/models-overview) # Seedance 1 Lite Source: https://docs.ninjachat.ai/api-reference/models/video/seedance-lite seedance-lite on NinjaChat — ByteDance's low-cost first-generation Seedance. $0.432 per video. `seedance-lite` ByteDance — served by Replicate \$0.432 per video Image reference ByteDance's low-cost first-generation Seedance. ## Pricing | Unit | Price | | :-------- | :------ | | Per video | \$0.432 | Billed per video. Prices are live at `GET /api/v1/models/seedance-lite`; the value above was read from that endpoint when this page was generated. ## Use this model Video is asynchronous: `videos.generate` returns a queued job, and `waitFor` / `wait_for` polls `GET /videos/{id}` until it completes. The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const job = await client.videos.generate({ model: "seedance-lite", prompt: "A cinematic aerial push across a desert at blue hour", }); const video = await client.videos.waitFor(job.id); console.log(video.video_url); ``` ```python Python SDK theme={null} job = client.videos.generate( model="seedance-lite", prompt="A cinematic aerial push across a desert at blue hour", ) video = client.videos.wait_for(job["id"]) print(video["video_url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/videos \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"seedance-lite","prompt":"A cinematic aerial push across a desert at blue hour"}' # then poll until status is "completed" curl https://www.ninjachat.ai/api/v1/videos/$VIDEO_ID \ -H "Authorization: Bearer $NINJACHAT_API_KEY" ``` ## Supported parameters `prompt`, `model`, `duration`, `aspect_ratio`, `image_url`, `reference_images`, `reference_video`, `reference_audio`, `watermark` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("seedance-lite"); if (!model.servable) throw new Error("seedance-lite is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Video generation](/video-generation) · [Pricing](/pricing) · [All models](/models-overview) # Seedance 1 Pro Source: https://docs.ninjachat.ai/api-reference/models/video/seedance-pro seedance-pro on NinjaChat — ByteDance's first-generation Seedance Pro at 1080p. $1.80 per video. `seedance-pro` ByteDance — served by Replicate \$1.80 per video Image reference, End frame ByteDance's first-generation Seedance Pro at 1080p. ## Pricing | Unit | Price | | :-------- | :----- | | Per video | \$1.80 | Billed per video. Prices are live at `GET /api/v1/models/seedance-pro`; the value above was read from that endpoint when this page was generated. ## Use this model Video is asynchronous: `videos.generate` returns a queued job, and `waitFor` / `wait_for` polls `GET /videos/{id}` until it completes. The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const job = await client.videos.generate({ model: "seedance-pro", prompt: "A cinematic aerial push across a desert at blue hour", }); const video = await client.videos.waitFor(job.id); console.log(video.video_url); ``` ```python Python SDK theme={null} job = client.videos.generate( model="seedance-pro", prompt="A cinematic aerial push across a desert at blue hour", ) video = client.videos.wait_for(job["id"]) print(video["video_url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/videos \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"seedance-pro","prompt":"A cinematic aerial push across a desert at blue hour"}' # then poll until status is "completed" curl https://www.ninjachat.ai/api/v1/videos/$VIDEO_ID \ -H "Authorization: Bearer $NINJACHAT_API_KEY" ``` ## Supported parameters `prompt`, `model`, `duration`, `aspect_ratio`, `image_url`, `reference_images`, `reference_video`, `reference_audio`, `watermark`, `end_image_url` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("seedance-pro"); if (!model.servable) throw new Error("seedance-pro is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Video generation](/video-generation) · [Pricing](/pricing) · [All models](/models-overview) # Veo 3.1 Source: https://docs.ninjachat.ai/api-reference/models/video/veo-3-1 veo-3.1 on NinjaChat — Google's Veo 3.1 for cinematic text- and image-to-video with native audio. $3.20 per video. `veo-3.1` Google \$3.20 per video Image reference Google's Veo 3.1 for cinematic text- and image-to-video with native audio. ## Pricing | Unit | Price | | :-------- | :----- | | Per video | \$3.20 | Billed per video. Prices are live at `GET /api/v1/models/veo-3.1`; the value above was read from that endpoint when this page was generated. ## Use this model Video is asynchronous: `videos.generate` returns a queued job, and `waitFor` / `wait_for` polls `GET /videos/{id}` until it completes. The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const job = await client.videos.generate({ model: "veo-3.1", prompt: "A cinematic aerial push across a desert at blue hour", }); const video = await client.videos.waitFor(job.id); console.log(video.video_url); ``` ```python Python SDK theme={null} job = client.videos.generate( model="veo-3.1", prompt="A cinematic aerial push across a desert at blue hour", ) video = client.videos.wait_for(job["id"]) print(video["video_url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/videos \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"veo-3.1","prompt":"A cinematic aerial push across a desert at blue hour"}' # then poll until status is "completed" curl https://www.ninjachat.ai/api/v1/videos/$VIDEO_ID \ -H "Authorization: Bearer $NINJACHAT_API_KEY" ``` ## Supported parameters `prompt`, `model`, `duration`, `aspect_ratio`, `image_url`, `reference_images`, `reference_video`, `reference_audio`, `watermark` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("veo-3.1"); if (!model.servable) throw new Error("veo-3.1 is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Video generation](/video-generation) · [Pricing](/pricing) · [All models](/models-overview) # Veo 3.1 Fast Source: https://docs.ninjachat.ai/api-reference/models/video/veo-3-1-fast veo-3.1-fast on NinjaChat — Google's speed-optimized Veo 3.1. $1.20 per video. `veo-3.1-fast` Google \$1.20 per video Image reference Google's speed-optimized Veo 3.1. ## Pricing | Unit | Price | | :-------- | :----- | | Per video | \$1.20 | Billed per video. Prices are live at `GET /api/v1/models/veo-3.1-fast`; the value above was read from that endpoint when this page was generated. ## Use this model Video is asynchronous: `videos.generate` returns a queued job, and `waitFor` / `wait_for` polls `GET /videos/{id}` until it completes. The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const job = await client.videos.generate({ model: "veo-3.1-fast", prompt: "A cinematic aerial push across a desert at blue hour", }); const video = await client.videos.waitFor(job.id); console.log(video.video_url); ``` ```python Python SDK theme={null} job = client.videos.generate( model="veo-3.1-fast", prompt="A cinematic aerial push across a desert at blue hour", ) video = client.videos.wait_for(job["id"]) print(video["video_url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/videos \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"veo-3.1-fast","prompt":"A cinematic aerial push across a desert at blue hour"}' # then poll until status is "completed" curl https://www.ninjachat.ai/api/v1/videos/$VIDEO_ID \ -H "Authorization: Bearer $NINJACHAT_API_KEY" ``` ## Supported parameters `prompt`, `model`, `duration`, `aspect_ratio`, `image_url`, `reference_images`, `reference_video`, `reference_audio`, `watermark` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("veo-3.1-fast"); if (!model.servable) throw new Error("veo-3.1-fast is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Video generation](/video-generation) · [Pricing](/pricing) · [All models](/models-overview) # Wan 2.2 T2V A14B Source: https://docs.ninjachat.ai/api-reference/models/video/wan-2-2-t2v-a14b wan-2.2-t2v-a14b on NinjaChat — Alibaba's open-weight Wan 2.2 with 14B active parameters for fixed 5-second clips. $0.60 per video. `wan-2.2-t2v-a14b` Alibaba — served by DigitalOcean Inference \$0.60 per video Text to video Alibaba's open-weight Wan 2.2 with 14B active parameters for fixed 5-second clips. ## Pricing | Unit | Price | | :-------- | :----- | | Per video | \$0.60 | Billed per video. Prices are live at `GET /api/v1/models/wan-2.2-t2v-a14b`; the value above was read from that endpoint when this page was generated. ## Use this model Video is asynchronous: `videos.generate` returns a queued job, and `waitFor` / `wait_for` polls `GET /videos/{id}` until it completes. The SDK examples assume you have [created a server-side client](/sdks#create-a-client). ```typescript TypeScript SDK theme={null} const job = await client.videos.generate({ model: "wan-2.2-t2v-a14b", prompt: "A cinematic aerial push across a desert at blue hour", }); const video = await client.videos.waitFor(job.id); console.log(video.video_url); ``` ```python Python SDK theme={null} job = client.videos.generate( model="wan-2.2-t2v-a14b", prompt="A cinematic aerial push across a desert at blue hour", ) video = client.videos.wait_for(job["id"]) print(video["video_url"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/videos \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"wan-2.2-t2v-a14b","prompt":"A cinematic aerial push across a desert at blue hour"}' # then poll until status is "completed" curl https://www.ninjachat.ai/api/v1/videos/$VIDEO_ID \ -H "Authorization: Bearer $NINJACHAT_API_KEY" ``` ## Supported parameters `prompt`, `model`, `duration`, `aspect_ratio` ## Check live support ```typescript TypeScript SDK theme={null} const model = await client.models.retrieve("wan-2.2-t2v-a14b"); if (!model.servable) throw new Error("wan-2.2-t2v-a14b is temporarily unavailable"); console.log({ capabilities: model.capabilities, supportedParameters: model.supportedParameters, pricing: model.pricing, providers: model.providers, }); ``` **Guides:** [Video generation](/video-generation) · [Pricing](/pricing) · [All models](/models-overview) # Record an authenticated model ranking Source: https://docs.ninjachat.ai/api-reference/record-an-authenticated-model-ranking /openapi.json post /battles # Run a batch of chat requests Source: https://docs.ninjachat.ai/api-reference/run-a-batch-of-chat-requests /openapi.json post /batch # Run a saved preset Source: https://docs.ninjachat.ai/api-reference/run-a-saved-preset /openapi.json post /presets/{slug}/chat/completions Chat completion using a preset's saved model, routing, system prompt, and parameters. Send only your messages; pass model/models to override the preset's chain for this call. Response headers include X-Ninja-Preset and X-Ninja-Preset-Version. # Search the web Source: https://docs.ninjachat.ai/api-reference/search-the-web /openapi.json post /search # Send a test webhook Source: https://docs.ninjachat.ai/api-reference/send-a-test-webhook /openapi.json post /webhooks/test Send one synthetic event immediately so you can verify signature handling before relying on live jobs. # Authentication Source: https://docs.ninjachat.ai/authentication One header on every request. ``` Authorization: Bearer nj_sk_YOUR_API_KEY ``` ## Get a key Create one at [Developers → Keys](https://www.ninjachat.ai/developers/keys). Keys start with `nj_sk_` and are shown **once** — copy immediately. Browsing and estimates are free. Paid calls draw from your **Developer Balance** — top up at [Developers → Billing](https://www.ninjachat.ai/developers/billing), or verify your phone on your first paid action to unlock a \$0.50 starter balance. ## Use it ```typescript TypeScript SDK theme={null} import { NinjaChat } from "@ninjachat/sdk"; const client = new NinjaChat({ apiKey: process.env.NINJACHAT_API_KEY!, }); const response = await client.responses.create({ model: "ninja/auto", input: "Hello", }); ``` ```python Python SDK theme={null} import os from ninjachat import NinjaChat client = NinjaChat(api_key=os.environ["NINJACHAT_API_KEY"]) response = client.responses.create( model="ninja/auto", input="Hello", ) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/responses \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"ninja/auto","input":"Hello"}' ``` ## Keep it secret Environment variables, never hardcoded: ```bash theme={null} export NINJACHAT_API_KEY="nj_sk_YOUR_API_KEY" # or a .env file in .gitignore ``` And never in frontend code — CORS is open on `/api/v1/*`, but a key in the browser is a key stolen. Proxy through your backend: ```python theme={null} @app.post("/api/chat") def proxy(req): return client.responses.create( model="ninja/auto", input=req.json["message"], ) ``` ## Key management * Up to **25 active keys** per account — use separate keys for dev / staging / prod; once you hit the cap, revoke one to create another * Revoke instantly from [Developers → Keys](https://www.ninjachat.ai/developers/keys); revoked keys stop **immediately** * The same key works for the [MCP server](/mcp/overview) — agents and code share one balance ## Auth errors | Status | Error | Fix | | ------ | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 401 | `missing_api_key` | Add the `Authorization: Bearer nj_sk_...` header | | 401 | `invalid_api_key` | Key is malformed or revoked — create a new one | | 401 | `expired_api_key` | Key passed its expiry date — create a new one | | 403 | `read_only_key` | Key was created read-only and can't make billable requests — use a full-access key | | 403 | `insufficient_scope` | The credential can't call this endpoint (a Continue with NinjaChat wallet token can only spend on inference, not read usage, sessions, webhooks, or battles) — use a regular `nj_sk_` key | # Batch Source: https://docs.ninjachat.ai/batch Run up to 20 independent chat requests in one call, held up front and settled to actual token usage. `POST /api/v1/batch` fans out up to 20 chat requests, runs them in parallel, and returns every result — or streams each one as it finishes. It is a raw REST endpoint; the SDKs don't wrap it. Use it when you have a pile of independent prompts (classification, extraction, per-row summaries) and want one hold, one request ID, and one settlement instead of twenty. ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/batch \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: batch-2026-09-01-0001" \ -d '{ "requests": [ { "model": "gpt-5.4", "messages": [{ "role": "user", "content": "Classify: \"My order never arrived.\"" }], "max_tokens": 32 }, { "model": "claude-sonnet-5", "messages": [{ "role": "user", "content": "Classify: \"How do I reset my password?\"" }], "max_tokens": 32 } ], "fail_on_any_error": false }' ``` ## Request | Parameter | Type | Default | Description | | ------------------------ | ------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------- | | `requests` | array | required | 1–20 jobs. | | `requests[].model` | string | `gpt-5` | A chat model ID from [`GET /models`](/models). | | `requests[].messages` | array | required | 1–30 `system`, `user`, or `assistant` messages; string content up to 50,000 chars. | | `requests[].temperature` | number | `0.7` | 0–2. | | `requests[].max_tokens` | integer | `2048` | Output ceiling per job, 1–8,192. Also sizes the hold. | | `fail_on_any_error` | boolean | `false` | When `true`, one failed job fails the whole batch (`500 batch_request_failed` with `failed_index`) and the entire hold is refunded. | | `stream` | boolean | `false` | Stream results over SSE as jobs complete. | Send an `Idempotency-Key` header so a retried batch replays instead of running twice. A streamed batch can't be replayed — reusing its key returns `409 stream_not_replayable`. ## Response ```json theme={null} { "results": [ { "index": 0, "success": true, "model": "gpt-5.4", "requested_model": "gpt-5.4", "content": "shipping", "cost_cents": 0.02, "latency_ms": 640, "tokens": { "prompt": 18, "completion": 2, "total": 20 }, "usage": { "inputTokens": 18, "outputTokens": 2, "present": true } }, { "index": 1, "success": false, "model": "claude-sonnet-5", "requested_model": "claude-sonnet-5", "error": "...", "cost_cents": 0, "latency_ms": 1200 } ], "succeeded": 1, "failed": 1, "total_cost_cents": 0.02, "total_cost": "$0.0002", "balance": "$24.99", "metadata": { "total_latency_ms": 1250, "batch_size": 2, "parallelism": 2 }, "request_id": "req_..." } ``` `results` is ordered by `index`. Each job keeps the same silent model-fallback chain a single chat request has, so `model` is the model that actually served the job and `requested_model` is the one you asked for. A success result carries `usage_estimated: true` when the provider didn't report usage and the tokens were estimated. `balance_warning` appears when your balance is at or below \$5. ### Streaming With `stream: true` the response is `text/event-stream`. Each finished job arrives as a `data:` frame with `type: "result"` and the same fields as above; a final `type: "summary"` frame carries `succeeded`, `failed`, `total_cost_cents`, `total_cost`, and `request_id`, followed by `data: [DONE]`. ## Billing and limits * **Hold, then settle.** Before any job runs, the gateway holds the sum of every job's metered maximum (input estimate plus `max_tokens` at that model's rates). Each successful job bills its actual metered usage at the serving model's rates; failed jobs cost nothing; the unused hold is refunded when the batch completes. If your balance can't cover the hold you get `402 insufficient_credits` with `estimated_cost` and `balance`; a project or key spend limit returns `402 spend_limit_exceeded`. * **Rate limits.** A batch of N jobs consumes N units of the chat requests-per-minute and concurrency budgets and the summed token estimate of the tokens-per-minute budget, so it draws on the same 60-per-minute-per-key pool as `/chat/completions`. A `429` from this route adds `units` (the fan-out size). See [Rate limits](/rate-limits). * **Body size.** The whole request must fit the batch route's JSON limit; keep long documents to a few jobs per call. One prompt, several models, ranked results. Estimate holds before you send. # Spend controls Source: https://docs.ninjachat.ai/budget-routing Set a per-request maximum while preserving intelligent routing and fallbacks. Pass `routing.max_cost_usd` to reject routes whose published execution envelope exceeds your request budget. Keep the model decision explicit with `model` or `models`; use `ninja/auto` when you want NinjaChat to choose. ```typescript TypeScript SDK theme={null} const response = await client.responses.create({ model: "ninja/auto", input: "Translate to Spanish: Hello world", max_output_tokens: 80, routing: { strategy: "cost", max_cost_usd: 0.005, allow_fallbacks: true, }, }); console.log(response.cost_usd, response.routing.resolved_model); ``` ```python Python SDK theme={null} response = client.responses.create( model="ninja/auto", input="Translate to Spanish: Hello world", max_output_tokens=80, routing={"strategy": "cost", "max_cost_usd": 0.005, "allow_fallbacks": True}, ) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/responses \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"ninja/auto","input":"Translate to Spanish: Hello world","routing":{"strategy":"cost","max_cost_usd":0.005}}' ``` ## Parameters | Parameter | Description | | ---------------------- | ------------------------------------------------------------------------------------------------------------------ | | `routing.max_cost_usd` | Maximum allowed cost in US dollars for the routed execution. Positive, up to `1000`. | | `routing.strategy` | Use `cost` to prefer the least expensive eligible model (with `ninja/auto`) or rail (with a pinned model). | | `max_output_tokens` | Bound generated output and therefore the largest variable part of token spend — and of the pre-authorization hold. | ## How the cap is enforced 1. **Before any provider call**, the gateway computes the maximum token hold for the request: your input estimate plus the output ceiling, priced at the candidate models' metered rates. If that hold is above `max_cost_usd`, the request is rejected with `400 max_cost_exceeded` and nothing runs: ```json theme={null} { "error": { "message": "The maximum token hold is $0.012000, above routing.max_cost_usd=$0.005000.", "type": "invalid_request_error", "code": "max_cost_exceeded", "param": "routing.max_cost_usd" }, "maximum_hold_usd": 0.012 } ``` Lower `max_output_tokens`, pick cheaper candidates, or raise the cap. 2. **At settle time**, the metered charge is capped at `max_cost_usd`. Usage priced above the cap is absorbed by NinjaChat — it is logged, never billed to you. The cap is a guardrail, not a prediction of the final charge. Actual billing uses measured tokens and is returned as `cost_usd`. Read [live model pricing](/pricing) when you need to forecast a workload. ## Where it shines Cost control per request without maintaining a model list. A tiered product can map plan → budget — treat these as starting points, not guarantees: a plan's real headroom still depends on how long its users' messages run. ```python Python SDK theme={null} BUDGETS = {"free": 0.005, "pro": 0.05, "enterprise": 0.50} # USD per request def chat_for(plan: str, message: str): return client.responses.create( model="ninja/auto", input=message, routing={"strategy": "cost", "max_cost_usd": BUDGETS[plan]}, ) ``` As new models and rails launch, `ninja/auto` can improve without changing your integration while the cap remains fixed. # Text generation Source: https://docs.ninjachat.ai/chat Generate text, use vision and tools, and route across providers with the SDK or raw REST. NinjaChat has two text APIs on the same model network. **Responses** is recommended for new applications; **Chat Completions** is the OpenAI-compatible interface for role-based messages. Best for new text, vision, tools, structured output, and typed streaming integrations. Best when your application already uses OpenAI-style role messages or an OpenAI client. ## Responses API ```typescript TypeScript SDK theme={null} import { NinjaChat } from "@ninjachat/sdk"; const client = new NinjaChat({ apiKey: process.env.NINJACHAT_API_KEY! }); const response = await client.responses.create({ model: "ninja/auto", instructions: "Be concise and concrete.", input: "Explain edge caching in one paragraph.", max_output_tokens: 200, }); console.log(response.output_text); console.log(response.cost_usd, response.request_id); ``` ```python Python SDK theme={null} import os from ninjachat import NinjaChat client = NinjaChat(api_key=os.environ["NINJACHAT_API_KEY"]) response = client.responses.create( model="ninja/auto", instructions="Be concise and concrete.", input="Explain edge caching in one paragraph.", max_output_tokens=200, ) print(response["output_text"]) print(response["cost_usd"], response["request_id"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/responses \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"ninja/auto","input":"Explain edge caching in one paragraph.","max_output_tokens":200}' ``` ## Chat Completions ```typescript TypeScript SDK theme={null} const completion = await client.chat.completions.create({ model: "gpt-5.6-luna", messages: [ { role: "system", content: "Be concise and concrete." }, { role: "user", content: "Explain edge caching in one paragraph." }, ], max_completion_tokens: 200, }); console.log(completion.choices[0].message.content); console.log(completion.resolved_model, completion.provider); ``` ```python Python SDK theme={null} completion = client.chat.completions.create( model="gpt-5.6-luna", messages=[ {"role": "system", "content": "Be concise and concrete."}, {"role": "user", "content": "Explain edge caching in one paragraph."}, ], max_completion_tokens=200, ) print(completion["choices"][0]["message"]["content"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/chat/completions \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-5.6-luna","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}' ``` ## Parameters The two endpoints share routing, billing, and most sampling controls, but not every field exists on both. The **API** column says where a parameter is accepted; sending a field to the other endpoint returns `400 unsupported_parameter`. | Parameter | API | Type | Default | Description | | ----------------------- | --------- | ---------------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | | `model` | Both | string | — | One concrete [model ID](/models) or `ninja/auto`. Mutually exclusive with `models`. | | `models` | Both | array | — | 1–15 ordered candidates for [fallback routing](/fallback-chains). `ninja/auto` is allowed only as the first entry. Mutually exclusive with `model`. | | `input` | Responses | string or array | required | Text, or 1–100 typed items (`message`, `function_call`, `function_call_output`). | | `instructions` | Responses | string | — | Developer instruction sent ahead of `input`. | | `messages` | Chat | array | required | 1–100 `developer`, `system`, `user`, `assistant`, or `tool` messages. | | `max_output_tokens` | Responses | integer | — | Output ceiling, up to 131,072. | | `max_completion_tokens` | Chat | integer | — | Output ceiling, up to 131,072. `max_tokens` is accepted as an alias — see [OpenAI compatibility](/openai-compatibility). | | `temperature` | Both | number | provider default | 0–2. | | `top_p` | Both | number | — | Nucleus sampling (0–1). | | `stop` | Chat | string or array | — | Up to 4 stop sequences. | | `frequency_penalty` | Chat | number | — | -2 to 2. Penalizes tokens by how often they've already appeared. | | `presence_penalty` | Chat | number | — | -2 to 2. Penalizes tokens that have appeared at all. | | `seed` | Chat | integer | — | Best-effort deterministic sampling seed. | | `n` | Chat | integer | `1` | Only `1` is accepted; anything else is `400 unsupported_value`. | | `stream` | Both | boolean | `false` | Typed SSE iteration in both SDKs — [Streaming](/streaming). | | `stream_options` | Chat | object | — | `{ "include_usage": true }`. Responses streams always finish with usage. | | `response_format` | Chat | object | — | `{"type": "text" \| "json_object" \| "json_schema"}`; `json_schema` wraps `{ name, schema, strict }` under `json_schema`. | | `text.format` | Responses | object | — | Same three formats, flat: `{"type": "json_schema", "name": "...", "schema": {...}, "strict": true}`. | | `tools` | Both | array | — | Up to 32 function tools. The shapes differ — see [Function calling](#function-calling). | | `tool_choice` | Both | string or object | — | `"auto"`, `"none"`, `"required"`, or one named function. The object shapes differ — see [Function calling](#function-calling). | | `parallel_tool_calls` | Both | boolean | — | Let the model emit several tool calls in one turn. | | `store` | Responses | boolean | `false` | Only `false` is accepted. `true` returns `400 store_unsupported`; `previous_response_id` returns `400 previous_response_unsupported`. | | `metadata` | Responses | object | — | String map (values ≤ 512 chars) echoed back on the response object. | | `user` | Both | string | — | Opaque end-user identifier for your own tracking (max 256 chars). | | `routing` | Both | object | project defaults | Strategy, provider allow/exclude/order, fallbacks, data policy, caching, and `max_cost_usd` (max `1000`). | ### Spend cap `routing.max_cost_usd` is checked twice. Before any provider call the gateway computes the **maximum token hold** — your input estimate plus the output ceiling at the candidate models' metered rates — and rejects the request with `400 max_cost_exceeded` (the body includes `maximum_hold_usd`) if that hold is above the cap. At settle time the metered charge is capped at `max_cost_usd`; usage priced above it is absorbed by NinjaChat, never billed to you. See [Spend controls](/budget-routing). ### Structured output Ask for JSON with `response_format` (Chat Completions) or `text.format` (Responses). `json_object` returns any valid JSON; `json_schema` constrains it to your schema (`strict` defaults to `true`). Models without JSON mode return `400 model_not_json_capable` — filter on the `json_mode` capability in [`GET /models`](/models). ## Multi-turn conversations Two ways to carry a conversation: Send the conversation items your application stores. NinjaChat API v1 is stateless and does not retain response bodies. ```typescript theme={null} const response = await client.responses.create({ model: "gpt-5.6-luna", input: conversationItems, store: false, }); ``` [State management →](/sessions) Pass the full conversation every request: ```json theme={null} { "model": "gpt-5.6-luna", "messages": [ {"role": "user", "content": "What is photosynthesis?"}, {"role": "assistant", "content": "Photosynthesis converts sunlight..."}, {"role": "user", "content": "How does it compare to solar panels?"} ] } ``` ## Vision input Any [vision-capable model](/models) accepts images by sending `content` as an array of parts instead of a plain string — mix `text` and `image_url` parts in one message: ```json theme={null} { "model": "gpt-5.6-luna", "messages": [ { "role": "user", "content": [ {"type": "text", "text": "What's in this image?"}, {"type": "image_url", "image_url": {"url": "https://example.com/photo.jpg", "detail": "auto"}} ] } ] } ``` `image_url.url` accepts a public HTTPS URL or a base64 data URL. `detail` is optional (`auto`, `low`, or `high`). Sending images to a model that isn't vision-capable returns a `model_not_vision_capable` error listing which models support it. ## Function calling Pass OpenAI-style `tools` and NinjaChat routes the model's tool calls back to you the same way OpenAI does — the model doesn't execute anything itself, it just tells you what to call: ```json theme={null} { "model": "gpt-5.6-luna", "messages": [{"role": "user", "content": "What's the weather in Austin?"}], "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" } ``` Only [tool-capable models](/models) accept `tools` — passing them to a model that doesn't support tool calling returns a `model_not_tool_capable` error. On `/responses` the definition is flat (no `function` wrapper) and `tool_choice` names the function directly: ```json theme={null} { "model": "gpt-5.6-luna", "input": "What's the weather in Austin?", "tools": [{ "type": "function", "name": "get_weather", "description": "Get the current weather for a city", "parameters": { "type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"] } }], "tool_choice": {"type": "function", "name": "get_weather"} } ``` The same forced choice on Chat Completions is `{"type": "function", "function": {"name": "get_weather"}}`. Tool calls come back as `function_call` output items on Responses and as `tool_calls` on Chat Completions; send results back as `function_call_output` input items or `tool` messages respectively. Only `function` tools are supported — a built-in tool type returns `400 unsupported_tool`. ## Routing is explicit Everything else about the request stays the same — only the model and routing fields change: | Field | Behavior | | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | | `model: "gpt-5.6-luna"` | That exact model | | `model: "ninja/auto"` | Use the Ninja Router (`ninja/auto`). | | `routing.strategy: "latency"` | Prefer the fastest eligible provider rail. | | `routing.strategy: "cost"` | Prefer the lowest-cost eligible provider rail. | | `models: ["claude-sonnet-5", "gpt-5.6-luna"]` | Try an explicit ordered fallback set. | | `routing.max_cost_usd: 0.05` | Reject the request (`400 max_cost_exceeded`) if the maximum token hold exceeds the cap, and cap the settled charge at it. | | `routing.data_policy: "zero_retention"` | Require rails matching that data policy. | Try any of these live in the [Playground](https://www.ninjachat.ai/developers/playground) — every run shows the exact request that made it. # Model compare Source: https://docs.ninjachat.ai/compare Run one prompt against 2–8 models in parallel and get the results ranked by quality, speed, cost, or a balance of all three. `POST /api/v1/compare` sends the same messages to several concrete models at once and returns every answer with a ranking, a winner, and per-model quality, latency, and cost. It is a raw REST endpoint; the SDKs don't wrap it. Use it to pick a model for a workload with real prompts instead of benchmarks. ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/compare \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: compare-2026-09-01-0001" \ -d '{ "messages": [{ "role": "user", "content": "Rewrite this release note for a non-technical audience: ..." }], "models": ["gpt-5.4", "claude-sonnet-5", "gemini-3.7-flash"], "rank_by": "balanced", "max_tokens": 512 }' ``` ## Request | Parameter | Type | Default | Description | | ------------------------ | ------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `messages` | array | required | 1–20 `system`, `user`, or `assistant` messages; string content up to 50,000 chars. | | `models` | array | server default set | 2–8 **concrete** chat model IDs, each at most once. `ninja/auto` and other virtual IDs are rejected; a duplicate returns `400 validation_error`. Omit it to compare a built-in default set. | | `rank_by` | string | `balanced` | `quality`, `speed`, `cost`, or `balanced`. | | `max_tokens` | integer | `1024` | Output ceiling per model, 1–8,192. Also sizes the hold. | | `temperature` | number | `0.7` | 0–2, applied to every model. | | `include_full_responses` | boolean | `true` | `false` truncates each `content` to 200 characters. | | `stream` | boolean | `false` | Stream per-model results over SSE. | Send an `Idempotency-Key` so a retry replays instead of re-running every model. A streamed comparison can't be replayed — reusing its key returns `409 stream_not_replayable`. ## Response ```json theme={null} { "request_id": "req_...", "winner": { "model": "gemini-3.7-flash", "name": "Gemini 3.7 Flash", "reason": "Best balance of quality (0.91), speed (1180ms), and cost ($0.0009)" }, "results": [ { "rank": 1, "model": "gemini-3.7-flash", "content": "...", "error": null, "quality": { "confidence": 0.91, "flags": [], "suggested_retry": false }, "latency_ms": 1180, "cost_cents": 0.09, "tokens": { "prompt": 140, "completion": 96, "total": 236 }, "success": true } ], "failed": [], "summary": { "fastest": { "model": "gemini-3.7-flash", "latency_ms": 1180 }, "highest_quality": { "model": "claude-sonnet-5", "confidence": 0.94 }, "cheapest": { "model": "gemini-3.7-flash", "cost_cents": 0.09 }, "best_value": { "model": "gemini-3.7-flash" } }, "ranked_by": "balanced", "models_compared": 3, "succeeded": 3, "total_cost_cents": 0.41, "total_cost": "$0.0041", "balance": "$24.95", "compared_at": "2026-09-01T18:20:00.000Z", "metadata": { "latency_ms": 2400 } } ``` `results` holds the successful models in rank order; `failed` holds any model that errored or returned an empty completion (`error: "empty_completion"`), at zero cost. `quality` is the [quality score](/quality-scoring) computed for that answer. `best_value` is the highest quality-per-cent ratio. `balance_warning` appears when your balance is at or below \$5. The numbers in the sample are illustrative. ### How ranking works | `rank_by` | Score | | ---------- | --------------------------------------------------------- | | `quality` | The quality score's `confidence` | | `speed` | Relative latency against the slowest model in the set | | `cost` | Relative cost against the most expensive model in the set | | `balanced` | 50% quality + 30% speed + 20% cost | ### Streaming With `stream: true` the response is `text/event-stream`. Frames are `data:` JSON objects whose `type` is `start`, then `delta` and `model_done` (or `model_error`) per model as tokens arrive, and finally `rankings` once every model has settled. ## Billing and limits * **Hold, then settle.** The gateway holds the sum of each model's metered maximum (input estimate plus `max_tokens` at that model's rates) before fan-out. Each model then bills its own actual metered usage; failed or empty models cost nothing; the unused hold is refunded. A balance that can't cover the hold returns `402 insufficient_credits` with `estimated_cost` and `balance`. * **Rate limits.** Comparing M models consumes M units of the chat requests-per-minute and concurrency budgets and M × the prompt estimate of the tokens-per-minute budget. A `429` from this route adds `units`. See [Rate limits](/rate-limits). * **Unpriced models.** A model with no metered price returns `400 unpriced_model` before anything runs. How `quality.confidence` and `flags` are computed. Many prompts, one call. # Error handling Source: https://docs.ninjachat.ai/error-handling Every error code, what it means, and what to do about it. Errors use the OpenAI-compatible shape — an `error` object with `message`, `type`, `code`, and `param`. The same `message` and `code` are mirrored at the top level, alongside a `request_id` for support. Some errors add extra top-level fields (`retry_after` on a `429`; `scope`, `limit`, and `spent` on a spend-limit `402`; `maximum_hold_usd` on `max_cost_exceeded`): ```json theme={null} { "error": { "message": "No API credits. Add credits at https://www.ninjachat.ai/developers/billing — docs: https://docs.ninjachat.ai", "type": "insufficient_quota", "code": "insufficient_credits", "param": null }, "message": "No API credits. Add credits at https://www.ninjachat.ai/developers/billing — docs: https://docs.ninjachat.ai", "code": "insufficient_credits", "request_id": "req_abc123", "balance": "$0.00" } ``` That's the zero-balance case, checked before the body is read. If you have a balance but it can't cover this request's pre-authorization hold, chat returns the same code with a dynamic message: `"Insufficient credits for the maximum token hold of $0.012345."` The hold is a reserve sized from your input plus the output ceiling; a completed request settles to actual usage. ## Error reference ### 400 — fix the request | Code | What's wrong | What to do | | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | | `invalid_json` | Body isn't valid JSON | Fix your JSON syntax | | `validation_error` | A field is missing, the wrong type, or out of range; `param` names it | Check the message against [Parameters](/chat#parameters) | | `unsupported_parameter` | An unknown field (request schemas are strict), or a real use of `logprobs` / `logit_bias` on `/chat/completions` | Remove the field — see [OpenAI compatibility](/openai-compatibility#whats-rejected) | | `conflicting_parameters` | `max_tokens` and `max_completion_tokens` both sent with different values | Send one of them | | `unsupported_value` | `n` other than `1` | Send separate requests | | `invalid_parameter` | `metadata` isn't an object with at most 32 keys | Fix the value | | `invalid_model` | Retired id or syntax — `ensemble*`, `auto-*`, `a>b` chains, `model:suffix` — or `ninja/auto` after the first entry of `models` | Use `ninja/auto`, `models`, and `routing` | | `unknown_model` | `model` isn't in the catalog | Copy a canonical ID from [`GET /models`](/models) | | `model_not_vision_capable` | Image input sent to a model without vision | Use a vision-capable model | | `model_not_tool_capable` | `tools` sent to a model without tool calling | Use a tool-capable model | | `model_not_json_capable` | `response_format` / `text.format` JSON sent to a model without structured output | Use a model with the `json_mode` capability | | `max_cost_exceeded` | The maximum token hold is above `routing.max_cost_usd` (`maximum_hold_usd` is returned) | Raise the cap, lower the output ceiling, or pick cheaper candidates — [Spend controls](/budget-routing) | | `unpriced_model` | A model in a [`/compare`](/compare) or [`/batch`](/batch) request has no metered price; returned before anything runs (`param` names it, and batch adds `failed_index`) | Pick a model with `pricing` on [`GET /models`](/models) | | `store_unsupported` | `store: true` on `/responses` | Responses are stateless; omit it or send `false` | | `previous_response_unsupported` | `previous_response_id` on `/responses` | Include the complete input instead | | `unsupported_tool` | A non-`function` tool type on `/responses` | Only function tools are supported | | `invalid_image` | An `image_url` couldn't be fetched, isn't an image, or exceeds limits | Send a public HTTPS URL or a base64 data URL | | `invalid_period` | `period` isn't `1d`, `7d`, or `30d` (usage endpoint) | Pass a supported period | ### 401 / 403 — fix the credential | Status | Code | What's wrong | What to do | | ------ | -------------------- | --------------------------------------- | --------------------------------------------------------------------------------- | | 401 | `missing_api_key` | No auth header | Add `Authorization: Bearer nj_sk_...` | | 401 | `invalid_api_key` | Bad or revoked key | Create a new one in [Developers → Keys](https://www.ninjachat.ai/developers/keys) | | 401 | `expired_api_key` | Key passed its expiry | Create a new key | | 403 | `read_only_key` | Key is read-only | Use a full-access key for billable requests | | 403 | `insufficient_scope` | The credential can't call this endpoint | Use a regular `nj_sk_` API key | ### 402 — add credits or raise a limit | Code | What's wrong | What to do | | ---------------------- | ----------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | | `insufficient_credits` | Zero balance, or the balance can't cover the hold for this request | [Add credits](https://www.ninjachat.ai/developers/billing) | | `spend_limit_exceeded` | A monthly account, key, or project spend limit is reached; `scope`, `limit`, and `spent` are returned | Raise it at [Developers → Billing](https://www.ninjachat.ai/developers/billing) or wait for the period to reset | ### 404, 409, 410, 413, 429 | Status | Code | What's wrong | What to do | | ------ | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------- | | 404 | `not_found` | Video job, request trace, webhook, or session doesn't exist or isn't yours | Check the ID and API-key ownership | | 404 | `model_not_found` | `GET /models/{id}` for an id that isn't in the catalog | See `GET /models` | | 409 | `idempotency_conflict` | The `Idempotency-Key` was already used with a different request body | Use a new key for new content | | 409 | `request_in_flight` | A request with this `Idempotency-Key` is still running (or failed before completing) | Retry after `Retry-After` (5s) | | 409 | `stream_replay_unsupported` | The key already completed as a stream; streams can't be replayed | Use a new key | | 409 | `stream_not_replayable` | The same case on [`/compare`](/compare) and [`/batch`](/batch): the `Idempotency-Key` already completed as a streamed comparison or batch, which can't be replayed | Use a new key | | 410 | `endpoint_retired` | A retired legacy route; the body carries `successor` and `docs_url` | Move to the successor | | 413 | `payload_too_large` | Body exceeds the route's byte limit | Shrink the request | | 429 | `rate_limit_exceeded` | Too many requests — `limit` and `scope` say which layer | Wait `Retry-After` seconds — [Rate limits](/rate-limits) | ### 5xx — retry | Status | Code | What's wrong | What to do | | ------ | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | | 500 | `internal_error` | Server error | Retry — **not charged** | | 500 | `model_not_priced` | A requested model has no metered price in the runtime catalog | Pick another model and report it | | 500 | `batch_request_failed` | A [`/batch`](/batch) sent with `fail_on_any_error: true` had one job fail; `failed_index` names it and the entire hold is refunded | Fix or drop that request and retry — **not charged** | | 502 | `all_providers_failed` | Every eligible model and rail failed before producing output (on a `stream: true` request this arrives as an in-band error frame on the already-open `200` stream, then `[DONE]`) | Retry or widen `models` — **not charged** | | 502 | `generation_failed` | Image or video generation failed upstream | Retry — **not charged**; video jobs are refunded | | 502 | `search_failed` | Search providers temporarily unavailable | Retry — **not charged** | | 502 | `status_check_failed` | Polling the video provider for job status failed | Retry | | 503 | `idempotency_unavailable` | The idempotency store is unreachable; no work was started | Retry with the same `Idempotency-Key` after `Retry-After` | | 503 | `no_eligible_model` | No requested model is currently servable under this routing policy | Loosen `routing` or add candidates | | 503 | `service_unavailable` | Video provider not configured | Try again later | Streams can also fail after the HTTP status has been sent. In that case the last data frame is an error object — `partial_stream` (some output was delivered; only delivered tokens are billed) or `stream_error` (nothing was delivered; not charged). See [Streaming](/streaming). ## Error handling code The official SDKs retry `429` and `500`/`502`/`503`/`504` when the request is safe to replay, honor `Retry-After`, and generate an `Idempotency-Key` for billed requests so a retry can only replay. A `409 request_in_flight` is retried only when the request carried an idempotency key; `408` is never retried. The clients expose typed errors: ```typescript TypeScript SDK theme={null} import { NinjaChatError } from "@ninjachat/sdk"; try { await client.responses.create({ model: "gpt-5.6-luna", input: "Summarize this incident.", }); } catch (error) { if (error instanceof NinjaChatError) { console.error(error.status, error.code, error.requestId); } throw error; } ``` ```python Python SDK theme={null} from ninjachat import NinjaChatError try: client.responses.create( model="gpt-5.6-luna", input="Summarize this incident.", ) except NinjaChatError as error: print(error.status, error.code, error.request_id) raise ``` ## Common mistakes | Symptom | Cause | Fix | | ------------------------------ | ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- | | `unknown_model` | Typo in model ID | Check [available models](/models) for exact IDs | | `unsupported_parameter` | A field from another API (or `session_id` on a canonical endpoint) | Compare against the [parameter table](/chat#parameters) | | `validation_error` on messages | Missing `role` or `content` field | Each message needs `{"role": "user", "content": "..."}` | | `insufficient_credits` | Balance is \$0.00, or too low for this request's hold | [Add credits](https://www.ninjachat.ai/developers/billing) | | `invalid_api_key` | Key revoked or copied incorrectly | Keys start with `nj_sk_`. Create a new one in [Developers → Keys](https://www.ninjachat.ai/developers/keys) | | Empty streaming response | Not reading SSE correctly, or treating `:` keepalive lines as data | See [streaming guide](/streaming) | ## Monitor before a `402` Query `client.balance()` on a schedule and register a signed `balance.low` webhook for the prepaid `$5` and `$1` thresholds. Project spend limits also emit `budget.alert` at 50%, 80%, and 100%. See [Observability](/observability) for the complete operating loop and signature verification. ## Quick debug ```bash theme={null} # Test if your key works (should print 200) curl -s -o /dev/null -w "%{http_code}" \ -X POST https://www.ninjachat.ai/api/v1/responses \ -H "Authorization: Bearer nj_sk_YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-5.6-luna","input":"hi","max_output_tokens":8}' ``` | Output | Meaning | | ------ | -------------------------------- | | `200` | Working | | `401` | Bad, missing, or expired API key | | `403` | Read-only key | | `402` | No credits | # Cost estimation Source: https://docs.ninjachat.ai/estimate Price a chat request before you send it — the same pricing engine and token estimator that bill real traffic, with no key and no charge. `POST /api/v1/estimate` returns what a chat request would cost at today's metered rates. It is **public** — no API key — and never deducts credits. Estimates come from the same pricing tables and token estimator that settle real requests, so an estimate can't disagree with your bill by construction. The SDKs don't wrap it; call it as raw REST. ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/estimate \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-5.4", "messages": [{"role": "user", "content": "Summarize the attached incident report in five bullets."}], "max_tokens": 1024, "count": 1000, "models": ["gemini-3.7-flash", "claude-sonnet-5"] }' ``` ## Parameters | Parameter | Type | Default | Description | | ------------ | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `model` | string | required | A chat model ID from [`GET /models`](/models). | | `messages` | array | — | Up to 10 `system`, `user`, or `assistant` messages (content ≤ 8,000 chars each) used for the prompt-token estimate. Omit it to price a 5,000-token reference input. | | `max_tokens` | integer | — | Output bound for the maximum estimate (1–16,384). Also caps the typical completion. | | `count` | integer | `1` | Multiply the estimate by this many requests (1–10,000). | | `models` | array | — | Up to 10 additional model IDs to price the same payload against. | ## Response ```json theme={null} { "model": "gpt-5.4", "model_name": "GPT-5.4", "provider": "openai", "tier": "premium", "pricing_version": "2026-09-01.provider-rails.1", "billing": "metered", "rates": { "input_per_mtok": 2.5, "output_per_mtok": 15, "cached_input_per_mtok": 0.25 }, "estimated_tokens": { "prompt": 24, "completion": 64 }, "estimated_cents": 0.1, "estimated_cost": "$0.0010", "estimated_max_cents": 1.54, "estimated_max": "$0.0154", "for_count": 1000, "total_estimated_cents": 100, "total_estimated": "$1.00", "cheaper_alternatives": [ { "id": "gemini-3-flash", "name": "Gemini 3 Flash", "estimated_cents": 0.02, "savings_percent": 80, "capabilities": ["..."] } ], "monthly_estimate": { "at_100": "$0.10", "at_1000": "$1.00", "at_10000": "$10.00", "at_100000": "$100.00" }, "model_comparison": [ { "model": "gemini-3.7-flash", "estimated_cents": 0.05, "total_estimated_cents": 50 }, { "model": "claude-sonnet-5", "estimated_cents": 0.07, "total_estimated_cents": 70 } ], "note": "Billing is per token ($/MTok input + output). Requests preauthorize estimated_max and settle to actual usage; estimates here use the same engine and estimator that bill real traffic." } ``` Two numbers matter: * **`estimated_cents` / `estimated_cost`** — a realistic mid-point. The completion side uses a heuristic of 40% of the prompt tokens (at least 64), capped at `max_tokens` or 2,048. * **`estimated_max_cents` / `estimated_max`** — the pre-authorization **hold** a real request with these messages and `max_tokens` would reserve. The hold is a reserve, not a ceiling: the request settles to actual usage and the unused portion is returned. Use it to size `routing.max_cost_usd` — a cap below the hold is rejected with `400 max_cost_exceeded`. See [Spend controls](/budget-routing). `cheaper_alternatives` lists up to three catalog models that would cost less at this exact payload, sorted by savings. `model_comparison` appears only when you pass `models`. The numbers in the sample are illustrative; the endpoint returns live values. ## Limits * 30 requests per minute per client IP (`429 rate_limit_exceeded` with `retry_after` and a `Retry-After` header). * Unknown model IDs return `400 validation_error` with the closest matching ID in the message. `GET /api/v1/pricing` for every model's metered rates. `routing.max_cost_usd` turns an estimate into a hard ceiling. # Fallbacks Source: https://docs.ninjachat.ai/fallback-chains Provide ordered model candidates and let NinjaChat fail over across models and provider rails. Pass an ordered `models` array and enable fallbacks. NinjaChat first tries the strongest eligible rail for the first model, then advances safely when a provider or model cannot serve the request. ```mermaid theme={null} flowchart LR A["claude-sonnet-5"] -->|"rail unavailable"| B["gpt-5.6-terra"] B -->|"success"| R["Response"] B -.->|"if unavailable"| C["gemini-3.1-pro"] ``` ```typescript TypeScript SDK theme={null} const response = await client.responses.create({ models: ["claude-sonnet-5", "gpt-5.6-terra", "gemini-3.1-pro"], input: "Review this contract clause for hidden risk.", routing: { strategy: "quality", allow_fallbacks: true, require_parameters: true, }, }); console.log(response.routing.requested_models); console.log(response.routing.resolved_model, response.provider); ``` ```python Python SDK theme={null} response = client.responses.create( models=["claude-sonnet-5", "gpt-5.6-terra", "gemini-3.1-pro"], input="Review this contract clause for hidden risk.", routing={ "strategy": "quality", "allow_fallbacks": True, "require_parameters": True, }, ) print(response["routing"]["resolved_model"], response["provider"]) ``` ```bash cURL theme={null} curl https://www.ninjachat.ai/api/v1/responses \ -H "Authorization: Bearer $NINJACHAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "models":["claude-sonnet-5","gpt-5.6-terra","gemini-3.1-pro"], "input":"Review this contract clause for hidden risk.", "routing":{"strategy":"quality","allow_fallbacks":true,"require_parameters":true} }' ``` You are billed only for the successful execution. Failed infrastructure attempts do not become customer usage. ## Parameters | Parameter | Default | Description | | ---------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | | `models` | — | 1–15 ordered candidate model IDs. Use instead of `model`. `ninja/auto` may appear only as the **first** entry — anywhere else is `400 invalid_model`. | | `routing.allow_fallbacks` | `true` | Permit the router to advance across eligible rails and models. A project routing policy can change the default for keys in that project. | | `routing.require_parameters` | `true` | Skip rails that cannot honor every requested parameter or capability. Set `false` to let a rail serve on a best-effort basis. | | `routing.providers` | — | Constrain or order the infrastructure providers behind the model IDs (`only`, `exclude`, `order`; up to 20 each — `only` and `exclude` can't be combined). | If every candidate fails before producing output you get `502 all_providers_failed` and are not charged; if no candidate is currently servable under your routing policy you get `503 no_eligible_model`. With `stream: true` the connection is already open (the gateway commits the `200` and starts sending `:` keepalive comments as soon as your request is admitted), so the same failure arrives as an in-band error frame — `data: {"error": {"code": "all_providers_failed", ...}}` followed by `data: [DONE]` — exactly as a mid-stream failure would. **Billing:** metered usage comes from the successful resolved model and provider shown in the response. Fallbacks protect reliability. Use [Smart routing](/smart-routing) when you also want the router to choose the model class. # Image generation Source: https://docs.ninjachat.ai/image-generation Frontier image generation and editing models behind one typed endpoint. One request, one image URL back. Everything below was generated through these models: Campaign direction 1 — glass bottle still life Campaign direction 2 — palm shadow scene Campaign direction 3 — beach product shot Campaign direction 4 — botanical still life ```json POST /api/v1/images/generations theme={null} { "model": "flux-2-klein", "prompt": "A golden retriever puppy in autumn leaves, soft lighting, photorealistic", "size": "1920x1920", "n": 1 } ``` ```json Response theme={null} { "created": 1787529600, "model": "flux-2-klein", "provider": "...", "data": [{"url": "https://cdn.../generated-abc123.webp", "revised_prompt": "..."}], "usage": {"images_generated": 1}, "cost_usd": 0.014, "request_id": "req_...", "routing": {"provider_attempts": ["..."], "retries": 0} } ``` Your image is at `data[0].url` — download it or hotlink it. `provider` names the rail that rendered it, and `routing.provider_attempts` lists every rail tried (with `retries` counting the failed ones) — a silent fallback never bills above the price of the model you requested. ## Parameters | Parameter | Default | Description | | -------------- | --------------- | ---------------------------------------------------------------------------------------------------------- | | `prompt` | required | Be specific — subject, style, lighting, composition. Max 4,000 chars. | | `model` | `nano-banana-2` | See the table below. | | `size` | `1920x1920` | Exactly one of `1920x1920` (square), `2560x1440` (landscape), `1440x2560` (portrait). | | `n` | `1` | 1–4 images; each is billed. | | `image` | — | Public HTTPS reference URL for image-to-image. | | `aspect_ratio` | — | Aspect ratio for models that support it directly, e.g. `16:9`, `1:1` (Nano Banana, Imagen 4, FLUX.2 Flex). | | `width` | — | Image width in pixels, 256–2048 (FLUX models only). | | `height` | — | Image height in pixels, 256–2048 (FLUX models only). | `size` is a strict enum — `1024x1024` and other values are rejected with `validation_error`. Pick one of the three. ## Which model? Fetch `client.models.list()` and filter `modality` to `image` or `image_edit` for the current catalog. The shortlist below covers common starting points; it is not a frozen inventory. Three answers cover most cases: `flux-2-klein` — \$0.014, the fast tier `nano-banana-2` — \$0.045, great text rendering `flux-kontext-max` — \$0.08, premium editing Prices are `pricing.perUnitUsd` from `GET /models` at the time of writing; `n` images cost `n` × the price. | Model | ID | Cost | Best for | | -------------------------- | ---------------------------- | ------- | ---------------------------------------- | | GPT Image 2 | `gpt-image-2` | \$0.128 | OpenAI quality, prompt adherence | | Seedream 5 Pro | `seedream-5-pro` | \$0.09 | Top-tier Seedream generation | | FLUX Kontext Max | `flux-kontext-max` | \$0.08 | Premium editing, max fidelity | | Nano Banana Pro | `nano-banana-pro` | \$0.08 | Professional assets | | FLUX.2 Flex | `flux-2-flex` | \$0.06 | Maximum quality generation | | FLUX.1 Pro Ultra | `flux-1-pro-ultra` | \$0.06 | Ultra-high resolution (4MP) | | Grok Imagine Image Quality | `grok-imagine-image-quality` | \$0.05 | xAI's quality tier | | Nano Banana 2 | `nano-banana-2` | \$0.045 | Best value, text rendering (the default) | | Recraft V3 | `recraft-v3` | \$0.04 | Design, illustrations | | Google Imagen 4 | `google-imagen-4` | \$0.04 | Photorealism, text rendering | | Seedream | `seedream` | \$0.04 | Realistic, artistic styles | | FLUX Kontext Pro | `flux-kontext-pro` | \$0.04 | Image editing, style transfer | | Grok Imagine Image 2.0 | `grok-imagine-image-2.0` | \$0.04 | xAI's standard tier | | Seedream 5 Lite | `seedream-5-lite` | \$0.035 | Lower-cost Seedream 5 | | FLUX.2 Pro | `flux-2-pro` | \$0.03 | Balanced quality/speed | | Qwen Image Edit 2511 | `qwen-image-edit-2511` | \$0.03 | Image editing (`image_edit` modality) | | FLUX Kontext Dev | `flux-kontext-dev` | \$0.025 | Budget editing (`image_edit` modality) | | FLUX.2 Dev | `flux-2-dev` | \$0.024 | Budget FLUX.2 generation | | Nano Banana | `nano-banana` | \$0.02 | Fast, budget-friendly | | Grok Imagine | `grok-imagine` | \$0.02 | xAI's budget tier | | Qwen Image 2512 | `qwen-image-2512` | \$0.02 | Budget generation | | Runway Gen-4 Image Turbo | `runway-gen4-image-turbo` | \$0.02 | Fast editing (`image_edit` modality) | | FLUX.2 Klein | `flux-2-klein` | \$0.014 | Fastest, batch work | | Z-Image Turbo | `z-image-turbo` | \$0.01 | Cheapest servable model | ## In code ```typescript TypeScript SDK theme={null} import { NinjaChat } from "@ninjachat/sdk"; const client = new NinjaChat({ apiKey: process.env.NINJACHAT_API_KEY! }); const image = await client.images.generate({ model: "flux-2-klein", prompt: "A mountain landscape at sunset", size: "1920x1920", }); console.log(image.data[0].url); ``` ```python Python SDK theme={null} import os from ninjachat import NinjaChat client = NinjaChat(api_key=os.environ["NINJACHAT_API_KEY"]) image = client.images.generate( model="flux-2-klein", prompt="A mountain landscape at sunset", size="1920x1920", ) print(image["data"][0]["url"]) ``` Try prompts live in the [Playground](https://www.ninjachat.ai/developers/playground) — every run shows the exact request. Or let an agent drive: the [MCP server](/mcp/overview) gives any connected client these same models conversationally. # NinjaChat Developers Source: https://docs.ninjachat.ai/index Every model, two ways in — a REST API for your code, an MCP server for your agent.

NinjaChat API

One API. Every model.

Chat, images, video, and search through one typed API.

\$ npm install @ninjachat/sdk
View quickstart Browse SDKs
TypeScript POST /responses
One key

Every modality and provider behind one balance.

Official SDKs

Typed clients for TypeScript and Python.

MCP ready

The same models available to agents and code.

Build with NinjaChat

Explore every model
ChatStreaming, tools, structured output, and smart routingPOST /responses ImagesGeneration and editing across leading image modelsPOST /images/generations VideoSubmit, poll, and receive a production-ready MP4POST /videos SearchWeb, news, and academic answers with sourcesPOST /search ObserveConnect usage, cost, latency, routing, and request tracesGET /requests/
# Billing & limits Source: https://docs.ninjachat.ai/mcp/billing Pass-through prices, hard budgets, automatic refunds. MCP spend comes out of your **Developer Balance** — shared with the REST API, separate from consumer subscription credits. Top up at [Developers → Billing](https://www.ninjachat.ai/developers/billing), or let the agent do it: `add_credits` returns a Stripe `checkout_url` right in the conversation. Browsing is free — connect and ask questions without a balance. Your first paid action can unlock **\$0.50 starter balance** with a quick phone verify, and NinjaChat subscribers get **\$1.00 of MCP allowance every month**. The allowance is granted lazily — the first time a charge would otherwise fail, or when `get_account_balance` is called — to accounts on a paid plan (a mobile plan must still be active). ## Prices Model prices are the providers' own rates, passed through unchanged. NinjaChat's margin is a single **8% service fee added when you fund credits** — \$25 of credit costs \$27 at checkout — never a markup hidden inside a model's price. | Image model | Per output | | ------------------------- | -------------- | | `flux-schnell` | 0.3¢ | | `z-image-turbo` | 1¢ | | `nano-banana` | 2¢ | | `grok-imagine` | 2¢ | | `runway-gen4-image-turbo` | 2¢ (edit-only) | | `flux-2-pro` | 3¢ | | `qwen-image-edit-plus` | 3¢ (edit-only) | | `seedream` | 4¢ | | `recraft-v3` | 4¢ | | `nano-banana-2` | 4.5¢ | | `nano-banana-pro` | 8¢ | | `gpt-image-2` | 12.8¢ | Multiply by `n` for multi-output calls. | Video model | 4s | 8s (default) | How length is billed | | ------------------- | ------ | ------------ | --------------------------------------- | | `seedance-lite` | 14.4¢ | 28.8¢ | 3.6¢/s, capped at 12s | | `kling-2.5-turbo` | 35¢ | 70¢ | 5s = 35¢ · 10s = 70¢ | | `runway-gen4.5` | 48¢ | 96¢ | 12¢/s, capped at 10s | | `seedance-pro` | 60¢ | \$1.20 | 15¢/s, capped at 12s | | `veo-3.1-fast` | 60¢ | \$1.20 | 4s / 6s / 8s = 60¢ / 90¢ / \$1.20 | | `google-veo-3-fast` | 60¢ | \$1.20 | 4s / 6s / 8s = 60¢ / 90¢ / \$1.20 | | `kling-video` | 70¢ | \$1.40 | 5s = 70¢ · 10s = \$1.40 | | `seedance-2` | \$1.21 | \$2.42 | 30.3¢/s, capped at 12s | | `veo-3.1` | \$1.60 | \$3.20 | 4s / 6s / 8s = \$1.60 / \$2.40 / \$3.20 | | `google-veo-2` | \$2.50 | \$4.00 | 5s / 6s / 8s = \$2.50 / \$3.00 / \$4.00 | Every video model has its own duration curve. Per-second models (`seedance-lite`, `seedance-pro`, `seedance-2`, `runway-gen4.5`) bill each second up to their cap; bucketed models (Veo, Kling) bill the nearest supported length — 7 seconds on `veo-3.1-fast` costs the 6-second price, 8 seconds on `kling-video` the 10-second price. Any `duration` from 4 to 15 is accepted, but seconds past a model's cap are billed at the cap. `estimate_cost` is free and returns the exact price before anything runs — pass `duration` for video. ## Money is safe by design `max_spend_cents` (1–2000) on any call, `total_budget_cents` (5–100) on bakeoffs — tools return `budget_too_low` instead of exceeding them, before any money moves. Image and bakeoff failures refund inline. A video job that fails after being charged is refunded when polled — and a server-side sweeper checks every minute even if nobody polls. You never pay for output you didn't get. Pass an `idempotency_key` — the same key + body never double-bills. Set an account cap in [Developers → Billing](https://www.ninjachat.ai/developers/billing) — the OAuth consent screen also sets one the first time an agent connects. It's reserved *before* deduction — an over-limit call never touches your balance. ### What a charge actually does Every billed call runs the same sequence: idempotency claim → `max_spend_cents` gate → account monthly-limit reserve → per-key budget reserve → deduct → generate → settle against the model that actually ran → store the response for replay. If generation fails, the refund lands *before* the error tells you that you weren't charged, and every reservation is released in reverse order. * **Settlement is exact.** `auto` may reroute to another model when a provider fails; the charge is adjusted to that model's price, and `cost.charged_cents` in the response is what you actually paid. * **Two spend caps.** `spend_limit_exceeded` is the account cap from Developers → Billing. `key_budget_exceeded` is a per-key monthly budget (Developers → Keys → Manage) that applies to API-key callers and covers everything the key does, REST and MCP alike. Both errors return the limit and this month's spend; neither touches your balance. * **Empty balance.** `insufficient_credits` returns `balance_cents`, `estimated_cost_cents` and `top_up_url`. The fix is `add_credits`, then retry. ### Idempotency * Keys are scoped to your account and bound to a hash of the billable inputs (prompt, model, count, aspect ratio, references, duration…). They live for 1 hour. * Same key, same body → the stored response is replayed, images re-rendered inline, nothing charged. * Same key, different body → `idempotency_conflict`. Use a fresh key for new content. * Same key while the first attempt is still running → `generation_pending` with `retry_after_seconds: 10`. * A failed generation releases the key, so a retry with the same key runs (and is charged) once more. * If the idempotency store is unreachable the call fails closed with `idempotency_unavailable` — no work is started, nothing is charged; retry in a few seconds with the **same** key. ### Refunds | Code | Meaning | | ------------------------------------- | ---------------------------------------------------------------------------- | | `generation_failed_refunded` | Failed and refunded — retry freely | | `generation_failed_refund_pending` | Failed; the refund is recorded and retried automatically | | `generation_failed_refund_unrecorded` | Failed and the refund couldn't be recorded — contact support before retrying | Video jobs carry the exact settled charge, so an async refund always returns what was actually paid. `get_generation_status` on a refunded job keeps reporting the failure — a refunded job never later serves a video. ## Topping up * **`add_credits`** mints a Stripe Checkout link for a **\$25** (default), **\$100** or **\$250** pack — the agent pastes `checkout_url`, the user pays, the agent retries. The [Billing page](https://www.ninjachat.ai/developers/billing) is the fallback and also takes custom whole-dollar amounts. * **Auto-reload is opt-in** and only ever switched on from the Billing page — buying a pack never enables it. Once on, it defaults to adding **\$100 when the balance falls below \$10** (both adjustable). * Every purchase carries the 8% service fee: `add_credits` with `amount_usd: 25` charges \$27 and credits \$25. ## Rate limits Counted per API key — or, for OAuth clients, per client + user — so one busy agent can't starve another. Per minute unless noted: | Tool class | Limit | | --------------------------------------------------------------------------------------------- | ---------------- | | Read (search, estimates, status, balance, saved names) | 60 | | Image generation (`create_media`, `generate_image`, `edit_image`) | 10 | | Uploads | 10 | | Video generation (`generate_video`, `image_to_video`, and `create_media` when it makes video) | 3 | | Model comparisons | 2 | | Scroll-cinema encoding (`prepare_scrub_video`) | 3 | | Page publishing (`publish_page`) | 6 | | `add_credits` | 6 per 10 minutes | Limited calls return `rate_limited` with `retry_after_seconds` — agents wait and retry. ## Agents Every MCP client — Cursor, Claude Code, Codex, VS Code, claude.ai, ChatGPT, Hermes, OpenClaw, and anything else on the same server — draws from the same Developer Balance and the same monthly limit. Rate limits are counted per connected client. Review or disconnect anytime in [Developers → Agents](https://www.ninjachat.ai/developers/agents). # Client setup Source: https://docs.ninjachat.ai/mcp/clients One endpoint, eight clients. Pick yours. Every client uses the same URL: ```text theme={null} https://www.ninjachat.ai/api/mcp ``` Web clients sign in with OAuth — no key. Editor and CLI clients need an `nj_sk_` key from [Developers → Keys](https://www.ninjachat.ai/developers/keys). MCP calls are billable, so a key marked read-only is rejected — mint a full-access key. **Settings → Connectors → Add custom connector.** Name it `NinjaChat`, paste the URL, sign in when prompted. No API key. **Settings → Connectors → Advanced → enable developer mode.** Then **Create** a connector, name it `NinjaChat`, paste the URL, and approve the OAuth sign-in. Enable it in the composer. ```json ~/.cursor/mcp.json theme={null} { "mcpServers": { "ninjachat": { "url": "https://www.ninjachat.ai/api/mcp", "headers": { "Authorization": "Bearer nj_sk_YOUR_KEY" } } } } ``` **Cursor Settings → MCP** should show `ninjachat` with a green dot. If not, reload the window. ```bash theme={null} claude mcp add --transport http ninjachat https://www.ninjachat.ai/api/mcp \ --header "Authorization: Bearer nj_sk_YOUR_KEY" ``` Verify with `/mcp`. Add `--scope user` to use it in every project. Listed as failed? Use `--transport http` (not `sse`) and keep the whole `"Authorization: Bearer …"` string as one shell argument. ```toml ~/.codex/config.toml theme={null} [mcp_servers.ninjachat] url = "https://www.ninjachat.ai/api/mcp" http_headers = { "Authorization" = "Bearer nj_sk_YOUR_KEY" } ``` Restart the session — config loads at launch. TOML is picky: `[mcp_servers.ninjachat]` with an underscore, and `http_headers` as an inline table. ```json .vscode/mcp.json theme={null} { "servers": { "ninjachat": { "type": "http", "url": "https://www.ninjachat.ai/api/mcp", "headers": { "Authorization": "Bearer nj_sk_YOUR_KEY" } } } } ``` Click the **Start** code lens above the entry, then use it in Copilot Chat's agent mode. ```yaml ~/.hermes/config.yaml theme={null} mcp_servers: ninjachat: url: "https://www.ninjachat.ai/api/mcp" headers: Authorization: "Bearer nj_sk_YOUR_KEY" enabled: true ``` Start a new session — the dashboard's MCP panel shows the connection. ```bash theme={null} openclaw mcp add ninjachat \ --url https://www.ninjachat.ai/api/mcp \ --transport streamable-http \ --header "Authorization: Bearer nj_sk_YOUR_KEY" ``` Restart the gateway to load it. Review or disconnect OAuth agents anytime in [Developers → Agents](https://www.ninjachat.ai/developers/agents). ## Building your own OAuth client NinjaChat is a full OAuth 2.1 authorization server, so any MCP client that speaks the standard flow connects without an API key: * **Discovery.** An unauthenticated request to the endpoint returns `401` with a `WWW-Authenticate` challenge pointing at `https://www.ninjachat.ai/.well-known/oauth-protected-resource/api/mcp`; the authorization-server metadata is at `https://www.ninjachat.ai/.well-known/oauth-authorization-server`. * **Registration.** Open Dynamic Client Registration at `https://www.ninjachat.ai/api/oauth/register`. Clients are public — there is no client secret — and the `redirect_uri` you authorize with must be one you registered. A client unused for 90 days is garbage-collected. * **Authorization.** `https://www.ninjachat.ai/oauth/authorize` with `code_challenge_method=S256`. PKCE is mandatory and `plain` is rejected; authorization codes expire after 60 seconds. The only scope is `mcp`. * **Tokens.** `https://www.ninjachat.ai/api/oauth/token` supports `authorization_code` and `refresh_token`. Access tokens (`nj_at_…`) last **1 hour**; refresh tokens (`nj_rt_…`) last **30 days** and **rotate on every use** — replaying a rotated refresh token revokes the whole token family. Revoke either token at `https://www.ninjachat.ai/api/oauth/revoke`. ## Test it Free, and proves auth end to end: ```text theme={null} Use NinjaChat to check my balance. ``` Then make something: ```text theme={null} Use NinjaChat to generate a poster of a neon koi fish, comparing 3 models under $0.25. ``` Treat `nj_sk_` keys like passwords — prefer user-level config over committed files, and revoke anything that leaks. # NinjaChat MCP Source: https://docs.ninjachat.ai/mcp/overview Your agent can make images and video. Connect once, then just ask. Connect any MCP client to NinjaChat — Cursor, Claude Code, Codex, VS Code, claude.ai, ChatGPT, Hermes, OpenClaw, or anything that speaks the protocol — and it can create real images and video mid-conversation. One URL: ```text theme={null} https://www.ninjachat.ai/api/mcp ``` ## What it feels like > "Give me 4 takes on a lighthouse in a storm." Lighthouse take 1 Lighthouse take 2 Lighthouse take 3 Lighthouse take 4 > "I like the second one — make it a video."