# Changelog
Source: https://docs.mixroute.ai/en/changelog
MixRoute latest news, model updates, pricing changes, and important announcements
Welcome to MixRoute's changelog page. Here you can find important information about our latest model launches, pricing adjustments, feature updates, and more.
Stay updated: press Ctrl+D to bookmark this page and get the latest model launches and promotional information as soon as possible.
## π₯ Latest Updates
Z.ai's first natively multimodal GLM-5 model combines 1M context with efficient coding, visual understanding, and agentic workflows.
Z.ai's new flagship reasoning model targets complex coding, long-horizon agents, and security analysis with always-on thinking.
DeepSeek V4 Pro reached general availability with stronger production agents, Responses API support, and low/high/max reasoning effort.
xAI's new 500K-context flagship supports text and image input, configurable reasoning, function calling, and structured output.
***
## π§ Update Announcements
### 2026-08-26 GLM-5.3 Flash Release
Z.ai released `glm-5.3-flash`, its first natively multimodal GLM-5 model:
* 1M-token context for long coding, document, and agent workflows
* Text, image, video, and file understanding
* Efficient 320B-parameter MoE architecture with 18B active parameters
* Hybrid sparse and linear attention for lower long-context serving cost
Source: [Z.ai GLM-5.3 Flash announcement](https://z.ai/blog/glm-5.3-flash)
***
### 2026-08-14 GLM-5.3 Release
Z.ai released `glm-5.3`, a flagship always-thinking model built for complex coding and long-horizon agents:
* 1M-token context and up to 128K output
* `low`, `high`, and `max` reasoning effort; `max` is recommended for coding
* Stronger coding, autonomous execution, and security analysis than GLM-5.2
* OpenAI-compatible Chat Completions through MixRoute
Source: [Z.ai GLM-5.3 announcement](https://z.ai/blog/glm-5.3)
***
### 2026-08-13 DeepSeek V4 Pro General Availability
DeepSeek released the general-availability version of `deepseek-v4-pro`:
* Stronger production agent and coding performance
* Native OpenAI Responses API support
* `low`, `high`, and `max` reasoning effort
* 1M-token context and up to 384K output
Source: [DeepSeek V4 Pro GA announcement](https://api-docs.deepseek.com/news/news260813/)
***
### 2026-08-12 Grok 4.6 Release
xAI released `grok-4.6` for coding, agentic tasks, and knowledge work:
* 500K context window
* Text and image input with text output
* Function calling and structured output
* `low`, `medium`, `high`, and `xhigh` reasoning effort
Source: [xAI release notes](https://docs.x.ai/developers/release-notes)
***
### 2026-07-23 Moonshot Kimi K3 & New Gemini Series Launch
* **Moonshot**: New flagship model `kimi-k3` is now available, replacing `kimi-k2.6` as the new Kimi series flagship, with upgraded reasoning and multimodal capabilities
* **Google**: Added `gemini-3.6-flash`, `gemini-3.5-flash-lite` and other new models
***
### 2026-07-10 GPT 5.6 New Flagship Series Launch
OpenAI's new GPT-5.6 series is now available, introducing a new naming scheme with major breakthroughs in reasoning efficiency, frontend design, and tool calling:
* **OpenAI**: New GPT-5.6 series models launched with a new naming scheme:
* `gpt-5.6-sol` β Flagship reasoning model, supports Pro Mode deep reasoning (`reasoning.mode: "pro"`)
* `gpt-5.6-terra` β Cost-effective flagship, balancing performance and cost
* `gpt-5.6-luna` β High-efficiency, high-volume, ideal for production workloads
* New `reasoning.effort: max` highest reasoning level
* Supports Programmatic Tool Calling, Multi-agent (beta), explicit Prompt Caching, persisted reasoning (`reasoning.context`)
* Token efficiency significantly improved, frontier quality with fewer tokens
***
### 2026-07-01 New Upgrade to the Video and Image Model Library
We have fully introduced ByteDance's latest video and image generation models, giving you a broader range of visual creation capabilities:
* **New Volcano Engine / ByteDance models launched**:
* Newly launched flagship **SeeDream 5.0** (`seedream-5-0-260128`) and its lightweight version **SeeDream 5.0 Lite** (`seedream-5-0-lite-260128`).
* Added stable and practical **SeeDream 4.x-level** models, including `seedream-4-0-250828` (version 4.0) and `seedream-4-5-251128` (version 4.5).
* Added the lightweight flagship video model **Seedance 2.0 Mini** (`dreamina-seedance-2-0-mini-260615`).
* All newly added models are fully integrated and support high-quality output, making it easy for multilingual developers to call them flexibly across different application scenarios.
* **Anthropic**: Also launched the flagship model **Claude Sonnet 5** (`claude-sonnet-5`), with a 1M-token ultra-long context, suitable for coding, agents, and enterprise workflows.
***
### 2026-06-05 Major Upgrade to the Video Model Library
Based on the latest progress in the platform's video generation capabilities, we have fully synchronized and updated the Seedance model series:
* **ByteDance (Dreamina/Seedance)**:
* Newly launched the latest flagship `dreamina-seedance-2-0-260128` (Seedance 2.0) and `dreamina-seedance-2-0-fast-260128` (fast version).
* Added support for the high-quality professional version `seedance-1-5-pro-251215` (1.5 Pro).
* Aligned and updated the 1.0 series, including `seedance-1-0-pro-250528` and `seedance-1-0-pro-fast-251015`.
* Also upgraded the developer documentation for video task submission and querying, and added English and Traditional Chinese code examples and comparison tables to make integration easier for multilingual developers.
***
### 2026-05-27 Full Model Library Synchronization Update
Based on the latest platform API status, we have fully synchronized and updated the models supported by the platform:
* **OpenAI**: Launched the `gpt-5.5` flagship series, the `gpt-5.4` series, the reasoning model `o4-mini`, and the image model `gpt-image-2`
* **Anthropic**: Launched Anthropic model updates, including `claude-opus-4-7`, `claude-sonnet-5`, and `claude-haiku-4-5-20251001`
* **Google**: Launched the Gemini 3.1 and 3.5 series, including `gemini-3.5-flash`, `gemini-3.1-pro-preview`, and more
* **DeepSeek**: Launched the V4 series, including `deepseek-v4-pro` and `deepseek-v4-flash`
* **xAI**: Launched the Grok 4 series, including `grok-4.20-beta-0309-reasoning`, and more
* **Chinese models**: Launched key flagship models such as `qwen3.7-max`, `glm-4-plus`, and `kimi-k2.6`
***
Update frequency: this page is updated regularly. We recommend bookmarking it and checking back often. All pricing adjustments and model updates will be announced here as soon as possible.
Newly launched models often come with special promotions during the initial launch period, so we recommend trying them early.
# Contact Us
Source: https://docs.mixroute.ai/en/contact
Get MixRoute technical support and business cooperation
## Technical Support
Scan the QR code below to add WeChat support
Send email to [service@mixroute.ai](mailto:service@mixroute.ai)
## Business Cooperation
For business cooperation, please contact us through:
* **Website**: [https://mixroute.ai/](https://mixroute.ai/)
* **Email**: [service@mixroute.ai](mailto:service@mixroute.ai)
Business hours: Monday to Friday, 9:00 AM - 6:00 PM (Beijing Time)
## Frequently Asked Questions
Before contacting us, you may want to check these common questions:
Learn about proper Base URL and API Key configuration
Choose the best AI model for your use case
Understand network access and proxy requirements
Learn about our data security measures
# Introduction
Source: https://docs.mixroute.ai/en/introduction
A professional and stable AI API platform, supporting 200+ popular AI models
## Welcome to MixRoute
MixRoute is a professional and stable AI API platform, **based on the unified OpenAI API standard**, supporting 200+ popular AI models. With one API Key , you can easily access all mainstream AI models including OpenAI, Claude, Gemini, DeepSeek, Qwen, Kimi, GLM and more.
### Base URL
```text theme={null}
https://api.mixroute.ai/v1
```
When calling API , please ensure the AI model name matches the naming convention in the [MixRoute Model Marketplace](https://console.mixroute.ai/models); otherwise, the request will fail to execute.
## Quick Start
Get started in three simple steps , and access all trending AI models instantly
Complete API documentation and developer guide
## Why MixRoute?
### β¨ One Interface, Multiple Models
No need to apply for separate accounts and manage API keys for each AI service:
* **One Account**: Manage all AI services
* **One API Standard**: Compatible with OpenAI API format
* **One API Key**: Access all models
### π§ Easy to Use
Switching models is as simple as changing one parameter:
```python theme={null}
from openai import OpenAI
client = OpenAI(
api_key="sk-xxxxxxxxxx",
base_url="https://api.mixroute.ai/v1"
)
# Use GPT 5.5
response = client.chat.completions.create(
model="gpt-5.5",
messages=[{"role": "user", "content": "Hello!"}]
)
# Switch to Claude - just change the model name
response = client.chat.completions.create(
model="claude-opus-4-8",
messages=[{"role": "user", "content": "Hello!"}]
)
```
### π‘οΈ Stable & Reliable
* **Real-time Monitoring**: 24/7 service status monitoring
* **Smart Routing:** Automatic load balancing with failover capabilities.
* **High Availability**: Supports multi-node deployment to achieve ultra-low latency.
### π° Cost-Efficiency
* **Transparent Pricing**: Token-based billing across all models for full transparency.
* **Usage Analytics:** Real-time visual reports of your consumption.
* **Flexible Payments**: Supports Stripe and various other payment methods.
## Core APIs
Create multi-turn conversations and text generation
Support text-to-image, image-to-image generation
Low-latency text/voice real-time conversation
Get all available model information
## Use Cases
Cherry Studio, Chatbox and other AI chat clients
Cursor, Claude Code, Cline and other AI coding tools
LangChain, Dify and other AI app development frameworks
Immersive Translate, Bob Translate and other tools
## π Quick Links
Create an account and access all trending AI models instantly
Manage API Keys, view usage statistics and billing
# Qwen3-Max
Source: https://docs.mixroute.ai/en/model-api/alibaba/qwen3-max
Qwen3-Max: general-purpose language model. Request examples and parameters for MixRoute.
Qwen3-Max is a general-purpose language model from Alibaba.
Call `qwen3-max` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3-max",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="qwen3-max",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="qwen3-max",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `qwen3-max`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Qwen3-Max-Preview
Source: https://docs.mixroute.ai/en/model-api/alibaba/qwen3-max-preview
Qwen3-Max-Preview: general-purpose language model. Request examples and parameters for MixRoute.
Qwen3-Max-Preview is a general-purpose language model from Alibaba.
Call `qwen3-max-preview` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3-max-preview",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="qwen3-max-preview",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="qwen3-max-preview",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `qwen3-max-preview`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Qwen3.5-122B-A10B
Source: https://docs.mixroute.ai/en/model-api/alibaba/qwen3.5-122b-a10b
Qwen3.5-122B-A10B: general-purpose language model. Request examples and parameters for MixRoute.
Qwen3.5-122B-A10B is a general-purpose language model from Alibaba.
Call `qwen3.5-122b-a10b` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.5-122b-a10b",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="qwen3.5-122b-a10b",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="qwen3.5-122b-a10b",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `qwen3.5-122b-a10b`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Qwen3.5-27B
Source: https://docs.mixroute.ai/en/model-api/alibaba/qwen3.5-27b
Qwen3.5-27B: general-purpose language model. Request examples and parameters for MixRoute.
Qwen3.5-27B is a general-purpose language model from Alibaba.
Call `qwen3.5-27b` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.5-27b",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="qwen3.5-27b",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="qwen3.5-27b",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `qwen3.5-27b`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Qwen3.5-35B-A3B
Source: https://docs.mixroute.ai/en/model-api/alibaba/qwen3.5-35b-a3b
Qwen3.5-35B-A3B: general-purpose language model. Request examples and parameters for MixRoute.
Qwen3.5-35B-A3B is a general-purpose language model from Alibaba.
Call `qwen3.5-35b-a3b` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.5-35b-a3b",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="qwen3.5-35b-a3b",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="qwen3.5-35b-a3b",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `qwen3.5-35b-a3b`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Qwen3.5-397B-A17B
Source: https://docs.mixroute.ai/en/model-api/alibaba/qwen3.5-397b-a17b
Qwen3.5-397B-A17B: general-purpose language model. Request examples and parameters for MixRoute.
Qwen3.5-397B-A17B is a general-purpose language model from Alibaba.
Call `qwen3.5-397b-a17b` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.5-397b-a17b",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="qwen3.5-397b-a17b",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="qwen3.5-397b-a17b",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `qwen3.5-397b-a17b`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Qwen3.5-Flash
Source: https://docs.mixroute.ai/en/model-api/alibaba/qwen3.5-flash
Qwen3.5-Flash: fast, efficient language model. Request examples and parameters for MixRoute.
Qwen3.5-Flash is a fast, efficient language model from Alibaba.
Call `qwen3.5-flash` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.5-flash",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="qwen3.5-flash",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="qwen3.5-flash",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `qwen3.5-flash`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Qwen3.5-Plus
Source: https://docs.mixroute.ai/en/model-api/alibaba/qwen3.5-plus
Qwen3.5-Plus: general-purpose language model. Request examples and parameters for MixRoute.
Qwen3.5-Plus is a general-purpose language model from Alibaba.
Call `qwen3.5-plus` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.5-plus",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="qwen3.5-plus",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="qwen3.5-plus",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `qwen3.5-plus`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Qwen3.6-27B
Source: https://docs.mixroute.ai/en/model-api/alibaba/qwen3.6-27b
Qwen3.6-27B: general-purpose language model. Request examples and parameters for MixRoute.
Qwen3.6-27B is a general-purpose language model from Alibaba.
Call `qwen3.6-27b` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.6-27b",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="qwen3.6-27b",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="qwen3.6-27b",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `qwen3.6-27b`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Qwen3.6-35B-A3B
Source: https://docs.mixroute.ai/en/model-api/alibaba/qwen3.6-35b-a3b
Qwen3.6-35B-A3B: general-purpose language model. Request examples and parameters for MixRoute.
Qwen3.6-35B-A3B is a general-purpose language model from Alibaba.
Call `qwen3.6-35b-a3b` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.6-35b-a3b",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="qwen3.6-35b-a3b",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="qwen3.6-35b-a3b",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `qwen3.6-35b-a3b`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Qwen3.6-Flash
Source: https://docs.mixroute.ai/en/model-api/alibaba/qwen3.6-flash
Qwen3.6-Flash: fast, efficient language model. Request examples and parameters for MixRoute.
Qwen3.6-Flash is a fast, efficient language model from Alibaba.
Call `qwen3.6-flash` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.6-flash",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="qwen3.6-flash",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="qwen3.6-flash",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `qwen3.6-flash`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Qwen3.6-Max-Preview
Source: https://docs.mixroute.ai/en/model-api/alibaba/qwen3.6-max-preview
Qwen3.6-Max-Preview: general-purpose language model. Request examples and parameters for MixRoute.
Qwen3.6-Max-Preview is a general-purpose language model from Alibaba.
Call `qwen3.6-max-preview` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.6-max-preview",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="qwen3.6-max-preview",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="qwen3.6-max-preview",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `qwen3.6-max-preview`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Qwen3.6-Plus
Source: https://docs.mixroute.ai/en/model-api/alibaba/qwen3.6-plus
Qwen3.6-Plus: general-purpose language model. Request examples and parameters for MixRoute.
Qwen3.6-Plus is a general-purpose language model from Alibaba.
Call `qwen3.6-plus` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.6-plus",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="qwen3.6-plus",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="qwen3.6-plus",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `qwen3.6-plus`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Qwen3.7-Max
Source: https://docs.mixroute.ai/en/model-api/alibaba/qwen3.7-max
Qwen3.7-Max: general-purpose language model. Request examples and parameters for MixRoute.
Qwen3.7-Max is a general-purpose language model from Alibaba.
Call `qwen3.7-max` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.7-max",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="qwen3.7-max",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="qwen3.7-max",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `qwen3.7-max`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Qwen3.8-Max
Source: https://docs.mixroute.ai/en/model-api/alibaba/qwen3.8-max
Qwen3.8-Max: 1M-context flagship model with hybrid reasoning and tool support. Request examples and parameters for MixRoute.
Qwen3.8-Max is Alibaba's flagship Qwen model for reasoning, coding, and agentic work, with a 1-million-token context window.
Call `qwen3.8-max` through MixRoute using the endpoint shown below.
## Key capabilities
* 1M context window - Handles large codebases and long documents
* Hybrid thinking - Supports reasoning and non-reasoning workflows
* Tool-ready output - Supports function calling and structured output
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.8-max",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="qwen3.8-max",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="qwen3.8-max",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `qwen3.8-max`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Claude Fable 5
Source: https://docs.mixroute.ai/en/model-api/anthropic/claude-fable-5
Claude Fable 5: general-purpose model for coding and knowledge work. Request examples and parameters for MixRoute.
Claude Fable 5 is a general-purpose model for coding and knowledge work from Anthropic.
Call `claude-fable-5` through MixRoute's Anthropic-compatible Messages API; the OpenAI-compatible Chat Completions API is also supported.
## Key capabilities
* Messages API - Native Anthropic request and response format
* OpenAI-compatible - Also works through Chat Completions
* Streaming - Incremental output through SSE
* System prompts - Top-level system instructions
* Tool use - Supports Anthropic tool definitions
## Quick example
### Messages API
```bash theme={null}
curl "https://api.mixroute.ai/v1/messages" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-fable-5",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
]
}'
```
```python theme={null}
from anthropic import Anthropic
client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")
message = client.messages.create(
model="claude-fable-5",
max_tokens=256,
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
)
print(message.content[0].text)
```
```python theme={null}
from anthropic import Anthropic
client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")
with client.messages.stream(
model="claude-fable-5",
max_tokens=256,
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
) as stream:
for text in stream.text_stream:
print(text, end="")
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-fable-5",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="claude-fable-5",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="claude-fable-5",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Messages API
| Parameter | Type | Required | Description |
| ------------ | --------------- | -------- | ----------------------------------------------- |
| `model` | string | Yes | Must be `claude-fable-5`. |
| `messages` | array | Yes | Input messages with role and content. |
| `max_tokens` | integer | Yes | Maximum tokens to generate. |
| `system` | string \| array | No | Top-level system instruction. |
| `stream` | boolean | No | Enable SSE streaming. |
| `tools` | array | No | Anthropic tool definitions. |
| `thinking` | object | No | Extended-thinking configuration when supported. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `claude-fable-5`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Claude Fable 5.1
Source: https://docs.mixroute.ai/en/model-api/anthropic/claude-fable-5-1
Claude Fable 5.1: 1M-context model for demanding reasoning, long-running agentic coding, and multistep research.
Claude Fable 5.1 is Anthropic's most capable generally available model for demanding reasoning, long-running agentic coding, multistep research, and complex knowledge work.
Call `claude-fable-5-1` through MixRoute's Anthropic-compatible Messages API; the OpenAI-compatible Chat Completions API is also supported.
## Key capabilities
* Long context - Supports a 1M-token context window and up to 128K output tokens
* Adaptive thinking - Always-on adaptive thinking with high default effort
* Long-horizon work - Stronger agentic coding, multistep research, and document-heavy workflows
* Multimodal input - Accepts text and images and returns text
* Dual API support - Works through Anthropic-compatible Messages and OpenAI-compatible Chat Completions
## Quick example
### Messages API
```bash theme={null}
curl "https://api.mixroute.ai/v1/messages" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-fable-5-1",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
]
}'
```
```python theme={null}
from anthropic import Anthropic
client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")
message = client.messages.create(
model="claude-fable-5-1",
max_tokens=256,
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
)
print(message.content[0].text)
```
```python theme={null}
from anthropic import Anthropic
client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")
with client.messages.stream(
model="claude-fable-5-1",
max_tokens=256,
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
) as stream:
for text in stream.text_stream:
print(text, end="")
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-fable-5-1",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="claude-fable-5-1",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="claude-fable-5-1",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Messages API
| Parameter | Type | Required | Description |
| ------------ | --------------- | -------- | ----------------------------------------------- |
| `model` | string | Yes | Must be `claude-fable-5-1`. |
| `messages` | array | Yes | Input messages with role and content. |
| `max_tokens` | integer | Yes | Maximum tokens to generate. |
| `system` | string \| array | No | Top-level system instruction. |
| `stream` | boolean | No | Enable SSE streaming. |
| `tools` | array | No | Anthropic tool definitions. |
| `thinking` | object | No | Extended-thinking configuration when supported. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `claude-fable-5-1`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
## Vendor reference
* [Claude Fable 5.1 documentation](https://platform.claude.com/docs/en/models/fable-5-1/overview)
# Claude Haiku 4.5
Source: https://docs.mixroute.ai/en/model-api/anthropic/claude-haiku-4-5
Claude Haiku 4.5: fast model for responsive, high-volume workloads. Request examples and parameters for MixRoute.
Claude Haiku 4.5 is a fast model for responsive, high-volume workloads from Anthropic.
Call `claude-haiku-4-5` through MixRoute's Anthropic-compatible Messages API; the OpenAI-compatible Chat Completions API is also supported.
## Key capabilities
* Messages API - Native Anthropic request and response format
* OpenAI-compatible - Also works through Chat Completions
* Streaming - Incremental output through SSE
* System prompts - Top-level system instructions
* Tool use - Supports Anthropic tool definitions
## Quick example
### Messages API
```bash theme={null}
curl "https://api.mixroute.ai/v1/messages" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-haiku-4-5",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
]
}'
```
```python theme={null}
from anthropic import Anthropic
client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")
message = client.messages.create(
model="claude-haiku-4-5",
max_tokens=256,
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
)
print(message.content[0].text)
```
```python theme={null}
from anthropic import Anthropic
client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")
with client.messages.stream(
model="claude-haiku-4-5",
max_tokens=256,
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
) as stream:
for text in stream.text_stream:
print(text, end="")
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-haiku-4-5",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="claude-haiku-4-5",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="claude-haiku-4-5",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Messages API
| Parameter | Type | Required | Description |
| ------------ | --------------- | -------- | ----------------------------------------------- |
| `model` | string | Yes | Must be `claude-haiku-4-5`. |
| `messages` | array | Yes | Input messages with role and content. |
| `max_tokens` | integer | Yes | Maximum tokens to generate. |
| `system` | string \| array | No | Top-level system instruction. |
| `stream` | boolean | No | Enable SSE streaming. |
| `tools` | array | No | Anthropic tool definitions. |
| `thinking` | object | No | Extended-thinking configuration when supported. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `claude-haiku-4-5`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Claude Opus 4.1
Source: https://docs.mixroute.ai/en/model-api/anthropic/claude-opus-4-1
Claude Opus 4.1: model for advanced coding, agents, and complex analysis. Request examples and parameters for MixRoute.
Claude Opus 4.1 is a model for advanced coding, agents, and complex analysis from Anthropic.
Call `claude-opus-4-1-20250805` through MixRoute's Anthropic-compatible Messages API; the OpenAI-compatible Chat Completions API is also supported.
## Key capabilities
* Messages API - Native Anthropic request and response format
* OpenAI-compatible - Also works through Chat Completions
* Streaming - Incremental output through SSE
* System prompts - Top-level system instructions
* Tool use - Supports Anthropic tool definitions
## Quick example
### Messages API
```bash theme={null}
curl "https://api.mixroute.ai/v1/messages" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-4-1-20250805",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
]
}'
```
```python theme={null}
from anthropic import Anthropic
client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")
message = client.messages.create(
model="claude-opus-4-1-20250805",
max_tokens=256,
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
)
print(message.content[0].text)
```
```python theme={null}
from anthropic import Anthropic
client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")
with client.messages.stream(
model="claude-opus-4-1-20250805",
max_tokens=256,
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
) as stream:
for text in stream.text_stream:
print(text, end="")
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-4-1-20250805",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="claude-opus-4-1-20250805",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="claude-opus-4-1-20250805",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Messages API
| Parameter | Type | Required | Description |
| ------------ | --------------- | -------- | ----------------------------------------------- |
| `model` | string | Yes | Must be `claude-opus-4-1-20250805`. |
| `messages` | array | Yes | Input messages with role and content. |
| `max_tokens` | integer | Yes | Maximum tokens to generate. |
| `system` | string \| array | No | Top-level system instruction. |
| `stream` | boolean | No | Enable SSE streaming. |
| `tools` | array | No | Anthropic tool definitions. |
| `thinking` | object | No | Extended-thinking configuration when supported. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `claude-opus-4-1-20250805`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Claude Opus 4.5
Source: https://docs.mixroute.ai/en/model-api/anthropic/claude-opus-4-5
Claude Opus 4.5: model for advanced coding, agents, and complex analysis. Request examples and parameters for MixRoute.
Claude Opus 4.5 is a model for advanced coding, agents, and complex analysis from Anthropic.
Call `claude-opus-4-5` through MixRoute's Anthropic-compatible Messages API; the OpenAI-compatible Chat Completions API is also supported.
## Key capabilities
* Messages API - Native Anthropic request and response format
* OpenAI-compatible - Also works through Chat Completions
* Streaming - Incremental output through SSE
* System prompts - Top-level system instructions
* Tool use - Supports Anthropic tool definitions
## Quick example
### Messages API
```bash theme={null}
curl "https://api.mixroute.ai/v1/messages" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-4-5",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
]
}'
```
```python theme={null}
from anthropic import Anthropic
client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")
message = client.messages.create(
model="claude-opus-4-5",
max_tokens=256,
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
)
print(message.content[0].text)
```
```python theme={null}
from anthropic import Anthropic
client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")
with client.messages.stream(
model="claude-opus-4-5",
max_tokens=256,
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
) as stream:
for text in stream.text_stream:
print(text, end="")
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-4-5",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="claude-opus-4-5",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="claude-opus-4-5",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Messages API
| Parameter | Type | Required | Description |
| ------------ | --------------- | -------- | ----------------------------------------------- |
| `model` | string | Yes | Must be `claude-opus-4-5`. |
| `messages` | array | Yes | Input messages with role and content. |
| `max_tokens` | integer | Yes | Maximum tokens to generate. |
| `system` | string \| array | No | Top-level system instruction. |
| `stream` | boolean | No | Enable SSE streaming. |
| `tools` | array | No | Anthropic tool definitions. |
| `thinking` | object | No | Extended-thinking configuration when supported. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `claude-opus-4-5`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Claude Opus 4.6
Source: https://docs.mixroute.ai/en/model-api/anthropic/claude-opus-4-6
Claude Opus 4.6: model for advanced coding, agents, and complex analysis. Request examples and parameters for MixRoute.
Claude Opus 4.6 is a model for advanced coding, agents, and complex analysis from Anthropic.
Call `claude-opus-4-6` through MixRoute's Anthropic-compatible Messages API; the OpenAI-compatible Chat Completions API is also supported.
## Key capabilities
* Messages API - Native Anthropic request and response format
* OpenAI-compatible - Also works through Chat Completions
* Streaming - Incremental output through SSE
* System prompts - Top-level system instructions
* Tool use - Supports Anthropic tool definitions
## Quick example
### Messages API
```bash theme={null}
curl "https://api.mixroute.ai/v1/messages" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-4-6",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
]
}'
```
```python theme={null}
from anthropic import Anthropic
client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")
message = client.messages.create(
model="claude-opus-4-6",
max_tokens=256,
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
)
print(message.content[0].text)
```
```python theme={null}
from anthropic import Anthropic
client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")
with client.messages.stream(
model="claude-opus-4-6",
max_tokens=256,
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
) as stream:
for text in stream.text_stream:
print(text, end="")
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-4-6",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="claude-opus-4-6",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="claude-opus-4-6",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Messages API
| Parameter | Type | Required | Description |
| ------------ | --------------- | -------- | ----------------------------------------------- |
| `model` | string | Yes | Must be `claude-opus-4-6`. |
| `messages` | array | Yes | Input messages with role and content. |
| `max_tokens` | integer | Yes | Maximum tokens to generate. |
| `system` | string \| array | No | Top-level system instruction. |
| `stream` | boolean | No | Enable SSE streaming. |
| `tools` | array | No | Anthropic tool definitions. |
| `thinking` | object | No | Extended-thinking configuration when supported. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `claude-opus-4-6`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Claude Opus 4.7
Source: https://docs.mixroute.ai/en/model-api/anthropic/claude-opus-4-7
Claude Opus 4.7: model for advanced coding, agents, and complex analysis. Request examples and parameters for MixRoute.
Claude Opus 4.7 is a model for advanced coding, agents, and complex analysis from Anthropic.
Call `claude-opus-4-7` through MixRoute's Anthropic-compatible Messages API; the OpenAI-compatible Chat Completions API is also supported.
## Key capabilities
* Messages API - Native Anthropic request and response format
* OpenAI-compatible - Also works through Chat Completions
* Streaming - Incremental output through SSE
* System prompts - Top-level system instructions
* Tool use - Supports Anthropic tool definitions
## Quick example
### Messages API
```bash theme={null}
curl "https://api.mixroute.ai/v1/messages" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-4-7",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
]
}'
```
```python theme={null}
from anthropic import Anthropic
client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")
message = client.messages.create(
model="claude-opus-4-7",
max_tokens=256,
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
)
print(message.content[0].text)
```
```python theme={null}
from anthropic import Anthropic
client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")
with client.messages.stream(
model="claude-opus-4-7",
max_tokens=256,
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
) as stream:
for text in stream.text_stream:
print(text, end="")
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-4-7",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="claude-opus-4-7",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="claude-opus-4-7",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Messages API
| Parameter | Type | Required | Description |
| ------------ | --------------- | -------- | ----------------------------------------------- |
| `model` | string | Yes | Must be `claude-opus-4-7`. |
| `messages` | array | Yes | Input messages with role and content. |
| `max_tokens` | integer | Yes | Maximum tokens to generate. |
| `system` | string \| array | No | Top-level system instruction. |
| `stream` | boolean | No | Enable SSE streaming. |
| `tools` | array | No | Anthropic tool definitions. |
| `thinking` | object | No | Extended-thinking configuration when supported. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `claude-opus-4-7`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Claude Opus 4.8
Source: https://docs.mixroute.ai/en/model-api/anthropic/claude-opus-4-8
Claude Opus 4.8: model for advanced coding, agents, and complex analysis. Request examples and parameters for MixRoute.
Claude Opus 4.8 is a model for advanced coding, agents, and complex analysis from Anthropic.
Call `claude-opus-4-8` through MixRoute's Anthropic-compatible Messages API; the OpenAI-compatible Chat Completions API is also supported.
## Key capabilities
* Messages API - Native Anthropic request and response format
* OpenAI-compatible - Also works through Chat Completions
* Streaming - Incremental output through SSE
* System prompts - Top-level system instructions
* Tool use - Supports Anthropic tool definitions
## Quick example
### Messages API
```bash theme={null}
curl "https://api.mixroute.ai/v1/messages" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-4-8",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
]
}'
```
```python theme={null}
from anthropic import Anthropic
client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")
message = client.messages.create(
model="claude-opus-4-8",
max_tokens=256,
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
)
print(message.content[0].text)
```
```python theme={null}
from anthropic import Anthropic
client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")
with client.messages.stream(
model="claude-opus-4-8",
max_tokens=256,
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
) as stream:
for text in stream.text_stream:
print(text, end="")
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-4-8",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="claude-opus-4-8",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="claude-opus-4-8",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Messages API
| Parameter | Type | Required | Description |
| ------------ | --------------- | -------- | ----------------------------------------------- |
| `model` | string | Yes | Must be `claude-opus-4-8`. |
| `messages` | array | Yes | Input messages with role and content. |
| `max_tokens` | integer | Yes | Maximum tokens to generate. |
| `system` | string \| array | No | Top-level system instruction. |
| `stream` | boolean | No | Enable SSE streaming. |
| `tools` | array | No | Anthropic tool definitions. |
| `thinking` | object | No | Extended-thinking configuration when supported. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `claude-opus-4-8`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Claude Opus 5
Source: https://docs.mixroute.ai/en/model-api/anthropic/claude-opus-5
Claude Opus 5: model for advanced coding, agents, and complex analysis. Request examples and parameters for MixRoute.
Claude Opus 5 is a model for advanced coding, agents, and complex analysis from Anthropic.
Call `claude-opus-5` through MixRoute's Anthropic-compatible Messages API; the OpenAI-compatible Chat Completions API is also supported.
## Key capabilities
* Messages API - Native Anthropic request and response format
* OpenAI-compatible - Also works through Chat Completions
* Streaming - Incremental output through SSE
* System prompts - Top-level system instructions
* Tool use - Supports Anthropic tool definitions
* Long context - Supports up to 1 million input tokens
## Quick example
### Messages API
```bash theme={null}
curl "https://api.mixroute.ai/v1/messages" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-5",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
]
}'
```
```python theme={null}
from anthropic import Anthropic
client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")
message = client.messages.create(
model="claude-opus-5",
max_tokens=256,
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
)
print(message.content[0].text)
```
```python theme={null}
from anthropic import Anthropic
client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")
with client.messages.stream(
model="claude-opus-5",
max_tokens=256,
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
) as stream:
for text in stream.text_stream:
print(text, end="")
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-5",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="claude-opus-5",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="claude-opus-5",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Messages API
| Parameter | Type | Required | Description |
| ------------ | --------------- | -------- | ----------------------------------------------- |
| `model` | string | Yes | Must be `claude-opus-5`. |
| `messages` | array | Yes | Input messages with role and content. |
| `max_tokens` | integer | Yes | Maximum tokens to generate. |
| `system` | string \| array | No | Top-level system instruction. |
| `stream` | boolean | No | Enable SSE streaming. |
| `tools` | array | No | Anthropic tool definitions. |
| `thinking` | object | No | Extended-thinking configuration when supported. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------ | --------------- | -------- | -------------------------------------------- |
| `model` | string | Yes | Must be `claude-opus-5`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Claude Sonnet 4
Source: https://docs.mixroute.ai/en/model-api/anthropic/claude-sonnet-4
Claude Sonnet 4: general-purpose model for coding and knowledge work. Request examples and parameters for MixRoute.
Claude Sonnet 4 is a general-purpose model for coding and knowledge work from Anthropic.
Call `claude-sonnet-4-20250514` through MixRoute's Anthropic-compatible Messages API; the OpenAI-compatible Chat Completions API is also supported.
## Key capabilities
* Messages API - Native Anthropic request and response format
* OpenAI-compatible - Also works through Chat Completions
* Streaming - Incremental output through SSE
* System prompts - Top-level system instructions
* Tool use - Supports Anthropic tool definitions
## Quick example
### Messages API
```bash theme={null}
curl "https://api.mixroute.ai/v1/messages" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-20250514",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
]
}'
```
```python theme={null}
from anthropic import Anthropic
client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")
message = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=256,
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
)
print(message.content[0].text)
```
```python theme={null}
from anthropic import Anthropic
client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")
with client.messages.stream(
model="claude-sonnet-4-20250514",
max_tokens=256,
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
) as stream:
for text in stream.text_stream:
print(text, end="")
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-20250514",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="claude-sonnet-4-20250514",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="claude-sonnet-4-20250514",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Messages API
| Parameter | Type | Required | Description |
| ------------ | --------------- | -------- | ----------------------------------------------- |
| `model` | string | Yes | Must be `claude-sonnet-4-20250514`. |
| `messages` | array | Yes | Input messages with role and content. |
| `max_tokens` | integer | Yes | Maximum tokens to generate. |
| `system` | string \| array | No | Top-level system instruction. |
| `stream` | boolean | No | Enable SSE streaming. |
| `tools` | array | No | Anthropic tool definitions. |
| `thinking` | object | No | Extended-thinking configuration when supported. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `claude-sonnet-4-20250514`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Claude Sonnet 4.5
Source: https://docs.mixroute.ai/en/model-api/anthropic/claude-sonnet-4-5
Claude Sonnet 4.5: general-purpose model for coding and knowledge work. Request examples and parameters for MixRoute.
Claude Sonnet 4.5 is a general-purpose model for coding and knowledge work from Anthropic.
Call `claude-sonnet-4-5` through MixRoute's Anthropic-compatible Messages API; the OpenAI-compatible Chat Completions API is also supported.
## Key capabilities
* Messages API - Native Anthropic request and response format
* OpenAI-compatible - Also works through Chat Completions
* Streaming - Incremental output through SSE
* System prompts - Top-level system instructions
* Tool use - Supports Anthropic tool definitions
## Quick example
### Messages API
```bash theme={null}
curl "https://api.mixroute.ai/v1/messages" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-5",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
]
}'
```
```python theme={null}
from anthropic import Anthropic
client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")
message = client.messages.create(
model="claude-sonnet-4-5",
max_tokens=256,
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
)
print(message.content[0].text)
```
```python theme={null}
from anthropic import Anthropic
client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")
with client.messages.stream(
model="claude-sonnet-4-5",
max_tokens=256,
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
) as stream:
for text in stream.text_stream:
print(text, end="")
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-5",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="claude-sonnet-4-5",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="claude-sonnet-4-5",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Messages API
| Parameter | Type | Required | Description |
| ------------ | --------------- | -------- | ----------------------------------------------- |
| `model` | string | Yes | Must be `claude-sonnet-4-5`. |
| `messages` | array | Yes | Input messages with role and content. |
| `max_tokens` | integer | Yes | Maximum tokens to generate. |
| `system` | string \| array | No | Top-level system instruction. |
| `stream` | boolean | No | Enable SSE streaming. |
| `tools` | array | No | Anthropic tool definitions. |
| `thinking` | object | No | Extended-thinking configuration when supported. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `claude-sonnet-4-5`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Claude Sonnet 4.6
Source: https://docs.mixroute.ai/en/model-api/anthropic/claude-sonnet-4-6
Claude Sonnet 4.6: general-purpose model for coding and knowledge work. Request examples and parameters for MixRoute.
Claude Sonnet 4.6 is a general-purpose model for coding and knowledge work from Anthropic.
Call `claude-sonnet-4-6` through MixRoute's Anthropic-compatible Messages API; the OpenAI-compatible Chat Completions API is also supported.
## Key capabilities
* Messages API - Native Anthropic request and response format
* OpenAI-compatible - Also works through Chat Completions
* Streaming - Incremental output through SSE
* System prompts - Top-level system instructions
* Tool use - Supports Anthropic tool definitions
## Quick example
### Messages API
```bash theme={null}
curl "https://api.mixroute.ai/v1/messages" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-6",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
]
}'
```
```python theme={null}
from anthropic import Anthropic
client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")
message = client.messages.create(
model="claude-sonnet-4-6",
max_tokens=256,
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
)
print(message.content[0].text)
```
```python theme={null}
from anthropic import Anthropic
client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")
with client.messages.stream(
model="claude-sonnet-4-6",
max_tokens=256,
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
) as stream:
for text in stream.text_stream:
print(text, end="")
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-6",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="claude-sonnet-4-6",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="claude-sonnet-4-6",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Messages API
| Parameter | Type | Required | Description |
| ------------ | --------------- | -------- | ----------------------------------------------- |
| `model` | string | Yes | Must be `claude-sonnet-4-6`. |
| `messages` | array | Yes | Input messages with role and content. |
| `max_tokens` | integer | Yes | Maximum tokens to generate. |
| `system` | string \| array | No | Top-level system instruction. |
| `stream` | boolean | No | Enable SSE streaming. |
| `tools` | array | No | Anthropic tool definitions. |
| `thinking` | object | No | Extended-thinking configuration when supported. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `claude-sonnet-4-6`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Claude Sonnet 5
Source: https://docs.mixroute.ai/en/model-api/anthropic/claude-sonnet-5
Claude Sonnet 5: general-purpose model for coding and knowledge work. Request examples and parameters for MixRoute.
Claude Sonnet 5 is a general-purpose model for coding and knowledge work from Anthropic.
Call `claude-sonnet-5` through MixRoute's Anthropic-compatible Messages API; the OpenAI-compatible Chat Completions API is also supported.
## Key capabilities
* Messages API - Native Anthropic request and response format
* OpenAI-compatible - Also works through Chat Completions
* Streaming - Incremental output through SSE
* System prompts - Top-level system instructions
* Tool use - Supports Anthropic tool definitions
## Quick example
### Messages API
```bash theme={null}
curl "https://api.mixroute.ai/v1/messages" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
]
}'
```
```python theme={null}
from anthropic import Anthropic
client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")
message = client.messages.create(
model="claude-sonnet-5",
max_tokens=256,
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
)
print(message.content[0].text)
```
```python theme={null}
from anthropic import Anthropic
client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")
with client.messages.stream(
model="claude-sonnet-5",
max_tokens=256,
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
) as stream:
for text in stream.text_stream:
print(text, end="")
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="claude-sonnet-5",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="claude-sonnet-5",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Messages API
| Parameter | Type | Required | Description |
| ------------ | --------------- | -------- | ----------------------------------------------- |
| `model` | string | Yes | Must be `claude-sonnet-5`. |
| `messages` | array | Yes | Input messages with role and content. |
| `max_tokens` | integer | Yes | Maximum tokens to generate. |
| `system` | string \| array | No | Top-level system instruction. |
| `stream` | boolean | No | Enable SSE streaming. |
| `tools` | array | No | Anthropic tool definitions. |
| `thinking` | object | No | Extended-thinking configuration when supported. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `claude-sonnet-5`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Doubao Seedance 2.5
Source: https://docs.mixroute.ai/en/model-api/bytedance/doubao-seedance-2-5
Doubao Seedance 2.5 video generation through MixRoute, with text-to-video and image-to-video examples.
Doubao Seedance 2.5 is a ByteDance video model. Use the complete route ID `doubao-seedance-2-5-260628`; the version suffix is part of the ID.
Full field definitions: [Doubao API](/en/api-reference/endpoint/doubao).
## Model Parameters and Limits
| Setting | Value |
| --------------------- | ------------------------------------------------------------------------------------------------------ |
| `model` | `doubao-seedance-2-5-260628` |
| Input modes | Text, first-frame images, first/last-frame images, or multimodal references. |
| `metadata.content` | Required input array. Include a text item for text-only generation and keep it consistent with prompt. |
| `metadata.duration` | 4-30 / -1 seconds; -1 selects duration automatically. |
| `metadata.resolution` | `480p`, `720p`, `1080p`; default 720p. |
| `metadata.ratio` | `21:9`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16`, `adaptive` |
| Audio | `metadata.generate_audio` defaults to true; false produces silent video. |
| Format | `metadata.output_format`: `mp4` (default), `mov` |
| Frame rate | 24 fps |
* Keep `model`, `prompt`, and `asset` at the root; every provider field belongs in `metadata`. Set `asset=true` for the media-input examples.
* Frame roles and `reference_*` roles are separate input modes; do not combine them.
* The default ratio is adaptive. First-frame, first/last-frame, editing, and extension modes require adaptive. Editing requires duration=-1 and a 4-30 second source video.
* Multimodal references allow up to 30 images, 10 videos, and 10 audio clips; audio-only references are supported.
## Examples
Set `MIXROUTE_API_KEY` and replace image/video/audio placeholders with accessible source media before calling.
### Text-to-Video
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "doubao-seedance-2-5-260628",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": false,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
}
],
"duration": 4,
"resolution": "480p",
"ratio": "1:1",
"generate_audio": false,
"watermark": false
}
}'
```
### Python
```python theme={null}
import json
import os
import requests
payload = json.loads(r'''
{
"model": "doubao-seedance-2-5-260628",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": false,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
}
],
"duration": 4,
"resolution": "480p",
"ratio": "1:1",
"generate_audio": false,
"watermark": false
}
}
''')
response = requests.post(
"https://api.mixroute.ai/v1/video/generations",
headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
json=payload,
timeout=60,
)
response.raise_for_status()
result = response.json()
if result.get("code") not in (None, 0, 200, "0", "200", "success"):
raise RuntimeError(result.get("message") or result)
print(result)
```
### First-Frame Image
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "doubao-seedance-2-5-260628",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": true,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/first-frame.png"
},
"role": "first_frame"
}
],
"duration": 4,
"resolution": "480p",
"ratio": "adaptive",
"generate_audio": false,
"watermark": false
}
}'
```
## Task Result
Retain the submitted MixRoute task ID and use [Query Video Task](/en/api-reference/endpoint/query-video-task). Read the video URL only after a successful terminal status; submission does not mean generation is complete.
# Dreamina Seedance 2.0
Source: https://docs.mixroute.ai/en/model-api/bytedance/dreamina-seedance-2-0
Dreamina Seedance 2.0: multimodal video generation model. Request examples and parameters for MixRoute.
Dreamina Seedance 2.0 is a ByteDance video model. Use the complete route ID `dreamina-seedance-2-0-260128`; the version suffix is part of the ID.
Full field definitions: [Dreamina API](/en/api-reference/endpoint/dreamina).
## Model Parameters and Limits
| Setting | Value |
| --------------------- | ------------------------------------------------------------------------------------------------------ |
| `model` | `dreamina-seedance-2-0-260128` |
| Input modes | Text, first-frame images, first/last-frame images, or multimodal references. |
| `metadata.content` | Required input array. Include a text item for text-only generation and keep it consistent with prompt. |
| `metadata.duration` | 4-15 / -1 seconds; -1 selects duration automatically. |
| `metadata.resolution` | `480p`, `720p`, `1080p`, `4k`; default 720p. |
| `metadata.ratio` | `21:9`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16`, `adaptive` |
| Audio | `metadata.generate_audio` defaults to true; false produces silent video. |
| Format | `mp4` |
| Frame rate | 24 fps |
* Keep `model`, `prompt`, and `asset` at the root; every provider field belongs in `metadata`. Set `asset=true` for the media-input examples.
* Frame roles and `reference_*` roles are separate input modes; do not combine them.
* The default ratio is adaptive; supported concrete ratios may also be selected.
* Multimodal references allow up to nine images, three videos, and three audio clips. Audio references require an image or video reference in the same request.
## Examples
Set `MIXROUTE_API_KEY` and replace image/video/audio placeholders with accessible source media before calling.
### Text-to-Video
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "dreamina-seedance-2-0-260128",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": false,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
}
],
"duration": 4,
"resolution": "480p",
"ratio": "1:1",
"generate_audio": false,
"watermark": false
}
}'
```
### Python
```python theme={null}
import json
import os
import requests
payload = json.loads(r'''
{
"model": "dreamina-seedance-2-0-260128",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": false,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
}
],
"duration": 4,
"resolution": "480p",
"ratio": "1:1",
"generate_audio": false,
"watermark": false
}
}
''')
response = requests.post(
"https://api.mixroute.ai/v1/video/generations",
headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
json=payload,
timeout=60,
)
response.raise_for_status()
result = response.json()
if result.get("code") not in (None, 0, 200, "0", "200", "success"):
raise RuntimeError(result.get("message") or result)
print(result)
```
### First-Frame Image
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "dreamina-seedance-2-0-260128",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": true,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/first-frame.png"
},
"role": "first_frame"
}
],
"duration": 4,
"resolution": "480p",
"ratio": "adaptive",
"generate_audio": false,
"watermark": false
}
}'
```
### Video Reference
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "dreamina-seedance-2-0-260128",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": true,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
},
{
"type": "video_url",
"video_url": {
"url": "https://example.com/reference.mp4"
},
"role": "reference_video"
}
],
"duration": 4,
"resolution": "480p",
"ratio": "1:1",
"generate_audio": false,
"watermark": false
}
}'
```
### Image and Audio References
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "dreamina-seedance-2-0-260128",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": true,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/reference.png"
},
"role": "reference_image"
},
{
"type": "audio_url",
"audio_url": {
"url": "https://example.com/reference.mp3"
},
"role": "reference_audio"
}
],
"duration": 4,
"resolution": "480p",
"ratio": "1:1",
"generate_audio": true,
"watermark": false
}
}'
```
## Task Result
Retain the submitted MixRoute task ID and use [Query Video Task](/en/api-reference/endpoint/query-video-task). Read the video URL only after a successful terminal status; submission does not mean generation is complete.
# Dreamina Seedance 2.0 Fast
Source: https://docs.mixroute.ai/en/model-api/bytedance/dreamina-seedance-2-0-fast
Dreamina Seedance 2.0 Fast: multimodal video generation model. Request examples and parameters for MixRoute.
Dreamina Seedance 2.0 Fast is a ByteDance video model. Use the complete route ID `dreamina-seedance-2-0-fast-260128`; the version suffix is part of the ID.
Full field definitions: [Dreamina API](/en/api-reference/endpoint/dreamina).
## Model Parameters and Limits
| Setting | Value |
| --------------------- | ------------------------------------------------------------------------------------------------------ |
| `model` | `dreamina-seedance-2-0-fast-260128` |
| Input modes | Text, first-frame images, first/last-frame images, or multimodal references. |
| `metadata.content` | Required input array. Include a text item for text-only generation and keep it consistent with prompt. |
| `metadata.duration` | 4-15 / -1 seconds; -1 selects duration automatically. |
| `metadata.resolution` | `480p`, `720p`; default 720p. |
| `metadata.ratio` | `21:9`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16`, `adaptive` |
| Audio | `metadata.generate_audio` defaults to true; false produces silent video. |
| Format | `mp4` |
| Frame rate | 24 fps |
* Keep `model`, `prompt`, and `asset` at the root; every provider field belongs in `metadata`. Set `asset=true` for the media-input examples.
* Frame roles and `reference_*` roles are separate input modes; do not combine them.
* The default ratio is adaptive; supported concrete ratios may also be selected.
* Multimodal references allow up to nine images, three videos, and three audio clips. Audio references require an image or video reference in the same request.
## Examples
Set `MIXROUTE_API_KEY` and replace image/video/audio placeholders with accessible source media before calling.
### Text-to-Video
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "dreamina-seedance-2-0-fast-260128",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": false,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
}
],
"duration": 4,
"resolution": "480p",
"ratio": "1:1",
"generate_audio": false,
"watermark": false
}
}'
```
### Python
```python theme={null}
import json
import os
import requests
payload = json.loads(r'''
{
"model": "dreamina-seedance-2-0-fast-260128",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": false,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
}
],
"duration": 4,
"resolution": "480p",
"ratio": "1:1",
"generate_audio": false,
"watermark": false
}
}
''')
response = requests.post(
"https://api.mixroute.ai/v1/video/generations",
headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
json=payload,
timeout=60,
)
response.raise_for_status()
result = response.json()
if result.get("code") not in (None, 0, 200, "0", "200", "success"):
raise RuntimeError(result.get("message") or result)
print(result)
```
### First-Frame Image
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "dreamina-seedance-2-0-fast-260128",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": true,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/first-frame.png"
},
"role": "first_frame"
}
],
"duration": 4,
"resolution": "480p",
"ratio": "adaptive",
"generate_audio": false,
"watermark": false
}
}'
```
### Video Reference
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "dreamina-seedance-2-0-fast-260128",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": true,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
},
{
"type": "video_url",
"video_url": {
"url": "https://example.com/reference.mp4"
},
"role": "reference_video"
}
],
"duration": 4,
"resolution": "480p",
"ratio": "1:1",
"generate_audio": false,
"watermark": false
}
}'
```
### Image and Audio References
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "dreamina-seedance-2-0-fast-260128",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": true,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/reference.png"
},
"role": "reference_image"
},
{
"type": "audio_url",
"audio_url": {
"url": "https://example.com/reference.mp3"
},
"role": "reference_audio"
}
],
"duration": 4,
"resolution": "480p",
"ratio": "1:1",
"generate_audio": true,
"watermark": false
}
}'
```
## Task Result
Retain the submitted MixRoute task ID and use [Query Video Task](/en/api-reference/endpoint/query-video-task). Read the video URL only after a successful terminal status; submission does not mean generation is complete.
# Dreamina Seedance 2.0 Mini
Source: https://docs.mixroute.ai/en/model-api/bytedance/dreamina-seedance-2-0-mini
Dreamina Seedance 2.0 Mini: multimodal video generation model. Request examples and parameters for MixRoute.
Dreamina Seedance 2.0 Mini is a ByteDance video model. Use the complete route ID `dreamina-seedance-2-0-mini-260615`; the version suffix is part of the ID.
Full field definitions: [Dreamina API](/en/api-reference/endpoint/dreamina).
## Model Parameters and Limits
| Setting | Value |
| --------------------- | ------------------------------------------------------------------------------------------------------ |
| `model` | `dreamina-seedance-2-0-mini-260615` |
| Input modes | Text, first-frame images, first/last-frame images, or multimodal references. |
| `metadata.content` | Required input array. Include a text item for text-only generation and keep it consistent with prompt. |
| `metadata.duration` | 4-15 / -1 seconds; -1 selects duration automatically. |
| `metadata.resolution` | `480p`, `720p`; default 720p. |
| `metadata.ratio` | `21:9`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16`, `adaptive` |
| Audio | `metadata.generate_audio` defaults to true; false produces silent video. |
| Format | `mp4` |
| Frame rate | 24 fps |
* Keep `model`, `prompt`, and `asset` at the root; every provider field belongs in `metadata`. Set `asset=true` for the media-input examples.
* Frame roles and `reference_*` roles are separate input modes; do not combine them.
* The default ratio is adaptive; supported concrete ratios may also be selected.
* Multimodal references allow up to nine images, three videos, and three audio clips. Audio references require an image or video reference in the same request.
## Examples
Set `MIXROUTE_API_KEY` and replace image/video/audio placeholders with accessible source media before calling.
### Text-to-Video
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "dreamina-seedance-2-0-mini-260615",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": false,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
}
],
"duration": 4,
"resolution": "480p",
"ratio": "1:1",
"generate_audio": false,
"watermark": false
}
}'
```
### Python
```python theme={null}
import json
import os
import requests
payload = json.loads(r'''
{
"model": "dreamina-seedance-2-0-mini-260615",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": false,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
}
],
"duration": 4,
"resolution": "480p",
"ratio": "1:1",
"generate_audio": false,
"watermark": false
}
}
''')
response = requests.post(
"https://api.mixroute.ai/v1/video/generations",
headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
json=payload,
timeout=60,
)
response.raise_for_status()
result = response.json()
if result.get("code") not in (None, 0, 200, "0", "200", "success"):
raise RuntimeError(result.get("message") or result)
print(result)
```
### First-Frame Image
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "dreamina-seedance-2-0-mini-260615",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": true,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/first-frame.png"
},
"role": "first_frame"
}
],
"duration": 4,
"resolution": "480p",
"ratio": "adaptive",
"generate_audio": false,
"watermark": false
}
}'
```
### Video Reference
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "dreamina-seedance-2-0-mini-260615",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": true,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
},
{
"type": "video_url",
"video_url": {
"url": "https://example.com/reference.mp4"
},
"role": "reference_video"
}
],
"duration": 4,
"resolution": "480p",
"ratio": "1:1",
"generate_audio": false,
"watermark": false
}
}'
```
### Image and Audio References
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "dreamina-seedance-2-0-mini-260615",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": true,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/reference.png"
},
"role": "reference_image"
},
{
"type": "audio_url",
"audio_url": {
"url": "https://example.com/reference.mp3"
},
"role": "reference_audio"
}
],
"duration": 4,
"resolution": "480p",
"ratio": "1:1",
"generate_audio": true,
"watermark": false
}
}'
```
## Task Result
Retain the submitted MixRoute task ID and use [Query Video Task](/en/api-reference/endpoint/query-video-task). Read the video URL only after a successful terminal status; submission does not mean generation is complete.
# Seedance 1.0 Pro
Source: https://docs.mixroute.ai/en/model-api/bytedance/seedance-1-0-pro
Seedance 1.0 Pro: text and image-to-video model. Request examples and parameters for MixRoute.
Seedance 1.0 Pro is a ByteDance video model. Use the complete route ID `seedance-1-0-pro-250528`; the version suffix is part of the ID.
Full field definitions: [Seedance API](/en/api-reference/endpoint/seedance).
## Model Parameters and Limits
| Setting | Value |
| --------------------- | ------------------------------------------------------------------------------------------------------ |
| `model` | `seedance-1-0-pro-250528` |
| Input modes | Text, first-frame image, or first/last-frame images. |
| `metadata.content` | Required input array. Include a text item for text-only generation and keep it consistent with prompt. |
| `metadata.duration` | 2-12 seconds; -1 is not supported. |
| `metadata.resolution` | `480p`, `720p`, `1080p`; default 1080p. |
| `metadata.ratio` | `21:9`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16`, `adaptive` |
| Audio | Silent output. Do not send generate\_audio. |
| Format | `mp4` |
| Frame rate | 24 fps |
* Keep `model`, `prompt`, and `asset` at the root; every provider field belongs in `metadata`. Set `asset=true` for the media-input examples.
* Frame roles and `reference_*` roles are separate input modes; do not combine them.
* This legacy version does not accept video/audio references or reference\_image inputs. Use only the frame-input modes listed above; confirm account access before calling its model ID.
* Text-to-video defaults to 16:9 and does not accept adaptive; image-to-video defaults to adaptive.
## Examples
Set `MIXROUTE_API_KEY` and replace image/video/audio placeholders with accessible source media before calling.
### Text-to-Video
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "seedance-1-0-pro-250528",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": false,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
}
],
"duration": 4,
"resolution": "480p",
"ratio": "1:1",
"watermark": false
}
}'
```
### Python
```python theme={null}
import json
import os
import requests
payload = json.loads(r'''
{
"model": "seedance-1-0-pro-250528",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": false,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
}
],
"duration": 4,
"resolution": "480p",
"ratio": "1:1",
"watermark": false
}
}
''')
response = requests.post(
"https://api.mixroute.ai/v1/video/generations",
headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
json=payload,
timeout=60,
)
response.raise_for_status()
result = response.json()
if result.get("code") not in (None, 0, 200, "0", "200", "success"):
raise RuntimeError(result.get("message") or result)
print(result)
```
### First-Frame Image
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "seedance-1-0-pro-250528",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": true,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/first-frame.png"
},
"role": "first_frame"
}
],
"duration": 4,
"resolution": "480p",
"ratio": "adaptive",
"watermark": false
}
}'
```
## Task Result
Retain the submitted MixRoute task ID and use [Query Video Task](/en/api-reference/endpoint/query-video-task). Read the video URL only after a successful terminal status; submission does not mean generation is complete.
# Seedance 1.0 Pro Fast
Source: https://docs.mixroute.ai/en/model-api/bytedance/seedance-1-0-pro-fast
Seedance 1.0 Pro Fast: text and image-to-video model. Request examples and parameters for MixRoute.
Seedance 1.0 Pro Fast is a ByteDance video model. Use the complete route ID `seedance-1-0-pro-fast-251015`; the version suffix is part of the ID.
Full field definitions: [Seedance API](/en/api-reference/endpoint/seedance).
## Model Parameters and Limits
| Setting | Value |
| --------------------- | ------------------------------------------------------------------------------------------------------ |
| `model` | `seedance-1-0-pro-fast-251015` |
| Input modes | Text or first-frame image. |
| `metadata.content` | Required input array. Include a text item for text-only generation and keep it consistent with prompt. |
| `metadata.duration` | 2-12 seconds; -1 is not supported. |
| `metadata.resolution` | `480p`, `720p`, `1080p`; default 1080p. |
| `metadata.ratio` | `21:9`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16`, `adaptive` |
| Audio | Silent output. Do not send generate\_audio. |
| Format | `mp4` |
| Frame rate | 24 fps |
* Keep `model`, `prompt`, and `asset` at the root; every provider field belongs in `metadata`. Set `asset=true` for the media-input examples.
* Frame roles and `reference_*` roles are separate input modes; do not combine them.
* This legacy version does not accept video/audio references or reference\_image inputs. Use only the frame-input modes listed above; confirm account access before calling its model ID.
* Pro Fast 1.0 does not support last-frame interpolation.
* Text-to-video defaults to 16:9 and does not accept adaptive; image-to-video defaults to adaptive.
## Examples
Set `MIXROUTE_API_KEY` and replace image/video/audio placeholders with accessible source media before calling.
### Text-to-Video
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "seedance-1-0-pro-fast-251015",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": false,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
}
],
"duration": 4,
"resolution": "480p",
"ratio": "1:1",
"watermark": false
}
}'
```
### Python
```python theme={null}
import json
import os
import requests
payload = json.loads(r'''
{
"model": "seedance-1-0-pro-fast-251015",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": false,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
}
],
"duration": 4,
"resolution": "480p",
"ratio": "1:1",
"watermark": false
}
}
''')
response = requests.post(
"https://api.mixroute.ai/v1/video/generations",
headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
json=payload,
timeout=60,
)
response.raise_for_status()
result = response.json()
if result.get("code") not in (None, 0, 200, "0", "200", "success"):
raise RuntimeError(result.get("message") or result)
print(result)
```
### First-Frame Image
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "seedance-1-0-pro-fast-251015",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": true,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/first-frame.png"
},
"role": "first_frame"
}
],
"duration": 4,
"resolution": "480p",
"ratio": "adaptive",
"watermark": false
}
}'
```
## Task Result
Retain the submitted MixRoute task ID and use [Query Video Task](/en/api-reference/endpoint/query-video-task). Read the video URL only after a successful terminal status; submission does not mean generation is complete.
# Seedance 1.5 Pro
Source: https://docs.mixroute.ai/en/model-api/bytedance/seedance-1-5-pro
Seedance 1.5 Pro: joint audio-video generation model. Request examples and parameters for MixRoute.
Seedance 1.5 Pro is a ByteDance video model. Use the complete route ID `seedance-1-5-pro-251215`; the version suffix is part of the ID.
Full field definitions: [Seedance API](/en/api-reference/endpoint/seedance).
## Model Parameters and Limits
| Setting | Value |
| --------------------- | ------------------------------------------------------------------------------------------------------ |
| `model` | `seedance-1-5-pro-251215` |
| Input modes | Text, first-frame image, or first/last-frame images. |
| `metadata.content` | Required input array. Include a text item for text-only generation and keep it consistent with prompt. |
| `metadata.duration` | 4-12 / -1 seconds; -1 selects duration automatically. |
| `metadata.resolution` | `480p`, `720p`, `1080p`; default 720p. |
| `metadata.ratio` | `21:9`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16`, `adaptive` |
| Audio | `metadata.generate_audio` defaults to true; false produces silent video. |
| Format | `mp4` |
| Frame rate | 24 fps |
* Keep `model`, `prompt`, and `asset` at the root; every provider field belongs in `metadata`. Set `asset=true` for the media-input examples.
* Frame roles and `reference_*` roles are separate input modes; do not combine them.
* This legacy version does not accept video/audio references or reference\_image inputs. Use only the frame-input modes listed above; confirm account access before calling its model ID.
* The default ratio is adaptive; supported concrete ratios may also be selected.
## Examples
Set `MIXROUTE_API_KEY` and replace image/video/audio placeholders with accessible source media before calling.
### Text-to-Video
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "seedance-1-5-pro-251215",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": false,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
}
],
"duration": 4,
"resolution": "480p",
"ratio": "1:1",
"generate_audio": false,
"watermark": false
}
}'
```
### Python
```python theme={null}
import json
import os
import requests
payload = json.loads(r'''
{
"model": "seedance-1-5-pro-251215",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": false,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
}
],
"duration": 4,
"resolution": "480p",
"ratio": "1:1",
"generate_audio": false,
"watermark": false
}
}
''')
response = requests.post(
"https://api.mixroute.ai/v1/video/generations",
headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
json=payload,
timeout=60,
)
response.raise_for_status()
result = response.json()
if result.get("code") not in (None, 0, 200, "0", "200", "success"):
raise RuntimeError(result.get("message") or result)
print(result)
```
### First-Frame Image
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "seedance-1-5-pro-251215",
"prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
"asset": true,
"metadata": {
"content": [
{
"type": "text",
"text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/first-frame.png"
},
"role": "first_frame"
}
],
"duration": 4,
"resolution": "480p",
"ratio": "adaptive",
"generate_audio": false,
"watermark": false
}
}'
```
## Task Result
Retain the submitted MixRoute task ID and use [Query Video Task](/en/api-reference/endpoint/query-video-task). Read the video URL only after a successful terminal status; submission does not mean generation is complete.
# DeepSeek R1
Source: https://docs.mixroute.ai/en/model-api/deepseek/deepseek-r1
DeepSeek R1: reasoning model for complex problem solving. Request examples and parameters for MixRoute.
DeepSeek R1 is a reasoning model for complex problem solving from DeepSeek.
Call `deepseek-r1` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-r1",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="deepseek-r1",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="deepseek-r1",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `deepseek-r1`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# DeepSeek V3
Source: https://docs.mixroute.ai/en/model-api/deepseek/deepseek-v3
DeepSeek V3: general-purpose language model. Request examples and parameters for MixRoute.
DeepSeek V3 is a general-purpose language model from DeepSeek.
Call `deepseek-v3` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v3",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="deepseek-v3",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="deepseek-v3",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `deepseek-v3`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# DeepSeek V3.1
Source: https://docs.mixroute.ai/en/model-api/deepseek/deepseek-v3.1
DeepSeek V3.1: general-purpose language model. Request examples and parameters for MixRoute.
DeepSeek V3.1 is a general-purpose language model from DeepSeek.
Call `deepseek-v3.1` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v3.1",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="deepseek-v3.1",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="deepseek-v3.1",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `deepseek-v3.1`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# DeepSeek V3.1 Terminus
Source: https://docs.mixroute.ai/en/model-api/deepseek/deepseek-v3.1-terminus
DeepSeek V3.1 Terminus: general-purpose language model. Request examples and parameters for MixRoute.
DeepSeek V3.1 Terminus is a general-purpose language model from DeepSeek.
Call `deepseek-v3.1-terminus` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v3.1-terminus",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="deepseek-v3.1-terminus",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="deepseek-v3.1-terminus",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `deepseek-v3.1-terminus`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# DeepSeek V3.2
Source: https://docs.mixroute.ai/en/model-api/deepseek/deepseek-v3.2
DeepSeek V3.2: general-purpose language model. Request examples and parameters for MixRoute.
DeepSeek V3.2 is a general-purpose language model from DeepSeek.
Call `deepseek-v3.2` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v3.2",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="deepseek-v3.2",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="deepseek-v3.2",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `deepseek-v3.2`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# DeepSeek V3.2 Exp
Source: https://docs.mixroute.ai/en/model-api/deepseek/deepseek-v3.2-exp
DeepSeek V3.2 Exp: general-purpose language model. Request examples and parameters for MixRoute.
DeepSeek V3.2 Exp is a general-purpose language model from DeepSeek.
Call `deepseek-v3.2-exp` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v3.2-exp",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="deepseek-v3.2-exp",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="deepseek-v3.2-exp",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `deepseek-v3.2-exp`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# DeepSeek V3.2 Thinking
Source: https://docs.mixroute.ai/en/model-api/deepseek/deepseek-v3.2-thinking
DeepSeek V3.2 Thinking: reasoning model for complex problem solving. Request examples and parameters for MixRoute.
DeepSeek V3.2 Thinking is a reasoning model for complex problem solving from DeepSeek.
Call `deepseek-v3.2-thinking` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v3.2-thinking",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="deepseek-v3.2-thinking",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="deepseek-v3.2-thinking",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `deepseek-v3.2-thinking`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# DeepSeek V4 Flash
Source: https://docs.mixroute.ai/en/model-api/deepseek/deepseek-v4-flash
DeepSeek V4 Flash: fast, efficient language model. Request examples and parameters for MixRoute.
DeepSeek V4 Flash is a fast, efficient language model from DeepSeek.
Call `deepseek-v4-flash` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-flash",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `deepseek-v4-flash`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# DeepSeek V4 Flash Vision Exp
Source: https://docs.mixroute.ai/en/model-api/deepseek/deepseek-v4-flash-vision-exp
DeepSeek V4 Flash Vision Exp: experimental multimodal model for image-aware agents.
DeepSeek V4 Flash Vision Exp is the experimental vision-capable V4 Flash route for text-and-image reasoning and multimodal agent workflows.
Call `deepseek-v4-flash-vision-exp` through MixRoute using the endpoint below.
## Key capabilities
* Vision input - Accepts text and image content
* 1M context window - Supports long multimodal sessions
* 384K maximum output - Supports extended reasoning and generation
* Tools and Responses compatibility - Supports agent-oriented workflows
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-flash-vision-exp",
"messages": [{
"role": "user",
"content": [
{"type": "text", "text": "Describe the image."},
{"type": "image_url", "image_url": {"url": "https://example.com/image.jpg"}}
]
}],
"max_tokens": 256
}'
```
## Parameters
| Parameter | Type | Required | Description |
| ------------------ | ------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Model ID. Must be `deepseek-v4-flash-vision-exp`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `image_url` | object | No | Public URL or supported encoded image input. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `reasoning_effort` | string | No | Reasoning level when supported. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
## Vendor reference
* [DeepSeek models and pricing](https://api-docs.deepseek.com/quick_start/pricing/)
# DeepSeek V4 Pro
Source: https://docs.mixroute.ai/en/model-api/deepseek/deepseek-v4-pro
DeepSeek V4 Pro: general-purpose language model. Request examples and parameters for MixRoute.
DeepSeek V4 Pro is a general-purpose language model from DeepSeek.
Call `deepseek-v4-pro` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-pro",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="deepseek-v4-pro",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="deepseek-v4-pro",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `deepseek-v4-pro`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# MiniMax H3
Source: https://docs.mixroute.ai/en/model-api/minimax/minimax-h3
MiniMax H3 multimodal video generation through MixRoute, with text-to-video and asynchronous task examples.
MiniMax H3 is MiniMax's general-purpose multimodal video generation model available through MixRoute.
Use the exact model ID `MiniMax-H3` with the video generation endpoint.
See [MiniMax H3 API](/en/api-reference/endpoint/minimax-h3) for the complete field reference. On MixRoute, put H3 controls in `metadata.content`, `metadata.resolution`, `metadata.duration`, and `metadata.ratio`.
Keep `model` and `prompt` at the root. Put H3 content and output controls in `metadata`, including `content`, `resolution`, `duration`, and `ratio`. Keep the prompt consistent with the text content.
## Examples
Set `MIXROUTE_API_KEY` to your MixRoute key. Replace reference URLs or Base64 placeholders with your own accessible media. Each request creates a billable generation task when accepted.
```bash theme={null}
curl --location "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "MiniMax-H3",
"prompt": "A professor is teaching a class in a classroom.",
"metadata": {
"content": [
{
"type": "text",
"text": "A professor is teaching a class in a classroom."
}
],
"resolution": "768P",
"duration": 4,
"ratio": "9:16"
}
}'
```
### Python
```python theme={null}
import json
import os
import requests
payload = json.loads(r'''
{
"model": "MiniMax-H3",
"prompt": "A professor is teaching a class in a classroom.",
"metadata": {
"content": [
{
"type": "text",
"text": "A professor is teaching a class in a classroom."
}
],
"resolution": "768P",
"duration": 4,
"ratio": "9:16"
}
}
''')
response = requests.post(
"https://api.mixroute.ai/v1/video/generations",
headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
json=payload,
timeout=60,
)
response.raise_for_status()
print(response.json())
```
## Task Results
Use the returned MixRoute task ID with [Query Video Task](/en/api-reference/endpoint/query-video-task). The gateway response is not necessarily the vendor's native response envelope.
# MiniMax M2
Source: https://docs.mixroute.ai/en/model-api/minimax/minimax-m2
MiniMax M2: fast, efficient language model. Request examples and parameters for MixRoute.
MiniMax M2 is a fast, efficient language model from MiniMax.
Call `MiniMax-M2` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MiniMax-M2",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="MiniMax-M2",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="MiniMax-M2",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `MiniMax-M2`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# MiniMax M2.5
Source: https://docs.mixroute.ai/en/model-api/minimax/minimax-m2.5
MiniMax M2.5: fast, efficient language model. Request examples and parameters for MixRoute.
MiniMax M2.5 is a fast, efficient language model from MiniMax.
Call `MiniMax-M2.5` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MiniMax-M2.5",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="MiniMax-M2.5",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="MiniMax-M2.5",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `MiniMax-M2.5`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# MiniMax M2.7
Source: https://docs.mixroute.ai/en/model-api/minimax/minimax-m2.7
MiniMax M2.7: fast, efficient language model. Request examples and parameters for MixRoute.
MiniMax M2.7 is a fast, efficient language model from MiniMax.
Call `MiniMax-M2.7` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MiniMax-M2.7",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="MiniMax-M2.7",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="MiniMax-M2.7",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `MiniMax-M2.7`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# MiniMax M3
Source: https://docs.mixroute.ai/en/model-api/minimax/minimax-m3
MiniMax M3: fast, efficient language model. Request examples and parameters for MixRoute.
MiniMax M3 is a fast, efficient language model from MiniMax.
Call `MiniMax-M3` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MiniMax-M3",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="MiniMax-M3",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="MiniMax-M3",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `MiniMax-M3`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Kimi K2.5
Source: https://docs.mixroute.ai/en/model-api/moonshot/kimi-k2.5
Kimi K2.5: general-purpose language model. Request examples and parameters for MixRoute.
Kimi K2.5 is a general-purpose language model from Moonshot.
Call `kimi-k2.5` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kimi-k2.5",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="kimi-k2.5",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="kimi-k2.5",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `kimi-k2.5`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Kimi K2.6
Source: https://docs.mixroute.ai/en/model-api/moonshot/kimi-k2.6
Kimi K2.6: general-purpose language model. Request examples and parameters for MixRoute.
Kimi K2.6 is a general-purpose language model from Moonshot.
Call `kimi-k2.6` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kimi-k2.6",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="kimi-k2.6",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="kimi-k2.6",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `kimi-k2.6`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Kimi K2.7 Code
Source: https://docs.mixroute.ai/en/model-api/moonshot/kimi-k2.7-code
Kimi K2.7 Code: coding and software engineering model. Request examples and parameters for MixRoute.
Kimi K2.7 Code is a coding and software engineering model from Moonshot.
Call `kimi-k2.7-code` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kimi-k2.7-code",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="kimi-k2.7-code",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="kimi-k2.7-code",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `kimi-k2.7-code`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Kimi K3
Source: https://docs.mixroute.ai/en/model-api/moonshot/kimi-k3
Kimi K3: native multimodal agentic model with a 1M context window. Request examples and parameters for MixRoute.
Kimi K3 is Moonshot's open-weight native multimodal agentic model for long-horizon coding, knowledge work, and reasoning.
Call `kimi-k3` through MixRoute using the endpoint shown below.
## Key capabilities
* 1M context window - Supports long-running work across large repositories and document sets
* Native multimodality - Understands text and image input
* Agentic workflows - Designed for coding, reasoning, and multi-step knowledge work
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kimi-k3",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="kimi-k3",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="kimi-k3",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `kimi-k3`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Moonshot V1 128K
Source: https://docs.mixroute.ai/en/model-api/moonshot/moonshot-v1-128k
Moonshot V1 128K: general-purpose language model. Request examples and parameters for MixRoute.
Moonshot V1 128K is a general-purpose language model from Moonshot.
Call `moonshot-v1-128k` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "moonshot-v1-128k",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="moonshot-v1-128k",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="moonshot-v1-128k",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `moonshot-v1-128k`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Moonshot V1 128K Vision Preview
Source: https://docs.mixroute.ai/en/model-api/moonshot/moonshot-v1-128k-vision-preview
Moonshot V1 128K Vision Preview: general-purpose language model. Request examples and parameters for MixRoute.
Moonshot V1 128K Vision Preview is a general-purpose language model from Moonshot.
Call `moonshot-v1-128k-vision-preview` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "moonshot-v1-128k-vision-preview",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="moonshot-v1-128k-vision-preview",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="moonshot-v1-128k-vision-preview",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `moonshot-v1-128k-vision-preview`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Moonshot V1 32K
Source: https://docs.mixroute.ai/en/model-api/moonshot/moonshot-v1-32k
Moonshot V1 32K: general-purpose language model. Request examples and parameters for MixRoute.
Moonshot V1 32K is a general-purpose language model from Moonshot.
Call `moonshot-v1-32k` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "moonshot-v1-32k",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="moonshot-v1-32k",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="moonshot-v1-32k",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `moonshot-v1-32k`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Moonshot V1 32K Vision Preview
Source: https://docs.mixroute.ai/en/model-api/moonshot/moonshot-v1-32k-vision-preview
Moonshot V1 32K Vision Preview: general-purpose language model. Request examples and parameters for MixRoute.
Moonshot V1 32K Vision Preview is a general-purpose language model from Moonshot.
Call `moonshot-v1-32k-vision-preview` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "moonshot-v1-32k-vision-preview",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="moonshot-v1-32k-vision-preview",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="moonshot-v1-32k-vision-preview",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `moonshot-v1-32k-vision-preview`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Moonshot V1 8K
Source: https://docs.mixroute.ai/en/model-api/moonshot/moonshot-v1-8k
Moonshot V1 8K: general-purpose language model. Request examples and parameters for MixRoute.
Moonshot V1 8K is a general-purpose language model from Moonshot.
Call `moonshot-v1-8k` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "moonshot-v1-8k",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="moonshot-v1-8k",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="moonshot-v1-8k",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `moonshot-v1-8k`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Moonshot V1 8K Vision Preview
Source: https://docs.mixroute.ai/en/model-api/moonshot/moonshot-v1-8k-vision-preview
Moonshot V1 8K Vision Preview: general-purpose language model. Request examples and parameters for MixRoute.
Moonshot V1 8K Vision Preview is a general-purpose language model from Moonshot.
Call `moonshot-v1-8k-vision-preview` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "moonshot-v1-8k-vision-preview",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="moonshot-v1-8k-vision-preview",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="moonshot-v1-8k-vision-preview",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `moonshot-v1-8k-vision-preview`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Hy-MT2 Lite
Source: https://docs.mixroute.ai/en/model-api/tencent/hy-mt2-lite
Hy-MT2 Lite: lightweight Tencent translation model optimized for low-latency and high-volume workloads.
Hy-MT2 Lite is Tencent Hy's lightweight translation model for latency-sensitive and high-volume translation workloads.
Call `hy-mt2-lite` through MixRoute using the OpenAI-compatible Chat Completions endpoint.
## Key capabilities
* Low latency - Optimized for fast translation responses
* 8K context window - Supports up to 4K input tokens and 4K output tokens
* High throughput - Suitable for batch localization and frequent requests
* OpenAI-compatible - Uses Chat Completions through MixRoute
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "hy-mt2-lite",
"messages": [
{
"role": "user",
"content": "Translate into Japanese while preserving the formal tone: Our service will be unavailable for maintenance on Friday."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="hy-mt2-lite",
messages=[{"role": "user", "content": "Translate into Japanese while preserving the formal tone: Our service will be unavailable for maintenance on Friday."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
## Parameters
| Parameter | Type | Required | Description |
| ------------ | ------- | -------- | -------------------------------------------- |
| `model` | string | Yes | Model ID. Must be `hy-mt2-lite`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. |
## Vendor reference
* [Tencent Cloud TokenHub model list](https://cloud.tencent.com/document/product/1823/130051)
# Hy-MT2 Plus
Source: https://docs.mixroute.ai/en/model-api/tencent/hy-mt2-plus
Hy-MT2 Plus: Tencent translation model with strong instruction following for controlled translation workflows.
Hy-MT2 Plus is Tencent Hy's translation model for controlled workflows that require strong instruction following.
Call `hy-mt2-plus` through MixRoute using the OpenAI-compatible Chat Completions endpoint.
## Key capabilities
* Instruction following - Handles explicit style, format, and terminology requirements
* 8K context window - Supports up to 4K input tokens and 4K output tokens
* Controlled translation - Suitable for repeatable localization workflows
* OpenAI-compatible - Uses Chat Completions through MixRoute
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "hy-mt2-plus",
"messages": [
{
"role": "user",
"content": "Translate into Japanese while preserving the formal tone: Our service will be unavailable for maintenance on Friday."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="hy-mt2-plus",
messages=[{"role": "user", "content": "Translate into Japanese while preserving the formal tone: Our service will be unavailable for maintenance on Friday."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
## Parameters
| Parameter | Type | Required | Description |
| ------------ | ------- | -------- | -------------------------------------------- |
| `model` | string | Yes | Model ID. Must be `hy-mt2-plus`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. |
## Vendor reference
* [Tencent Cloud TokenHub model list](https://cloud.tencent.com/document/product/1823/130051)
# Hy-MT2 Pro
Source: https://docs.mixroute.ai/en/model-api/tencent/hy-mt2-pro
Hy-MT2 Pro: Tencent's flagship translation model for professional domains and quality-sensitive work.
Hy-MT2 Pro is Tencent Hy's flagship translation model for professional domains and workloads where translation quality is the priority.
Call `hy-mt2-pro` through MixRoute using the OpenAI-compatible Chat Completions endpoint.
## Key capabilities
* Professional translation - Prioritizes quality for domain-specific material
* 8K context window - Supports up to 4K input tokens and 4K output tokens
* Instruction-driven - Accepts translation requirements through normal chat messages
* OpenAI-compatible - Uses Chat Completions through MixRoute
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "hy-mt2-pro",
"messages": [
{
"role": "user",
"content": "Translate into Japanese while preserving the formal tone: Our service will be unavailable for maintenance on Friday."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="hy-mt2-pro",
messages=[{"role": "user", "content": "Translate into Japanese while preserving the formal tone: Our service will be unavailable for maintenance on Friday."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
## Parameters
| Parameter | Type | Required | Description |
| ------------ | ------- | -------- | -------------------------------------------- |
| `model` | string | Yes | Model ID. Must be `hy-mt2-pro`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. |
## Vendor reference
* [Tencent Cloud TokenHub model list](https://cloud.tencent.com/document/product/1823/130051)
# Hy3
Source: https://docs.mixroute.ai/en/model-api/tencent/hy3
Hy3: Tencent's 256K-context production model for coding agents, long documents, search Q&A, and complex task execution.
Hy3 is Tencent Hy's production model for practical agent workloads, including coding, long-document analysis, multi-turn context, search Q\&A, and complex task execution.
Call `hy3` through MixRoute using the OpenAI-compatible Chat Completions endpoint.
## Key capabilities
* 256K context window - Supports up to 192K input tokens and 128K output tokens
* Agent workflows - Optimized for coding agents, document automation, and multi-step execution
* Reasoning and tools - Supports preserved thinking, structured output, function calling, and caching
* Production-focused - Improved task completion and engineering reliability over the preview route
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "hy3",
"messages": [
{
"role": "user",
"content": "Review this deployment plan and identify the highest-risk assumption."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="hy3",
messages=[{"role": "user", "content": "Review this deployment plan and identify the highest-risk assumption."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
## Parameters
| Parameter | Type | Required | Description |
| ------------------ | ------- | -------- | --------------------------------------------- |
| `model` | string | Yes | Model ID. Must be `hy3`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. |
| `reasoning_effort` | string | No | Reasoning effort when supported by the model. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
## Vendor reference
* [Tencent Cloud TokenHub model list](https://cloud.tencent.com/document/product/1823/130051)
# Hy4 Preview
Source: https://docs.mixroute.ai/en/model-api/tencent/hy4-preview
Hy4 Preview: Tencent's 1M-context flagship productivity model for complex agents, coding, office work, and analysis.
Hy4 Preview is Tencent Hy's next-generation flagship productivity model for complex agents, long-horizon software engineering, office work, and analytical tasks.
Call `hy4-preview` through MixRoute using the OpenAI-compatible Chat Completions endpoint.
## Key capabilities
* 1M context window - Supports up to 960K input tokens and 64K output tokens
* Agentic productivity - Designed for complex task execution, coding, documents, spreadsheets, and analysis
* Reasoning and tools - Supports preserved thinking, structured output, function calling, and caching
* Large MoE architecture - 770B total parameters with 49B activated per token
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "hy4-preview",
"messages": [
{
"role": "user",
"content": "Review this deployment plan and identify the highest-risk assumption."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="hy4-preview",
messages=[{"role": "user", "content": "Review this deployment plan and identify the highest-risk assumption."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
## Parameters
| Parameter | Type | Required | Description |
| ------------------ | ------- | -------- | --------------------------------------------- |
| `model` | string | Yes | Model ID. Must be `hy4-preview`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. |
| `reasoning_effort` | string | No | Reasoning effort when supported by the model. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
## Vendor reference
* [Tencent Cloud TokenHub model list](https://cloud.tencent.com/document/product/1823/130051)
* [Tencent Hy4 Preview repository](https://github.com/Tencent-Hunyuan/Hy4-preview)
# Dola Seed SC
Source: https://docs.mixroute.ai/en/model-api/volcengine/dola-seed-sc
Dola Seed SC: ByteDance Seed general-purpose model served through Volcengine. It is not a Seedance video model.
Dola Seed SC is a ByteDance Seed general-purpose model served through Volcengine.
Call `Dola-Seed-SC` through MixRoute using the OpenAI-compatible endpoint shown below.
Dola Seed SC belongs to the ByteDance Seed general-purpose model line. It is not part of the Seedance video-generation family and does not use the video generation endpoint.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Dola-Seed-SC",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="Dola-Seed-SC",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="Dola-Seed-SC",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `Dola-Seed-SC`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Grok 4.3
Source: https://docs.mixroute.ai/en/model-api/xai/grok-4.3
Grok 4.3: general-purpose language model. Request examples and parameters for MixRoute.
Grok 4.3 is a general-purpose language model from xAI.
Call `grok-4.3` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-4.3",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="grok-4.3",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="grok-4.3",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `grok-4.3`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Grok 4.5
Source: https://docs.mixroute.ai/en/model-api/xai/grok-4.5
Grok 4.5: general-purpose language model. Request examples and parameters for MixRoute.
Grok 4.5 is a general-purpose language model from xAI.
Call `grok-4.5` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-4.5",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="grok-4.5",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="grok-4.5",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `grok-4.5`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Grok 4.6
Source: https://docs.mixroute.ai/en/model-api/xai/grok-4.6
Grok 4.6: xAI flagship model for coding, agentic tasks, and knowledge work. Request examples and parameters for MixRoute.
Grok 4.6 is xAI's flagship model for coding, agentic tasks, and knowledge work.
Call `grok-4.6` through MixRoute using the endpoint shown below.
## Key capabilities
* 500K context window - Handles large repositories and long-running tasks
* Multimodal input - Accepts text and image input
* Agentic reasoning - Supports configurable reasoning and function calling
* Structured output - Produces schema-constrained responses
* OpenAI-compatible - MixRoute supports both Chat Completions and Responses
The examples below use Chat Completions. MixRoute also exposes this model through the OpenAI-compatible Responses endpoint.
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-4.6",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="grok-4.6",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="grok-4.6",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `grok-4.6`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Grok Imagine Image 2.0
Source: https://docs.mixroute.ai/en/model-api/xai/grok-imagine-image-2.0
Grok Imagine Image 2.0: xAI image generation and editing model.
Grok Imagine Image 2.0 is available through the native image API described below.
Uses native aspect\_ratio and resolution fields rather than the GPT Image size field. The quality control is available only for Image 2.0.
[Generation parameters](/en/api-reference/endpoint/grok-imagine-image) | [Editing parameters](/en/api-reference/endpoint/grok-imagine-edit)
`POST https://api.mixroute.ai/v1/images/generations`
## Examples
Use your MixRoute key in the `MIXROUTE_API_KEY` environment variable. Requests use `Authorization: Bearer ...`. Replace source-image placeholders with accessible images or local files before editing.
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/images/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "grok-imagine-image-2.0",
"prompt": "A clean product photograph of a red ceramic mug on a white background.",
"n": 1,
"response_format": "url",
"aspect_ratio": "1:1",
"resolution": "1k",
"quality": "low"
}'
```
### Python
```python theme={null}
import json
import os
import requests
payload = json.loads(r'''
{
"model": "grok-imagine-image-2.0",
"prompt": "A clean product photograph of a red ceramic mug on a white background.",
"n": 1,
"response_format": "url",
"aspect_ratio": "1:1",
"resolution": "1k",
"quality": "low"
}
''')
response = requests.post(
"https://api.mixroute.ai/v1/images/generations",
headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
json=payload,
timeout=180,
)
response.raise_for_status()
result = response.json()
for item in result["data"]:
print(item.get("url") or item.get("b64_json"))
```
# MiMo V2.5 Pro
Source: https://docs.mixroute.ai/en/model-api/xiaomi/mimo-v2.5-pro
MiMo V2.5 Pro: 1M-context agentic model for complex coding and long-horizon work.
MiMo V2.5 Pro is Xiaomi's most capable open-weight model for complex software engineering, agentic work, and long-horizon agent tasks.
Call `mimo-v2.5-pro` through MixRoute using the endpoint below.
## Key capabilities
* 1M context window - Maintains coherence across long workflows
* Agentic coding - Designed for software engineering and tool-heavy tasks
* Large MoE architecture - 1.02T total parameters with 42B active
* OpenAI-compatible - Uses Chat Completions through MixRoute
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "mimo-v2.5-pro",
"messages": [
{"role": "user", "content": "Review this repository migration plan and identify the largest operational risk."}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="mimo-v2.5-pro",
messages=[{"role": "user", "content": "Review this repository migration plan and identify the largest operational risk."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
## Parameters
| Parameter | Type | Required | Description |
| ------------ | ------- | -------- | -------------------------------------------- |
| `model` | string | Yes | Model ID. Must be `mimo-v2.5-pro`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
## Vendor reference
* [Xiaomi MiMo V2.5 Pro announcement](https://mimo.xiaomi.com/mimo-v2-5-pro)
# GLM-3 Turbo
Source: https://docs.mixroute.ai/en/model-api/zhipu/glm-3-turbo
GLM-3 Turbo: general-purpose language model. Request examples and parameters for MixRoute.
GLM-3 Turbo is a general-purpose language model from Zhipu.
Call `glm-3-turbo` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-3-turbo",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="glm-3-turbo",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="glm-3-turbo",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `glm-3-turbo`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GLM-4
Source: https://docs.mixroute.ai/en/model-api/zhipu/glm-4
GLM-4: general-purpose language model. Request examples and parameters for MixRoute.
GLM-4 is a general-purpose language model from Zhipu.
Call `glm-4` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-4",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="glm-4",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="glm-4",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `glm-4`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GLM-4 Air
Source: https://docs.mixroute.ai/en/model-api/zhipu/glm-4-air
GLM-4 Air: general-purpose language model. Request examples and parameters for MixRoute.
GLM-4 Air is a general-purpose language model from Zhipu.
Call `glm-4-air` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-4-air",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="glm-4-air",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="glm-4-air",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `glm-4-air`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GLM-4 AirX
Source: https://docs.mixroute.ai/en/model-api/zhipu/glm-4-airx
GLM-4 AirX: general-purpose language model. Request examples and parameters for MixRoute.
GLM-4 AirX is a general-purpose language model from Zhipu.
Call `glm-4-airx` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-4-airx",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="glm-4-airx",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="glm-4-airx",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `glm-4-airx`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GLM-4 Flash
Source: https://docs.mixroute.ai/en/model-api/zhipu/glm-4-flash
GLM-4 Flash: fast, efficient language model. Request examples and parameters for MixRoute.
GLM-4 Flash is a fast, efficient language model from Zhipu.
Call `glm-4-flash` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-4-flash",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="glm-4-flash",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="glm-4-flash",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `glm-4-flash`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GLM-4 Long
Source: https://docs.mixroute.ai/en/model-api/zhipu/glm-4-long
GLM-4 Long: general-purpose language model. Request examples and parameters for MixRoute.
GLM-4 Long is a general-purpose language model from Zhipu.
Call `glm-4-long` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-4-long",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="glm-4-long",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="glm-4-long",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `glm-4-long`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GLM-4 Plus
Source: https://docs.mixroute.ai/en/model-api/zhipu/glm-4-plus
GLM-4 Plus: general-purpose language model. Request examples and parameters for MixRoute.
GLM-4 Plus is a general-purpose language model from Zhipu.
Call `glm-4-plus` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-4-plus",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="glm-4-plus",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="glm-4-plus",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `glm-4-plus`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GLM-4.5
Source: https://docs.mixroute.ai/en/model-api/zhipu/glm-4.5
GLM-4.5: general-purpose language model. Request examples and parameters for MixRoute.
GLM-4.5 is a general-purpose language model from Zhipu.
Call `glm-4.5` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-4.5",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="glm-4.5",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="glm-4.5",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `glm-4.5`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GLM-4.5 Air
Source: https://docs.mixroute.ai/en/model-api/zhipu/glm-4.5-air
GLM-4.5 Air: general-purpose language model. Request examples and parameters for MixRoute.
GLM-4.5 Air is a general-purpose language model from Zhipu.
Call `glm-4.5-air` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-4.5-air",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="glm-4.5-air",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="glm-4.5-air",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `glm-4.5-air`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GLM-4.5 AirX
Source: https://docs.mixroute.ai/en/model-api/zhipu/glm-4.5-airx
GLM-4.5 AirX: general-purpose language model. Request examples and parameters for MixRoute.
GLM-4.5 AirX is a general-purpose language model from Zhipu.
Call `glm-4.5-airx` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-4.5-airx",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="glm-4.5-airx",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="glm-4.5-airx",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `glm-4.5-airx`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GLM-4.5 Flash
Source: https://docs.mixroute.ai/en/model-api/zhipu/glm-4.5-flash
GLM-4.5 Flash: fast, efficient language model. Request examples and parameters for MixRoute.
GLM-4.5 Flash is a fast, efficient language model from Zhipu.
Call `glm-4.5-flash` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-4.5-flash",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="glm-4.5-flash",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="glm-4.5-flash",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `glm-4.5-flash`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GLM-4.5 X
Source: https://docs.mixroute.ai/en/model-api/zhipu/glm-4.5-x
GLM-4.5 X: general-purpose language model. Request examples and parameters for MixRoute.
GLM-4.5 X is a general-purpose language model from Zhipu.
Call `glm-4.5-x` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-4.5-x",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="glm-4.5-x",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="glm-4.5-x",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `glm-4.5-x`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GLM-4.6
Source: https://docs.mixroute.ai/en/model-api/zhipu/glm-4.6
GLM-4.6: general-purpose language model. Request examples and parameters for MixRoute.
GLM-4.6 is a general-purpose language model from Zhipu.
Call `glm-4.6` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-4.6",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="glm-4.6",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="glm-4.6",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `glm-4.6`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GLM-4.7
Source: https://docs.mixroute.ai/en/model-api/zhipu/glm-4.7
GLM-4.7: general-purpose language model. Request examples and parameters for MixRoute.
GLM-4.7 is a general-purpose language model from Zhipu.
Call `glm-4.7` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-4.7",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="glm-4.7",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="glm-4.7",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `glm-4.7`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GLM-4.7 FlashX
Source: https://docs.mixroute.ai/en/model-api/zhipu/glm-4.7-flashx
GLM-4.7 FlashX: fast, efficient language model. Request examples and parameters for MixRoute.
GLM-4.7 FlashX is a fast, efficient language model from Zhipu.
Call `glm-4.7-flashx` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-4.7-flashx",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="glm-4.7-flashx",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="glm-4.7-flashx",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `glm-4.7-flashx`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GLM-4v
Source: https://docs.mixroute.ai/en/model-api/zhipu/glm-4v
GLM-4v: general-purpose language model. Request examples and parameters for MixRoute.
GLM-4v is a general-purpose language model from Zhipu.
Call `glm-4v` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-4v",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="glm-4v",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="glm-4v",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `glm-4v`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GLM-4v Plus
Source: https://docs.mixroute.ai/en/model-api/zhipu/glm-4v-plus
GLM-4v Plus: general-purpose language model. Request examples and parameters for MixRoute.
GLM-4v Plus is a general-purpose language model from Zhipu.
Call `glm-4v-plus` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-4v-plus",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="glm-4v-plus",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="glm-4v-plus",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `glm-4v-plus`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GLM-5
Source: https://docs.mixroute.ai/en/model-api/zhipu/glm-5
GLM-5: general-purpose language model. Request examples and parameters for MixRoute.
GLM-5 is a general-purpose language model from Zhipu.
Call `glm-5` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="glm-5",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="glm-5",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `glm-5`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GLM-5 Turbo
Source: https://docs.mixroute.ai/en/model-api/zhipu/glm-5-turbo
GLM-5 Turbo: general-purpose language model. Request examples and parameters for MixRoute.
GLM-5 Turbo is a general-purpose language model from Zhipu.
Call `glm-5-turbo` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5-turbo",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="glm-5-turbo",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="glm-5-turbo",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `glm-5-turbo`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GLM-5.1
Source: https://docs.mixroute.ai/en/model-api/zhipu/glm-5.1
GLM-5.1: general-purpose language model. Request examples and parameters for MixRoute.
GLM-5.1 is a general-purpose language model from Zhipu.
Call `glm-5.1` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.1",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="glm-5.1",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="glm-5.1",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `glm-5.1`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GLM-5.2
Source: https://docs.mixroute.ai/en/model-api/zhipu/glm-5.2
GLM-5.2: general-purpose language model. Request examples and parameters for MixRoute.
GLM-5.2 is a general-purpose language model from Zhipu.
Call `glm-5.2` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.2",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="glm-5.2",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="glm-5.2",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `glm-5.2`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GLM-5.3
Source: https://docs.mixroute.ai/en/model-api/zhipu/glm-5.3
GLM-5.3: 1M-context flagship reasoning model for coding and long-horizon agent tasks.
GLM-5.3 is Z.ai's flagship reasoning model for complex coding, long-horizon agents, and cybersecurity analysis.
Call `glm-5.3` through MixRoute using the endpoint below.
## Key capabilities
* 1M context window - Handles large repositories and long-running tasks
* Always-on thinking - Supports low, high, and max reasoning effort
* Agentic coding - Optimized for complex software engineering and tool workflows
* OpenAI-compatible - Uses Chat Completions through MixRoute
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.3",
"messages": [
{"role": "user", "content": "Review this deployment plan and identify the highest-risk rollback gap."}
],
"max_tokens": 256,
"reasoning_effort": "high"
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="glm-5.3",
messages=[{"role": "user", "content": "Review this deployment plan and identify the highest-risk rollback gap."}],
max_tokens=256,
reasoning_effort="high",
)
print(response.choices[0].message.content)
```
## Parameters
| Parameter | Type | Required | Description |
| ------------------ | ------- | -------- | ---------------------------------------------------------------------------- |
| `model` | string | Yes | Model ID. Must be `glm-5.3`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. |
| `reasoning_effort` | string | No | Reasoning effort when supported. Supported values: `low`, `high`, and `max`. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
## Vendor reference
* [Z.ai GLM-5.3 announcement](https://z.ai/blog/glm-5.3)
# GLM-5.3 Flash
Source: https://docs.mixroute.ai/en/model-api/zhipu/glm-5.3-flash
GLM-5.3 Flash: efficient native multimodal model for coding, agents, and visual work.
GLM-5.3 Flash is Z.ai's first natively multimodal GLM-5 model, built for efficient coding, agentic work, and visual understanding at lower inference cost.
Call `glm-5.3-flash` through MixRoute using the endpoint below.
## Key capabilities
* Native multimodality - Understands text, images, video, and files
* 1M context window - Supports long-context professional workflows
* Efficient MoE - 320B total parameters with 18B active
* Agentic workflows - Supports coding, tools, and multi-step execution
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.3-flash",
"messages": [
{"role": "user", "content": "Review this deployment plan and identify the highest-risk rollback gap."}
],
"max_tokens": 256,
"reasoning_effort": "high"
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="glm-5.3-flash",
messages=[{"role": "user", "content": "Review this deployment plan and identify the highest-risk rollback gap."}],
max_tokens=256,
reasoning_effort="high",
)
print(response.choices[0].message.content)
```
## Parameters
| Parameter | Type | Required | Description |
| ------------------ | ------- | -------- | ---------------------------------------------------------------------------- |
| `model` | string | Yes | Model ID. Must be `glm-5.3-flash`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. |
| `reasoning_effort` | string | No | Reasoning effort when supported. Supported values: `low`, `high`, and `max`. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
## Vendor reference
* [Z.ai GLM-5.3 Flash announcement](https://z.ai/blog/glm-5.3-flash)
# Privacy Policy
Source: https://docs.mixroute.ai/en/privacy
Effective Date: August 24th, 2026
This policy explains how MixRoute collects, uses, discloses, preserves and protects the personal information and service information it actually holds. MixRoute service is developed and provided by ELITE CLOUD PTE. LTD. Unless otherwise explicitly agreed in writing, MixRoute is an AI API routing and transfer platform and does **not retain** the text content of prompts, completions or other requests/responses sent by customers through the API; MixRoute only processes limited technical metadata for the purposes described in Section 3, including service provision, billing, security, anti-abuse, legal compliance, and measurement of our own marketing.
## 1. Data We Process
* Account and contact data: such as name, company name, job title, email address, phone number, and login and account identification information.
* Transaction and billing data: such as plan details, payment status, invoices, tax information, and top-up or deduction records.
* Technical metadata: such as timestamps, model names, token counts, status codes, latency, source IPs, User-Agent, request IDs, account or organization identifiers, and necessary security event logs.
* Website and console data: such as browser, device, IP address, User-Agent, cookies, login records, page interactions, and basic analytics data.
## 2. Data We Do Not Retain
* In the course of API routing, MixRoute processes request and response content at the memory level in real time and forwards it to the designated model provider; such content is not written to disk, logs, or any persistent storage.
* MixRoute does not write prompts, completions, images, audio, or other Payload content to general application logs, analytics systems, or long-term storage systems.
* MixRoute does not use such content to train any models.
## 3. How We Use Data
* To provide, maintain, and operate the website, console, API, and customer support.
* To verify accounts, manage permissions, calculate usage, generate invoices, process payments, and perform reconciliation.
* To monitor latency, error rates, availability, anomalous requests, and security risks, and to implement anti-fraud, abuse prevention, and platform protection measures.
* To comply with applicable laws, court orders, regulatory requirements, tax obligations, and dispute resolution needs.
* To measure and improve the effectiveness of our own marketing and advertising, including attributing key account milestones (such as registration, activation, and first payment) to the campaign or channel that referred you.
## 4. Data Role Classification
* With respect to account, payment, website, and proprietary operational data, MixRoute generally acts as a data controller or equivalent role.
* With respect to data submitted by customers through the Services, MixRoute may act as a controller, processor, entrusted processor, or other applicable role, depending on the service architecture, contractual arrangements, and applicable law.
* If both parties have executed a Data Processing Addendum (DPA) or Order Form, the role allocation and order of precedence set forth in those documents shall govern.
## 5. Third-Party Recipients and Cross-Border Transfers
* API requests will be forwarded to third-party model providers, cloud infrastructure, payment services, or other third-party vendors in accordance with customer configuration or service logic.
* Since MixRoute does not retain the text content of requests and responses, MixRoute is generally unable to provide subsequent retrieval, disclosure, or deletion of such content; however, upstream providers may process such data in accordance with their own terms, privacy policies, and applicable law.
* As the Services are global in scope and built on a cross-border technical architecture, data may be processed or transferred in regions outside your jurisdiction. MixRoute will implement reasonable and appropriate safeguards as required by applicable law.
* For advertising attribution, MixRoute transmits a limited set of identifiers to advertising and analytics providers, including Meta and Google. The identifiers are limited to a hashed (SHA-256) form of your email address, a hashed form of your internal account identifier, the advertising cookies set on our site, any advertising click identifier contained in the URL through which you arrived, your IP address, and your User-Agent. No prompt, completion, or other Payload content, and no model names, token counts, or usage patterns, are transmitted to these providers. These providers may process the data they receive in accordance with their own terms and privacy policies, and may process it in regions outside your jurisdiction.
## 6. Data Disclosure and Retention
* MixRoute discloses the data it actually holds to vendors, consultants, professional service providers, or regulatory authorities only to the extent necessary for service delivery, payment processing, legal compliance, security incident handling, abuse prevention, auditing, or other legitimate purposes.
* Account, transaction, and contractual data may be retained for the duration of the account and any legally required retention periods.
* Technical metadata is retained only for the period necessary for billing, operational monitoring, security, abuse prevention, and legal compliance.
* Prompt, completion, and other Payload content does not constitute data subject to long-term retention by MixRoute.
## 7. Your Rights
* To the extent provided by applicable law, you or the relevant data subject may request access, review, copies, correction, deletion, restriction of processing, objection to processing, withdrawal of consent, or, where applicable, data portability.
* You may object at any time to the processing of your personal data for advertising attribution and marketing measurement. No reason is required, and we will give effect to such requests for all future processing. To make a request, use the contact details in Section 8.
* MixRoute may refuse or limit certain requests on grounds of identity verification, security, trade secrets, third-party rights, technical feasibility, or as otherwise permitted by law.
* Since MixRoute does not retain request/response text content, requests for access, deletion, or copies relating to such content should, in principle, be directed to the upstream provider that actually retains the data.
## 8. Data Security and Contact Information
* MixRoute implements reasonable technical, administrative, and organizational security measures to protect data against unauthorized access, use, disclosure, alteration, or destruction.
* If you have questions about this policy or the processing of personal data, or wish to exercise your data subject rights, please contact: [legal@mixroute.ai](mailto:legal@mixroute.ai). For the company name, address, and legal/privacy contact, please refer to the information set out on the official website or in the Order Form.
* MixRoute may amend this policy from time to time; material changes will be communicated via the website, console, email, or other reasonable means.
**This policy should be read together with MixRoute's Terms of Service, Order Form, DPA (if applicable), and other applicable service documents. In the event of any conflict, the express provisions of those documents shall take precedence.**
# Quick Start
Source: https://docs.mixroute.ai/en/quickstart
Get started with Mixroute Api in just three simple steps
## Step 1: Create your Account
Access [**MixRoute**](https://api.mixroute.ai) or click \[Get Started] in the top right corner to create your account.
* **Step 1:** Click **"Sign Up"** in the top right corner.
* **Step 2:** Enter your email address, set a password, and complete the verification.
* **Step 3:** Go to **"Wallet Management"** and complete your top-up (Stripe supported).
New users receive a \$1 bonus upon registration
## Step 2: Create API Key
1. Click "Token Management" in the navigation
2. Click "Add Token"
3. Click "Submit" to generate a key
## Step 3: Start Calling
### 3.1 Connection Info
| Config | Value |
| ------------------ | ---------------------------- |
| API URL (Base URL) | `https://api.mixroute.ai/v1` |
| API Key | Your created key |
| Request Format | Fully OpenAI API compatible |
### 3.2 Test Call
Quick test with curl:
```bash theme={null}
curl https://api.mixroute.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "gpt-5.5",
"messages": [{"role": "user", "content": "Hello!"}]
}'
```
### 3.3 Code Examples
```python theme={null}
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.mixroute.ai/v1"
)
response = client.chat.completions.create(
model="gpt-5.5",
messages=[
{"role": "user", "content": "Hello!"}
]
)
print(response.choices[0].message.content)
```
```javascript theme={null}
import OpenAI from 'openai';
const openai = new OpenAI({
apiKey: 'YOUR_API_KEY',
baseURL: 'https://api.mixroute.ai/v1'
});
const response = await openai.chat.completions.create({
model: 'gpt-5.5',
messages: [{ role: 'user', content: 'Hello!' }]
});
console.log(response.choices[0].message.content);
```
```java theme={null}
OpenAiService service = new OpenAiService(
"YOUR_API_KEY",
Duration.ofSeconds(60),
"https://api.mixroute.ai/v1"
);
ChatCompletionRequest request = ChatCompletionRequest.builder()
.model("gpt-5.5")
.messages(List.of(
new ChatMessage(ChatMessageRole.USER, "Hello!")
))
.build();
ChatCompletionResult result = service.createChatCompletion(request);
System.out.println(result.getChoices().get(0).getMessage().getContent());
```
## Next Steps
Congratulations! You've successfully set up MixRoute API. Then you can:
Learn about complete API specifications
Integrate MixRoute API with various tools
Save your API key safely and regularly check usage logs in the console to optimize costs. Happy coding!
# Terms of Service
Source: https://docs.mixroute.ai/en/service-term
Update Date: March 19th, 2026
## Preamble
**Service Terms**
These Terms of Service (hereinafter referred to as "these Terms") constitute a legally binding agreement between you and the operating entity of MixRoute (collectively referred to as "MixRoute," "we," or "us"). The MixRoute Services are developed and provided by ELITE CLOUD PTE. LTD. These Terms govern your application for, access to, and use of the MixRoute platform, API, console, software tools, technical documentation, billing, and related support services (collectively referred to as the "Services"). By creating an account, signing an order form, clicking to agree, accessing the API, generating an API Key, recharging, making a payment, or otherwise using the Services, you acknowledge that you have read, understood, and agree to be bound by these Terms, the Privacy Policy, the Data Processing Addendum (if applicable), the Acceptable Use Policy (if applicable), the Order Form, and other service documents as duly notified. If you are using the Services on behalf of a company, organization, or other legal entity, you represent and warrant that you have sufficient authority to bind that entity to these Terms, and the term "you" shall include such entity.
**Privacy**
This policy describes how MixRoute collects, uses, discloses, retains, and protects the personal data and service data actually held by MixRoute. The MixRoute Services are developed and provided by ELITE CLOUD PTE. LTD. Unless otherwise expressly agreed in writing, MixRoute is an AI API routing and relay platform and does not retain the textual content of prompts, completions, or other requests/responses transmitted by customers through the API; MixRoute only processes the limited technical metadata necessary for providing the Services, billing, security, abuse prevention, and legal compliance.
## 1. Definitions
**1.1 "Account"** means the primary account, sub-accounts, projects, organizations, or other identification mechanisms you create to use the Services.
**1.2 "API Key"** means any key, credential, or authorization identifier issued by MixRoute or permitted to be created by you for the purpose of accessing the Services.
**1.3 "Input Data"** means any prompts, text, code, images, audio, structured data, and other content submitted, transmitted, routed, cached, logged, or otherwise processed by you or your end users through the Services.
**1.4 "Output"** means any output content returned after being routed by MixRoute to and processed by an upstream provider's model.
**1.5 "Upstream Provider"** means any third-party AI model, API, cloud, inference, or related technology provider connected to, routed through, proxied, forwarded, or made accessible by MixRoute.
**1.6 "Upstream Policies"** means the terms of service, acceptable use policies, documentation, restrictions, model cards, deprecation plans, pricing rules, and other binding requirements published by upstream providers from time to time.
**1.7 "Order Form"** means any separately executed quotation, purchase order, plan confirmation, SOW, supplemental agreement, or other commercial document between the parties.
**1.8 "Business Day"** means a day on which banks in Singapore are ordinarily open for business.
**1.9 "Operational Metadata"** means the structured fields defined in Section 7.1(b) that do not contain substantive content.
**1.10 "Payload"** means the substantive content within Input Data and Output, including but not limited to prompt text, completion text, images, audio, and other unstructured content.
**1.11 "Transit Processing"** means the processing method whereby data is forwarded in real time through server memory only, without being written to persistent storage.
## 2. Eligibility, Scope of Users, and Commercial Use
2.1 The Services are provided for enterprises, development teams, agencies, system integrators, and other users with commercial or professional purposes.
2.2 You must have the legal capacity and competence to enter into contracts under the laws of your jurisdiction, and where applicable, complete corporate verification, KYC, AML, payment verification, tax, or other compliance procedures.
2.3 If you are using the Services on behalf of a regulated industry, public institution, or cross-border business, you are responsible for confirming and continuously ensuring that your use of the Services complies with all applicable laws, licenses, regulatory requirements, and internal governance rules.
## 3. Scope of Services and Platform Position
3.1 MixRoute primarily provides AI API routing, key management, access to available models, traffic governance, rate management, billing, and related platform capabilities. Unless otherwise specified in the Order Form, MixRoute does not commit to the permanent availability of any specific model, version, context length, throughput, regional node, or upstream provider.
3.2 MixRoute serves as an API routing and service integration layer and is not the original developer of the models you select. Except as expressly provided in these Terms, MixRoute is not responsible for any upstream provider's model training methods, content decisions, output quality, downtime, degradation, pricing adjustments, deprecation, or policy changes.
3.3 MixRoute may add, replace, restrict, suspend, or remove certain models, regions, features, quotas, or integrations based on commercial, technical, compliance, security, supply stability, or upstream policy considerations. For significant changes that materially and adversely affect you, MixRoute will provide advance notice using commercially reasonable means, except in cases of emergency risk events, legal requirements, or immediate upstream supply discontinuation.
## 4. Account, Verification, and API Key Management
4.1 You shall provide truthful, complete, and up-to-date account information, and are responsible for all administrators, developers, sub-users, agents, end users, and any activities occurring under your account or API Key.
4.2 You shall implement security measures consistent with industry reasonable standards to protect your account and API Key, including but not limited to least privilege access, key rotation, environment isolation, secrets management, traffic monitoring, and anomaly alerting.
4.3 Except for systemic security vulnerabilities attributable to MixRoute, all requests, charges, instructions, configuration changes, and other activities occurring through your account or API Key are deemed authorized by you. If you become aware of or reasonably suspect unauthorized use of your account, you shall immediately notify MixRoute and take necessary remedial action.
4.4 MixRoute may require multi-factor authentication, IP whitelisting, payment verification, identity verification, risk review, credit review, or other security controls as a condition for enabling, upgrading, or continued use of the Services.
## 5. Use Restrictions, Acceptable Use, and Compliance Obligations
5.1 You may not use the Services to:
(a) Violate any applicable laws, regulations, or regulatory requirements
(b) Infringe upon any third party's intellectual property rights, privacy rights, or other legitimate interests
(c) Engage in fraud, phishing, harassment, defamation, or the dissemination of false information
(d) Distribute malware, viruses, trojans, or other harmful code
(e) Send spam or unsolicited mass messages
(f) Access any system, network, or account without authorization
(g) Circumvent billing mechanisms, quota restrictions, or rate controls
(h) Reverse engineer or automatically scrape the API beyond a reasonable scope
(i) Abuse platform resources or consume system capacity in a disproportionate manner
(j) Engage in any other conduct that violates these Terms, Upstream Policies, or applicable law.
5.2 You may not use the Services for the following high-risk purposes unless MixRoute has given prior explicit written consent and both parties have completed the necessary compliance and risk control documentation: medical diagnosis or treatment decisions, legal advice, automated credit review, insurance underwriting, employment decisions, critical infrastructure control, weapons systems, life-safety scenarios, or other purposes that may have a significant impact on individual rights.
5.3 You may not use the Services to collect, input, process, or output any data that is prohibited from processing by law, nor may you process personal data, confidential information, export-controlled content, or third-party intellectual property without obtaining sufficient authorization, consent, or other lawful basis.
5.4 You may not use the Services or its outputs for training, fine-tuning, reverse analysis, public model benchmarking, competitive product replication, model harvesting, dataset construction, or other purposes that would directly compete with MixRoute or upstream providers. For model evaluation or benchmarking, you shall comply with the individual evaluation policies of each upstream provider, and the public disclosure of evaluation results shall comply with upstream policies and industry practices, unless otherwise required by mandatory law.
5.5 You are responsible for ensuring that your final application, disclosures to end users, content moderation, human review, risk warnings, compliance declarations, and internal controls all meet commercially reasonable standards and applicable law. You are also solely responsible for ensuring that your use of the Services complies with applicable laws regarding cybersecurity, data protection, and cross-border data transfers in your jurisdiction.
## 6. Alignment with Upstream Provider Terms
6.1 You understand and agree that certain models or features you access through MixRoute may simultaneously be subject to the terms and policies of one or more upstream providers. You are responsible for reading and complying with such upstream policies.
6.2 If these Terms and the requirements of individual upstream policies apply simultaneously, you shall use the Services in accordance with the stricter or more conservative standard. If MixRoute receives warnings, traffic restrictions, account suspension, claims, fines, or other adverse consequences due to your violation of upstream policies, MixRoute may immediately implement risk control measures and reserves the right to seek indemnification.
6.3 MixRoute does not guarantee that any upstream provider will continue to maintain the same service content, pricing, regional availability, data processing mechanisms, content policies, or model versions. Changes by upstream providers may affect your use of the Services, output results, latency, costs, or compliance status.
## 7. Data Processing, Logging, and Privacy
7.1 Data Classification and Processing Principles. In the course of providing the Services, data processed by MixRoute falls into the following three categories, each subject to different processing rules:
(a) Account and Transaction Data: Registration information, payment records, order documents, etc., retained and processed in accordance with the Privacy Policy
(b) Operational Metadata: Request IDs, timestamps, model names, token counts, latency, HTTP status codes, error codes, source IPs (which may be anonymized based on configuration), User-Agent, and other structured fields that do not contain substantive content, used for billing, performance monitoring, anomaly detection, and billing audits
(c) Input Data and Output: Prompts submitted by you or your end users, returned completions, and other Payload content.
7.2 Zero Retention of Input Data and Output. As an API routing and transit platform, MixRoute processes Input Data and Output as defined in Section 7.1(c) using transit processing mode: data is forwarded in real time through server memory only, is not written to persistent storage, and is not copied, cached, or retained. MixRoute does not use Input Data or Output to train any models.
7.3 Data Processing by Upstream Providers. You understand and agree that Input Data and Output, after transit forwarding by MixRoute, are processed by upstream providers in accordance with their own policies. Upstream providers may retain, review, conduct risk analysis, detect violations, or perform compliance processing, and such actions are not covered by MixRoute's zero-retention commitment and are not entirely within MixRoute's control. MixRoute will provide a list of upstream providers and links to their data processing policies in the console or product documentation.
7.4 Abuse Detection Mechanism. MixRoute's automated abuse detection and risk control mechanisms operate based on rules at the Operational Metadata level and do not conduct substantive content scanning or semantic analysis of Input Data or Output.
7.5 Data Processing Addendum. If both parties execute a Data Processing Addendum (DPA), the DPA shall take precedence with respect to the allocation of roles in personal data processing, cross-border transfer mechanisms, sub-processors, assistance obligations, and security measures. Prior to executing a DPA, you may not assume that MixRoute will provide the Services as a processor in any specific jurisdiction.
## 8. Security, Risk Response, and Suspension Measures
8.1 MixRoute may monitor, throttle, block, conduct manual review, suspend, adjust quotas, or implement other reasonable controls on your account, projects, IPs, keys, regions, models, or requests based on service stability, security, metering, platform protection, anti-fraud, abuse prevention, legal compliance, payment risk, sanctions risk, or upstream provider requirements.
8.2 MixRoute's platform protection mechanisms operate based on automated rules at the Operational Metadata level (such as request frequency, token usage, regional and rate anomalies), and do not conduct substantive content scanning of Input Data or Output, supplemented by manual support procedures to handle flagged anomalous events.
8.3 If MixRoute reasonably determines that your use has caused or may cause a significant security incident, service disruption, legal risk, payment risk, infringement of third-party rights, or the risk of suspension by an upstream provider, MixRoute may immediately restrict or suspend the relevant Services and provide subsequent notice where practicable.
## 9. Output, Accuracy, and Customer Responsibility
9.1 AI models and their outputs are probabilistic in nature and may contain errors, inaccuracies, incompleteness, bias, offensive content, outdated information, repetition, or results similar to third-party content. MixRoute makes no warranty regarding the accuracy, usability, legality, enforceability, non-infringement, or fitness for any particular purpose of any generated content.
9.2 You may not use any generated content as the sole basis for significant commercial, legal, medical, financial, compliance, or other high-risk decisions without first conducting reasonable verification, human review, and necessary risk controls.
9.3 Unless otherwise required by applicable law, you are solely responsible for obtaining all necessary rights to your Input Data and for bearing full responsibility for the use, disclosure, delivery, distribution, commercialization, reuse, and related consequences of any Output.
9.4 You shall ensure that your end users, final customers, users under your control, or third parties authorized by you to access the Services comply with these Terms and applicable upstream policies; their violations shall be deemed your violations.
## 10. Service Levels, Maintenance, and Beta Features
10.1 Unless otherwise expressly agreed in an Order Form, the Services are provided on an "as-is" and "as-available" basis, and MixRoute makes no guarantee of any specific availability rate, recovery time, support response time, or capacity reservation.
10.2 MixRoute may conduct planned maintenance, version updates, node switching, architecture adjustments, or emergency patches. MixRoute will provide commercially reasonable notice for anticipated significant maintenance but has no obligation to provide advance notice for emergency events.
10.3 Features labeled as test, trial, preview, Beta, Experimental, or similar designations may carry higher risk, lower stability, and greater variability. MixRoute may modify, restrict, or discontinue such features at any time, and shall not bear any warranty or indemnification liability as a result, except as otherwise required by mandatory law.
## 11. Fees, Metering, Taxes, and Payment
11.1 You shall pay all fees in accordance with platform announcements, the console, the Order Form, or other commercially agreed terms confirmed between the parties. Unless otherwise agreed, fees may be charged based on request count, tokens, images, audio, model type, region, quota, monthly subscription, minimum commitment, or other units of measurement.
11.2 Unless expressly agreed in writing, MixRoute makes no fixed commitment regarding upstream provider costs, exchange rates, taxes, payment processing fees, refund policies, or model pricing adjustments. In the event of significant changes in upstream pricing, tax burdens, or operating costs, MixRoute may adjust its charges with reasonable notice; the adjusted pricing shall take effect in accordance with the notice, console announcement, or the effective date stipulated in the Order Form.
11.3 All fees are exclusive of any business tax, value-added tax, withholding tax, GST, VAT, sales tax, stamp duty, or similar taxes; such taxes shall be borne by you unless prohibited by law. If withholding or deduction is required by law, you shall ensure that MixRoute receives no less than the originally agreed amount.
11.4 If you use a prepaid, stored value, or automatic deduction mechanism, you shall ensure that your payment method is valid and your balance is sufficient. MixRoute may suspend all or part of the Services upon payment failure, elevated risk, insufficient credit, or overdue outstanding balances.
11.5 If you dispute any charges, you must submit a specific written objection with reasonable supporting documentation within thirty (30) days of the relevant billing or deduction date. Failure to object within the deadline shall be deemed acceptance of the billing result, except in cases of obvious system errors, duplicate charges, or as otherwise required by mandatory law.
11.6 Except as required by mandatory law, as otherwise agreed in an Order Form, or in confirmed cases of significant service deficiencies attributable to MixRoute, fees already incurred are generally non-refundable.
11.7 Unless otherwise expressly agreed in an Order Form or written notice, any trial credits, gifted credits, service credits, promotional subsidies, or similar benefits may not be redeemed for cash, transferred, discounted, or refunded, and shall automatically expire upon expiration, termination, or revocation.
## 12. Intellectual Property and Licenses
12.1 Subject to your compliance with these Terms and payment of all applicable fees, MixRoute grants you a limited, non-exclusive, non-transferable, revocable, and non-sublicensable right to access and use the Services within the scope permitted by these Terms and the Order Form.
12.2 MixRoute, its affiliates, and licensors retain all rights to the Services, platform, interfaces, documentation, trademarks, code, SDKs, dashboards, designs, reports, billing data presentations, and other related intellectual property.
12.3 You may not reverse engineer, decompile, circumvent technical restrictions, scan undisclosed endpoints, copy documentation without authorization, remove rights notices, create mirror services, or take any action that would allow you to derive the underlying system design, except as expressly permitted by law.
12.4 Except as otherwise constrained by upstream policies, applicable law, or third-party rights, MixRoute does not claim ownership of the Input Data you submit; however, you must ensure that you have the right to submit such data. The ownership of rights in Output shall also be governed by the terms of upstream providers and applicable law.
12.5 Unless otherwise agreed in an Order Form or with MixRoute's written consent, you may not provide the Services to third parties through resale, distribution, white-labeling, sublicensing, service hosting, or other means.
## 13. Confidentiality Obligations
13.1 Each party shall keep confidential any unpublicized commercial, technical, pricing, system, security, product roadmap, customer information, or other information that may reasonably be considered confidential and that becomes known to the party in the course of performing these Terms, and shall not disclose such information to any third party without the prior written consent of the disclosing party.
13.2 The foregoing obligation does not apply to information that: has become public through no breach by the receiving party; the receiving party can demonstrate was lawfully in its possession prior to receipt; was lawfully provided by a third party without confidentiality restrictions; or is required to be disclosed by law, court order, or competent authority.
13.3 Except as necessary to perform these Terms, the receiving party shall not use the other party's confidential information for any competitive, data collection, external benchmarking, public disclosure, or other unauthorized purpose.
## 14. Disclaimer of Representations and Warranties
14.1 To the maximum extent permitted by applicable law, the Services are provided "AS IS" and "AS AVAILABLE." MixRoute makes no express, implied, or statutory warranties regarding the Services, upstream providers, model outputs, integration availability, risk of interruption, security, accuracy, merchantability, fitness for a particular purpose, non-infringement, or compliance outcomes.
14.2 MixRoute does not warrant that the Services will meet your product design requirements, compliance obligations, customer commitments, information security standards, data localization requirements, internal audit standards, or external contractual obligations. You are solely responsible for conducting your own evaluation, testing, and governance.
## 15. Limitation of Liability
15.1 To the maximum extent permitted by applicable law, MixRoute shall not be liable for any loss of profits, loss of revenue, loss of goodwill, loss of data, indirect, incidental, special, punitive, or consequential damages arising out of or in connection with these Terms or the Services, even if advised of the possibility of such damages. The foregoing non-liability also includes request failures, delays, or interruptions caused by global network congestion, carrier failures, cross-border line fluctuations, or network access restrictions or filtering mechanisms in any jurisdiction. Since the Services operate in transit processing mode and do not persistently store Input Data or Output (see Section 7.2), MixRoute is unable to provide retrieval, recovery, or query services for historical requests or response content; this does not constitute a service defect or breach.
15.2 To the maximum extent permitted by applicable law, MixRoute's total cumulative liability to you arising out of or in connection with these Terms or the Services shall be capped at the greater of the total fees actually paid by you to MixRoute during the three (3) months preceding the claim, or one thousand US dollars (USD 1,000), provided that such liability shall not exceed thirty thousand US dollars (USD 30,000) in any event.
15.3 The foregoing limitations do not apply to: (a) direct damages caused by MixRoute's willful misconduct or gross negligence; (b) MixRoute's material breach of its confidentiality obligations; or (c) liability that cannot be excluded or limited by law.
## 16. Indemnification
16.1 You shall indemnify, defend, and hold harmless MixRoute, its affiliates, directors, employees, agents, partners, and upstream providers from and against any third-party claims, investigations, penalties, losses, liabilities, costs, and reasonable attorneys' fees arising from:
(a) Your or your end users' violation of these Terms, Upstream Policies, or applicable law
(b) Your Input Data, use of Output, or application scenario infringing upon third-party rights
(c) Your mismanagement of your account, API Keys, or integration environment
(d) Commitments you made to end users that exceed what is permitted under these Terms or Upstream Policies.
16.2 If a third party directly claims that MixRoute's own platform technology, standing alone and without combination with your data, application, or third-party materials, infringes upon its intellectual property rights, MixRoute may, at its election:
(a) Modify the Services to make them non-infringing
(b) Obtain the right to continue use
or (c) Terminate the affected portion of the Services and provide a pro-rated refund of prepaid but unused fees for the remaining period.
## 17. Term, Suspension, and Termination
17.1 These Terms take effect on the date you first accept them and remain in effect throughout the period you use the Services, until terminated in accordance with these Terms.
17.2 You may stop using the Services at any time and close your account through the platform process; however, fees already incurred prior to termination, outstanding payments, confidentiality obligations, indemnification liabilities, and other provisions that by their nature should survive termination shall not be extinguished thereby.
17.3 MixRoute may suspend or terminate all or part of the Services in the following circumstances:
(a) You violate these Terms, Upstream Policies, payment obligations, or applicable law
(b) Your use creates risk for the platform, other customers, or upstream providers
(c) An upstream provider requires restriction, disabling, or removal of relevant access
(d) As required by law, sanctions, court order, or competent authority
(e) MixRoute ceases to provide all or part of the Services.
17.4 Except in emergency risk events, MixRoute will provide advance notice within commercially reasonable practicable limits. If the Services are permanently terminated for reasons other than your breach, or as required by law or sanctions, MixRoute may provide reasonable handling of prepaid unused fees in accordance with its policies or the Order Form.
17.5 After account termination, MixRoute may delete or anonymize relevant data in accordance with its data retention policy; you are responsible for backing up necessary data prior to termination or within the notified export period.
## 18. Export Controls, Sanctions, and Prohibited Regions
18.1 You may not use the Services in, for, or on behalf of any country, region, individual, entity, or purpose prohibited by applicable export controls, economic sanctions, embargoes, anti-money laundering, or counter-terrorism financing regulations, nor may you provide or make the Services available to any such party.
18.2 You represent and warrant that you, your beneficial owners, controllers, affiliates, payment sources, and end-use purposes are not subject to applicable sanctions restrictions and that you will not use the Services for any restricted activities.
18.3 MixRoute may conduct ongoing screening for the foregoing risks and may request supplementary documentation, restrict the Services, or terminate the relationship without being liable for any resulting service interruptions.
## 19. Amendments to Terms
19.1 MixRoute may amend these Terms from time to time. For amendments that would materially and adversely affect you, MixRoute will provide at least thirty (30) days' advance notice by email, console announcement, billing notification, or other reasonable means; however, amendments necessitated by immediate legal requirements, security risks, emergency upstream supply discontinuation, abuse events, or other urgent circumstances are exempt from this requirement.
19.2 If you do not agree to a material amendment, you should stop using the Services and terminate your account through the proper process before the amendment takes effect. Continued use of the Services after the effective date shall constitute acceptance of the amended Terms.
## 20. Governing Law and Dispute Resolution
20.1 Unless otherwise agreed in an Order Form, these Terms and their formation, validity, interpretation, and performance shall be governed by the laws of the Republic of Singapore, excluding its conflict of laws rules.
20.2 Any and all disputes arising out of or in connection with these Terms or the Services shall first be addressed by the parties through good-faith negotiation. If negotiation fails, the dispute shall be submitted to the Singapore International Arbitration Centre (SIAC) for final and binding arbitration in accordance with its then-current arbitration rules. The seat of arbitration shall be Singapore, the language of arbitration shall be English, and the number of arbitrators shall be one.
20.3 Notwithstanding the foregoing, either party may apply to a court of competent jurisdiction in Singapore for interim injunctions, conservatory measures, or other equitable relief to protect its confidential information, intellectual property rights, payment claims, or to prevent irreparable harm.
## 21. General Provisions
21.1 These Terms, the Order Form, the Privacy Policy, the DPA (if applicable), and other documents expressly incorporated herein constitute the entire agreement between the parties with respect to the Services and supersede all prior oral or written discussions. In the event of any conflict between the documents, unless otherwise specified, the order of precedence shall be: Order Form, DPA, these Terms, Privacy Policy, product documentation.
21.2 Neither party shall be deemed in breach of its obligations under these Terms to the extent that such failure is caused by a Force Majeure Event, meaning any natural disaster, war, terrorist attack, epidemic, government action, change of law, sanctions, disruption to telecommunications infrastructure, large-scale cyberattack, total cloud provider outage, or other event beyond that party's reasonable control. The affected party shall notify the other party as soon as practicable after becoming aware of the Force Majeure Event, describing the nature of the event, its anticipated scope, and duration, and shall take commercially reasonable steps to mitigate its impact. If a Force Majeure Event continues for more than ninety (90) days, either party may terminate the affected portion of the Services by written notice without incurring any liability for damages; any prepaid but unused fees shall be refunded on a pro-rated basis.
21.3 You may not assign these Terms or any rights or obligations thereunder without MixRoute's prior written consent. MixRoute may assign these Terms in connection with a corporate restructuring, merger, asset transfer, group reorganization, or business succession, but shall notify you in a reasonable manner.
21.4 The failure of either party to exercise or its delay in exercising any right under these Terms shall not constitute a waiver of that right. If any part of these Terms is found to be invalid or unenforceable, the remaining provisions shall continue in full force and effect.
21.5 Unless otherwise expressly provided, these Terms do not create any relationship of agency, partnership, joint venture, employment, or trust between the parties.
21.6 Notices shall be delivered by email, console message, written document, business contact, or the method specified in the Order Form; you shall maintain accurate contact information. You agree to receive notices, Terms updates, billing information, and other service-related documents electronically, and electronic consent, online checkbox acceptance, electronic signature, or the act of enabling, accessing, or using the Services with an API Key shall carry the same legal effect as a written signature.
## 22. Contact Information
If you have any questions regarding these Terms, the Privacy Policy, data processing, billing, or compliance matters, please contact us at:
Official Website: [https://mixroute.ai/](https://www.mixroute.ai/)
Email: [service@mixroute.ai](mailto:service@mixroute.ai)
Legal / Privacy Contact: [legal@mixroute.ai](mailto:legal@mixroute.ai)
# Popular Models
Source: https://docs.mixroute.ai/en/api-reference/models
This page provides detailed model information, pricing, and usage instructions.
## π₯ Current Recommended Models
Below are the currently stable and popular models. For the complete model list and real-time pricing, please visit [MixRoute Model Marketplace](https://console.mixroute.ai/models).
When calling the API, please ensure the model name matches the naming convention in the [MixRoute Model Marketplace](https://console.mixroute.ai/models); otherwise, the request will fail.
Context values use the model providers' published specifications. MixRoute endpoint support, route aliases, availability, and pricing are governed by the Model Marketplace and each model's detail page.
## Model Categories
### π€ OpenAI Series
#### GPT Series
| Model Name | Model ID | Context | Features | Recommended For |
| --------------- | --------------- | ------- | --------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| GPT 6 Astra β | gpt-6-astra | 1.05M | OpenAI's highest-capability model for complex, end-to-end work; accepts text and images, with up to 128K output | Complex reasoning, coding agents, research and document creation |
| GPT 5.6 Sol β | gpt-5.6-sol | 1.05M | Frontier model for complex professional work, with deep reasoning and up to 128K output | Complex reasoning, coding, long-running agents |
| GPT 5.6 Terra | gpt-5.6-terra | 1.05M | Balances intelligence and cost across professional workloads, with up to 128K output | General coding, analysis, content |
| GPT 5.6 Luna | gpt-5.6-luna | 1.05M | Cost-sensitive, high-volume member of the GPT 5.6 family, with up to 128K output | High throughput, routing, batch workloads |
| GPT Chat Latest | gpt-chat-latest | 400K | MixRoute alias for OpenAI's rolling Chat Latest model; the underlying snapshot can change | Chat assistants, prototyping, compatibility |
| GPT 5.5 | gpt-5.5 | 1.05M | Frontier model for coding and professional work; accepts text and image input and supports up to 128K output | Coding, reasoning, professional workflows |
| GPT 5.4 Pro | gpt-5.4-pro | 1.05M | Uses more reasoning compute for precise answers; Responses API only, and complex requests can take longer | High-accuracy analysis and difficult tasks |
| GPT 5.4 | gpt-5.4 | 1.05M | General model for coding and professional work, with Chat Completions and Responses support | Coding, analysis, business content |
#### Image Generation Models
| Model Name | Model ID | Features |
| ------------- | ------------- | ------------------------------------------------------------------ |
| GPT-Image-2 β | gpt-image-2 | OpenAI's current state-of-the-art image generation model |
| GPT-Image-1.5 | gpt-image-1.5 | Previous-generation image model retained for existing integrations |
| GPT-Image-1 | gpt-image-1 | Earlier image generation model retained for compatibility |
#### Audio, Transcription & Video Models
| Model Name | Model ID | Features | Recommended For |
| ------------------------- | ------------------------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| GPT-Realtime-2 β | gpt-realtime-2 | Realtime speech-to-speech reasoning model with tool use, 128K context, and 32K max output | Voice agents, realtime assistants, tool workflows |
| GPT Audio 1.5 | gpt-audio-1.5 | Audio input and output through Chat Completions | Voice assistants, spoken interaction |
| GPT Audio | gpt-audio | Previous audio input/output model for Chat Completions | Existing audio chat integrations |
| GPT-4o Transcribe Diarize | gpt-4o-transcribe-diarize | Speech-to-text that identifies who spoke and when | Meetings, interviews, call analysis |
| GPT-4o Mini Transcribe | gpt-4o-mini-transcribe | Lower-cost GPT-4o mini speech-to-text model | Subtitles, batch transcription |
| Sora 2 β | sora-2 | Flagship video generation model for text-to-video and image-to-video with synchronized audio | Video creation, creative production |
### π Claude Series (Anthropic)
#### Latest Claude Models
| Model Name | Model ID | Context | Features | Recommended For |
| ------------------ | ---------------- | ------- | --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| Claude Opus 5 β | claude-opus-5 | 1M | Deep-reasoning model for complex agentic coding and enterprise work; 128K max output and thinking on by default | Long-horizon agents, difficult coding, enterprise work |
| Claude Fable 5.1 β | claude-fable-5-1 | 1M | Anthropic's most capable generally available model, with 128K output and always-on adaptive thinking | Demanding reasoning, long-running agents, multistep research |
| Claude Fable 5 | claude-fable-5 | 1M | Anthropic's deep-reasoning model for creative narrative and knowledge work, with extended thinking support | Creative writing, content creation, research analysis |
| Claude Sonnet 5 β | claude-sonnet-5 | 1M | Anthropic's best speed-intelligence balance; 128K max output and adaptive thinking on by default | Coding, agents, everyday knowledge work |
| Claude Haiku 4.5 | claude-haiku-4-5 | 200K | Fastest current Claude model, with 64K max output and optional extended thinking | Low-latency chat, routing, extraction |
### π Google Gemini Series
| Model Name | Model ID | Context | Features | Recommended For |
| ------------------------ | ---------------------- | ------- | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| Gemini 3.8 Flash β | gemini-3.8-flash | 1M | Google's most intelligent Flash model, with 1M input, 64K output, tunable thinking, tools, and structured output | Long-horizon coding, autonomous agents, enterprise workflows |
| Gemini Omni 1.1 Flash | gemini-omni-1.1-flash | 1M | Conversational video generation and editing from text, images, or video, with 3-10s output up to 4K | Video creation, editing, extension |
| Gemini 3.7 Flash | gemini-3.7-flash | 1M | Stable natively multimodal reasoning model with thinking, tools, and structured output | Coding loops, multimodal analysis, agents |
| Gemini 3.6 Flash | gemini-3.6-flash | 1M | Production-ready model for agentic coding and multimodal or spatial reasoning, with 64K max output | Coding loops, multimodal analysis, agents |
| Gemini 3.5 Flash-Lite | gemini-3.5-flash-lite | 1M | Low-latency, low-cost model for high-throughput subagents, document parsing, and extraction | Routing, extraction, high-volume tasks |
| Gemini 3.1 Pro Preview | gemini-3.1-pro-preview | 1M | Preview model tuned for software engineering, precise tool use, and reliable multi-step execution | Complex reasoning, coding, tool workflows |
| Gemini 3.1 Flash Image β | gemini-3.1-flash-image | 128K | Stable high-throughput image generation and editing model with strong text rendering and Search grounding | Image generation, editing, visual content |
### π xAI Grok Series
| Model Name | Model ID | Context | Features | Recommended For |
| --------------------------------- | -------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| Grok 4.6 β | grok-4.6 | 500K | xAI flagship for coding, agentic tasks, and knowledge work; supports text or image input, configurable reasoning, function calling, and structured output | Coding, agents, complex knowledge work |
| Grok 4.5 | grok-4.5 | 500K | Frontier model for coding, agentic tasks, and knowledge work; supports reasoning, tools, and text or image input | Coding, agents, complex knowledge work |
| Grok 4.20 Reasoning | grok-4.20-0309-reasoning | 1M | High-speed reasoning model with agentic tool calling and structured outputs; real-time data requires search tools | Reasoning, research agents, tool workflows |
| Grok 4.20 Multi-Agent | grok-4.20-multi-agent-0309 | 1M | Multiple parallel agents collaborate on deep research; use the Responses API | Deep research, multi-agent analysis, complex investigation |
| Grok 4.3 | grok-4.3 | 1M | Fast general model with strong instruction following, tool calling, structured outputs, and configurable reasoning | Chat, agents, high-volume tool use |
| Grok Build 0.1 (compatibility ID) | grok-code-fast-1 | 256K | xAI routes this compatibility ID to Grok Build 0.1 for agentic software engineering workflows | Coding agents, repository tasks, web development |
| Grok Imagine Image 2.0 β | grok-imagine-image-2.0 | β | xAI image generation and editing model with 1K/2K output and quality controls | Image generation, editing, creative production |
| Grok Imagine Image | grok-imagine-image | β | Previous xAI image generation route retained for compatibility | Existing image integrations |
### π DeepSeek Series
| Model Name | Model ID | Context | Features | Recommended For |
| ---------------------------- | ---------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
| DeepSeek V4 Pro β | deepseek-v4-pro | 1M | Higher-capability V4 model for reasoning and agentic coding; thinking and non-thinking modes, up to 384K output | Difficult reasoning, coding agents, long tasks |
| DeepSeek V4 Flash | deepseek-v4-flash | 1M | Faster and more economical V4 model with both thinking modes and up to 384K output | High-throughput reasoning, chat, simpler agents |
| DeepSeek V4 Flash Vision Exp | deepseek-v4-flash-vision-exp | 1M | Experimental vision-capable V4 Flash model for text-and-image reasoning, tools, and Responses workflows | Image analysis, multimodal agents, visual coding |
| DeepSeek V3.2 | deepseek-v3.2 | 164K | Previous-generation model focused on efficient reasoning and reasoning-with-tools workflows | General reasoning, tool use, compatibility |
| DeepSeek V3.1 | deepseek-v3.1 | 128K | Hybrid model with thinking and non-thinking modes plus stronger tool and agent behavior than earlier V3 releases | Chat, reasoning, coding, agents |
### π Chinese Model Series
#### Zhipu AI (GLM)
| Model Name | Model ID | Context | Features | Recommended For |
| --------------- | -------------- | ------- | ----------------------------------------------------------------------------------------------------------- | -------------------------------------------------- |
| GLM-5.3 Flash β | glm-5.3-flash | 1M | Efficient native multimodal model for coding, visual understanding, and long-horizon agents | Multimodal coding, document analysis, fast agents |
| GLM-5.3 β | glm-5.3 | 1M | Flagship always-thinking model for complex coding, long-horizon agents, and security analysis | Difficult coding, autonomous agents, security work |
| GLM-5.2 | glm-5.2 | 1M | Previous flagship for project-scale engineering and long-horizon tasks, with 128K max output | Existing coding agents and long tasks |
| GLM-5.1 | glm-5.1 | 200K | Flagship foundation model for long-running autonomous coding and engineering delivery, with 128K max output | Agentic coding, system optimization, office work |
| GLM-5 Turbo | glm-5-turbo | 200K | Tuned for OpenClaw-style agents, tool calling, instruction following, and persistent multi-step execution | Tool agents, scheduled tasks, automation |
| GLM-5 | glm-5 | 200K | Foundation model for agentic engineering, complex systems, and long-horizon execution | Coding, agents, structured knowledge work |
| GLM-4.7 FlashX | glm-4.7-flashx | 200K | Lightweight, high-speed GLM-4.7 variant with 128K max output and agentic coding support | Fast coding, writing, translation, chat |
#### Alibaba Qwen
| Model Name | Model ID | Context | Features | Recommended For |
| ------------------ | ------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------- |
| Qwen Image 2.0 Pro | qwen-image-2.0-pro | β | Image generation and editing up to 2K, with improved realism, details, and text rendering | Text-to-image, image editing, product visuals |
| Qwen 3.8 Max β | qwen3.8-max | 1M | 2.4T-parameter MoE flagship for coding and professional work; supports visual understanding, function calling, and structured output | Reasoning, coding, agents, long-context work |
#### Moonshot Kimi Series
| Model Name | Model ID | Context | Features | Recommended For |
| -------------- | -------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------- |
| Kimi K3 β | kimi-k3 | 1M | Moonshot's most capable open-weight native multimodal agentic model, designed for long-horizon coding, knowledge work, and reasoning | Large repositories, research, multimodal agents |
| Kimi K2.7 Code | kimi-k2.7-code | 256K | Coding-focused agentic model with image and video input, always-on thinking, and preserved reasoning across turns | Software engineering, coding agents, tool use |
| Kimi K2.6 | kimi-k2.6 | 256K | Native multimodal agentic model for long-horizon coding, proactive execution, and multi-agent orchestration | Coding, visual agents, autonomous workflows |
| Kimi K2.5 | kimi-k2.5 | 256K | Native multimodal model with text, image, and video understanding plus thinking and instant modes | Multimodal chat, reasoning, coding |
#### MiniMax Series
| Model Name | Model ID | Context | Features | Recommended For |
| ------------ | ------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
| MiniMax H3 β | MiniMax-H3 | β | General-purpose multimodal video model with text, image, and multimodal reference workflows, native stereo audio, 768P or 2K output, and 4-15s duration | Video creation, multimodal editing, branded content |
| MiniMax M3 β | MiniMax-M3 | 1M | MiniMax's latest flagship for complex reasoning, coding, and long-context processing, with tool use | Complex reasoning, coding, long text |
| MiniMax M2.7 | MiniMax-M2.7 | 256K | High-performance general model with balanced capabilities in reasoning, coding, and multi-turn chat | General reasoning, coding, chat |
| MiniMax M2.5 | MiniMax-M2.5 | 256K | Lightweight general-purpose model balancing performance and cost | Chat, content generation, batch tasks |
| MiniMax M2 | MiniMax-M2 | 128K | Previous-generation general model retained for compatibility with existing integrations | Compatibility, simple tasks |
#### Xiaomi MiMo Series
| Model Name | Model ID | Context | Features | Recommended For |
| --------------- | ------------- | ------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
| MiMo V2.5 Pro β | mimo-v2.5-pro | 1M | Xiaomi's most capable open-weight agentic model, with 1.02T total and 42B active parameters | Complex coding, long-horizon agents, tool-heavy work |
#### Tencent
| Model Name | Model ID | Context | Features | Recommended For |
| ------------- | ----------- | ------- | ------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- |
| Hy4 Preview β | hy4-preview | 1M | Flagship productivity model with reasoning, structured output, function calling, and caching; 960K max input and 64K max output | Complex agents, coding, office and analytical work |
| Hy3 | hy3 | 256K | Production model for coding agents, long documents, search Q\&A, and complex task execution; 192K max input and 128K max output | Coding, document analysis, multi-step agents |
| Hy-MT2-Pro | hy-mt2-pro | 8K | Flagship translation model for professional domains and quality-sensitive work | Professional and domain translation |
| Hy-MT2-Plus | hy-mt2-plus | 8K | Translation model with strong instruction following | Controlled translation, terminology-sensitive work |
| Hy-MT2-Lite | hy-mt2-lite | 8K | Lightweight translation model optimized for latency | Fast and high-volume translation |
#### Seedance Video Series
| Model Name | Model ID | Features |
| :-------------------- | :-------------------------------- | :--------------------------------------------------------------------------------------------------------------------- |
| Seedance 2.5 β | doubao-seedance-2-5-260628 | MixRoute's latest Seedance video route, with text-to-video, image-to-video, and 480p, 720p, or 1080p output |
| Seedance 2.0 | dreamina-seedance-2-0-260128 | Multimodal video generation from text, image, video, and audio references, with synchronized audio and up to 4K output |
| Seedance 2.0 Fast | dreamina-seedance-2-0-fast-260128 | Faster Seedance 2.0 route with multimodal references, synchronized audio, and 480p or 720p output |
| Seedance 2.0 Mini | dreamina-seedance-2-0-mini-260615 | Lightweight Seedance 2.0 route with multimodal references, synchronized audio, and 480p or 720p output |
| Seedance 1.5 Pro | seedance-1-5-pro-251215 | Text-to-video and image-to-video with first and last frames, synchronized audio, and draft mode |
| Seedance 1.0 Pro | seedance-1-0-pro-250528 | Text-to-video and image-to-video with first-frame or first-and-last-frame control |
| Seedance 1.0 Pro Fast | seedance-1-0-pro-fast-251015 | Faster text-to-video and first-frame image-to-video route |
## π οΈ Usage Recommendations
### Model Selection Guide
**Highest capability**: GPT 6 Astra, GPT 5.6 Sol, Claude Fable 5.1, Claude Opus 5, GLM-5.3, Hy4 Preview, Kimi K3, MiMo V2.5 Pro
**Balanced choices**: GPT 5.6 Terra, Claude Sonnet 5, Gemini 3.8 Flash, GLM-5.3 Flash, Hy3, Grok 4.6
**Open-model alternatives**: DeepSeek V4 Pro, GLM-5.3, Qwen 3.8 Max, MiMo V2.5 Pro
**Recommended**: GPT 5.6 Terra, Claude Sonnet 5, Qwen 3.8 Max
**For difficult research or long material**: GPT 6 Astra, GPT 5.6 Sol, Claude Fable 5.1, Claude Opus 5, GLM-5.3, Grok 4.20 Multi-Agent, Gemini 3.1 Pro Preview
**Recommended**: GPT 5.6 Luna, GPT-5.4 Nano, Claude Haiku 4.5, Gemini 3.5 Flash-Lite
**Alternatives**: GLM-5.3 Flash, Gemini 3.6 Flash, DeepSeek V4 Flash
**Image**: GPT-Image-2, Grok Imagine Image 2.0, Gemini 3.1 Flash Image, DeepSeek V4 Flash Vision Exp
**Audio**: GPT-Realtime-2, GPT Audio 1.5, GPT-4o Transcribe Diarize
**Video**: Sora 2, Gemini Omni 1.1 Flash, Seedance 2.5, MiniMax H3
### Long Context Processing
* **1M class**: GPT 6 Astra, GPT 5.6 family, and GPT 5.5 (1.05M); Claude Fable 5.1, Opus 5, and Sonnet 5, Gemini 3.8 Flash, DeepSeek V4, GLM-5.3, Qwen 3.8 Max, Hy4 Preview, Kimi K3, MiMo V2.5 Pro, and Grok 4.20/4.3 (1M)
* **Coding and agent tasks**: GPT 6 Astra, GPT 5.6 Sol, Claude Fable 5.1, Claude Opus 5, GLM-5.3, Hy4 Preview, Kimi K3, MiMo V2.5 Pro, Grok 4.6, and DeepSeek V4 Pro
* **Capacity planning**: Leave room for model output, reasoning tokens, and tool results instead of filling the entire advertised context window
### Cost Optimization Suggestions
1. **Tiered Usage**: Use cheaper models for simple tasks, advanced models for complex tasks
2. **Testing and Optimization**: Test with small models first, scale to larger models once requirements are clear
3. **Batch Processing**: Use Mini versions for a large number of similar tasks
4. **Cache Reuse**: Cache results for repetitive queries
## π Related Resources
Detailed API reference
Integration guide
Model list is continuously updated. We add newly released excellent models promptly. Contact support for specific models or bulk needs.
# OpenAI SDK Usage
Source: https://docs.mixroute.ai/en/api-reference/openai-sdk
Using official OpenAI SDK with MixRoute API
# OpenAI SDK Usage
MixRoute is fully compatible with the official OpenAI SDK. Simply change the base URL to use MixRoute with your existing OpenAI SDK code.
## Installation
```bash Python theme={null}
pip install openai
```
```bash Node.js theme={null}
npm install openai
```
```bash Go theme={null}
go get github.com/openai/openai-go
```
## Configuration
### Python
```python theme={null}
from openai import OpenAI
client = OpenAI(
api_key="sk-xxxxxxxxxx",
base_url="https://api.mixroute.ai/v1"
)
```
### Node.js / TypeScript
```typescript theme={null}
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: 'sk-xxxxxxxxxx',
baseURL: 'https://api.mixroute.ai/v1'
});
```
### Go
```go theme={null}
package main
import (
"github.com/openai/openai-go"
"github.com/openai/openai-go/option"
)
func main() {
client := openai.NewClient(
option.WithAPIKey("sk-xxxxxxxxxx"),
option.WithBaseURL("https://api.mixroute.ai/v1"),
)
}
```
## Chat Completions
### Basic Usage
```python theme={null}
from openai import OpenAI
client = OpenAI(
api_key="sk-xxxxxxxxxx",
base_url="https://api.mixroute.ai/v1"
)
response = client.chat.completions.create(
model="gpt-5.5",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
]
)
print(response.choices[0].message.content)
```
### Streaming
```python theme={null}
stream = client.chat.completions.create(
model="gpt-5.5",
messages=[{"role": "user", "content": "Tell me a story"}],
stream=True
)
for chunk in stream:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")
```
### Node.js Streaming
```typescript theme={null}
const stream = await client.chat.completions.create({
model: 'gpt-5.5',
messages: [{ role: 'user', content: 'Tell me a story' }],
stream: true
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content || '');
}
```
## Using Different Models
Mixroute Api supports models from multiple providers using the same SDK:
```python theme={null}
# OpenAI models
response = client.chat.completions.create(
model="gpt-5.5",
messages=[{"role": "user", "content": "Hello"}]
)
# Anthropic Claude (via OpenAI format)
response = client.chat.completions.create(
model="claude-opus-4-8",
messages=[{"role": "user", "content": "Hello"}]
)
# Google Gemini (via OpenAI format)
response = client.chat.completions.create(
model="gemini-3.5-flash",
messages=[{"role": "user", "content": "Hello"}]
)
# OpenAI models
response = client.chat.completions.create(
model="gpt-5.5",
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": "What's in this image?"},
{
"type": "image_url",
"image_url": {"url": "https://api.mixroute.ai/image.jpg"}
}
]
}
]
)
```
### Base64 Image
```python theme={null}
import base64
with open("image.jpg", "rb") as f:
image_data = base64.b64encode(f.read()).decode()
response = client.chat.completions.create(
model="gpt-5.5",
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": "Describe this image"},
{
"type": "image_url",
"image_url": {"url": f"data:image/jpeg;base64,{image_data}"}
}
]
}
]
)
```
## Function Calling
```python theme={null}
tools = [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get current weather for a location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "City name"
}
},
"required": ["location"]
}
}
}
]
response = client.chat.completions.create(
model="gpt-5.5",
messages=[{"role": "user", "content": "What's the weather in Tokyo?"}],
tools=tools,
tool_choice="auto"
)
# Check if model wants to call a function
if response.choices[0].message.tool_calls:
tool_call = response.choices[0].message.tool_calls[0]
print(f"Function: {tool_call.function.name}")
print(f"Arguments: {tool_call.function.arguments}")
```
## Embeddings
```python theme={null}
response = client.embeddings.create(
model="text-embedding-3-small",
input="The quick brown fox jumps over the lazy dog"
)
embedding = response.data[0].embedding
print(f"Dimensions: {len(embedding)}")
```
### Batch Embeddings
```python theme={null}
response = client.embeddings.create(
model="text-embedding-3-small",
input=[
"First document",
"Second document",
"Third document"
]
)
for i, item in enumerate(response.data):
print(f"Document {i}: {len(item.embedding)} dimensions")
```
## Image Generation
```python theme={null}
response = client.images.generate(
model="gpt-image-2",
prompt="A serene Japanese garden with cherry blossoms",
size="1024x1024",
quality="standard",
n=1
)
image_url = response.data[0].url
print(image_url)
```
## List Models
```python theme={null}
models = client.models.list()
for model in models.data:
print(f"{model.id} - {model.owned_by}")
```
## Error Handling
```python theme={null}
from openai import OpenAI, APIError, RateLimitError, APIConnectionError
client = OpenAI(
api_key="sk-xxxxxxxxxx",
base_url="https://api.mixroute.ai/v1"
)
try:
response = client.chat.completions.create(
model="gpt-5.5",
messages=[{"role": "user", "content": "Hello"}]
)
except RateLimitError:
print("Rate limit exceeded. Please retry later.")
except APIConnectionError:
print("Connection error. Check your network.")
except APIError as e:
print(f"API error: {e.message}")
```
## Async Usage
```python theme={null}
import asyncio
from openai import AsyncOpenAI
client = AsyncOpenAI(
api_key="sk-xxxxxxxxxx",
base_url="https://api.mixroute.ai/v1"
)
async def main():
response = await client.chat.completions.create(
model="gpt-5.5",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)
asyncio.run(main())
```
## Environment Variables
Set environment variables instead of hardcoding:
```bash theme={null}
export OPENAI_API_KEY="sk-xxxxxxxxxx"
export OPENAI_BASE_URL="https://api.mixroute.ai/v1"
```
```python theme={null}
from openai import OpenAI
# Automatically reads from environment variables
client = OpenAI()
```
## Best Practices
* **Use environment variables** for API keys
* **Implement retry logic** for transient errors
* **Use streaming** for better UX with long responses
* **Batch requests** when processing multiple items
* **Monitor usage** to stay within rate limits
# API Key Management
Source: https://docs.mixroute.ai/en/api-reference/system-api/api-key-management
Create, find, reveal, update, disable, rotate, and delete API keys through the System API.
## Overview
API keys are managed under `/api/token`. These endpoints use the system access token described in [Authentication and quota](/en/api-reference/system-api/authentication-and-quota).
`PUT /api/token/` performs a full mutable-settings update, not a JSON Merge Patch. Include every setting that must be preserved.
## Mutable fields
| Field | Type | Description |
| ---------------------- | -------------- | ------------------------------------------------------------------------------------------- |
| `id` | integer | Required for updates |
| `name` | string | Display name, maximum 50 characters |
| `expired_time` | integer | Unix timestamp in seconds; `-1` means no expiration |
| `remain_quota` | integer | Remaining quota in internal units |
| `unlimited_quota` | boolean | Disables the key-level quota ceiling when `true` |
| `model_limits_enabled` | boolean | Enables the model allowlist |
| `model_limits` | string | Comma-separated model IDs |
| `allow_ips` | string or null | Newline-separated IP addresses or CIDR ranges; an empty string or `null` means unrestricted |
| `group` | string | Routing and billing group |
| `cross_group_retry` | boolean | Cross-group retry; only meaningful for supported automatic groups |
| `smart_routing` | boolean | Marks the record as a Smart Routing key |
| `smart_route_tiers` | string | JSON-encoded Smart Routing tier configuration |
## Create a standard API key
```bash theme={null}
curl -fsS -X POST "$BASE_URL/api/token/" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "New-Api-User: $USER_ID" \
-H "Content-Type: application/json" \
-d '{
"name": "ci-deployment",
"expired_time": -1,
"remain_quota": 0,
"unlimited_quota": true,
"model_limits_enabled": false,
"model_limits": "",
"allow_ips": "",
"group": "default",
"cross_group_retry": false,
"smart_routing": false,
"smart_route_tiers": ""
}' | jq
```
A successful create response does not include the record ID. Use a unique name, then locate the new record through list or search.
## List and search
Standard-key lists exclude Smart Routing keys by default:
```bash theme={null}
curl -fsS "$BASE_URL/api/token/?p=1&size=20" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "New-Api-User: $USER_ID" | jq
```
Set `exclude_smart_routing=false` to include every key:
```bash theme={null}
curl -fsS "$BASE_URL/api/token/?p=1&size=20&exclude_smart_routing=false" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "New-Api-User: $USER_ID" | jq
```
Supported page-size parameter names are `size`, `page_size`, and `ps`. The maximum page size is 100.
Search by name or stored key value:
```bash theme={null}
curl -fsS --get "$BASE_URL/api/token/search" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "New-Api-User: $USER_ID" \
--data-urlencode "keyword=ci-deployment" \
--data-urlencode "p=1" \
--data-urlencode "size=20" | jq
```
The optional `token` query parameter accepts a key with or without the `sk-` prefix. List, search, and read responses always mask the key value.
## Read and reveal
Read a masked record:
```bash theme={null}
curl -fsS "$BASE_URL/api/token/42" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "New-Api-User: $USER_ID" | jq
```
Reveal the complete stored value:
```bash theme={null}
stored_key=$(curl -fsS -X POST "$BASE_URL/api/token/42/key" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "New-Api-User: $USER_ID" \
| jq -er '.data.key')
api_key="sk-${stored_key#sk-}"
```
Reveal endpoints return the stored value without adding `sk-`. Treat the response as a secret and write it directly to a secrets manager rather than printing it.
Reveal up to 100 keys in one request:
```bash theme={null}
curl -fsS -X POST "$BASE_URL/api/token/batch/keys" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "New-Api-User: $USER_ID" \
-H "Content-Type: application/json" \
-d '{"ids":[42,43]}'
```
## Safely update a key
Read the current record, construct a complete mutable payload, and change only the intended values:
```bash theme={null}
current=$(curl -fsS "$BASE_URL/api/token/42" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "New-Api-User: $USER_ID")
payload=$(jq '.data | {
id,
name,
expired_time,
remain_quota,
unlimited_quota,
model_limits_enabled,
model_limits,
allow_ips,
group,
cross_group_retry,
smart_routing,
smart_route_tiers
} | .name = "ci-deployment-v2"' <<< "$current")
curl -fsS -X PUT "$BASE_URL/api/token/" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "New-Api-User: $USER_ID" \
-H "Content-Type: application/json" \
-d "$payload" | jq
```
This read-modify-write pattern preserves model limits and Smart Routing settings.
## Enable or disable
Status-only updates preserve all other settings:
```bash theme={null}
curl -fsS -X PUT "$BASE_URL/api/token/?status_only=true" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "New-Api-User: $USER_ID" \
-H "Content-Type: application/json" \
-d '{"id":42,"status":2}' | jq
```
| Status | Meaning |
| ------ | ----------------- |
| `1` | Enabled |
| `2` | Manually disabled |
| `3` | Expired |
| `4` | Quota exhausted |
An expired or exhausted key cannot be enabled until its expiration or quota condition is corrected.
## Delete keys
Delete one key:
```bash theme={null}
curl -fsS -X DELETE "$BASE_URL/api/token/42" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "New-Api-User: $USER_ID" | jq
```
Delete multiple owned keys:
```bash theme={null}
curl -fsS -X POST "$BASE_URL/api/token/batch" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "New-Api-User: $USER_ID" \
-H "Content-Type: application/json" \
-d '{"ids":[42,43]}' | jq
```
The batch response `data` value is the number of records actually deleted.
## Complete lifecycle script
This script creates a one-hour key with a USD-denominated ceiling, locates it, reveals it without logging the secret, updates it, disables it, and deletes it.
```bash theme={null}
#!/usr/bin/env bash
set -euo pipefail
: "${BASE_URL:=https://api.mixroute.ai}"
: "${ACCESS_TOKEN:?Set ACCESS_TOKEN}"
: "${USER_ID:?Set USER_ID}"
auth=(
-H "Authorization: Bearer $ACCESS_TOKEN"
-H "New-Api-User: $USER_ID"
)
name="automation-$(date +%s)-$RANDOM"
token_id=""
delete_token() {
local response
response=$(curl -fsS -X DELETE "$BASE_URL/api/token/$token_id" \
"${auth[@]}")
jq -e '.success == true' <<< "$response" >/dev/null
}
cleanup() {
if [[ -n "$token_id" ]]; then
delete_token >/dev/null 2>&1 || true
fi
}
trap cleanup EXIT
quota_per_unit=$(curl -fsS "$BASE_URL/api/status" | jq -er '.data.quota_per_unit')
expires_at=$(( $(date +%s) + 3600 ))
quota=$(( 5 * quota_per_unit ))
create_payload=$(jq -n \
--arg name "$name" \
--argjson expires "$expires_at" \
--argjson quota "$quota" '{
name: $name,
expired_time: $expires,
remain_quota: $quota,
unlimited_quota: false,
model_limits_enabled: false,
model_limits: "",
allow_ips: "",
group: "default",
cross_group_retry: false,
smart_routing: false,
smart_route_tiers: ""
}')
created=$(curl -fsS -X POST "$BASE_URL/api/token/" \
"${auth[@]}" -H "Content-Type: application/json" \
-d "$create_payload")
jq -e '.success == true' <<< "$created" >/dev/null
found=$(curl -fsS --get "$BASE_URL/api/token/search" \
"${auth[@]}" --data-urlencode "keyword=$name" \
--data-urlencode "p=1" --data-urlencode "size=10")
token_id=$(jq -er --arg name "$name" '
[.data.items[] | select(.name == $name)]
| if length == 1 then .[0].id
else error("expected exactly one matching API key")
end
' <<< "$found")
stored_key=$(curl -fsS -X POST "$BASE_URL/api/token/$token_id/key" \
"${auth[@]}" | jq -er '.data.key')
api_key="sk-${stored_key#sk-}"
# Replace this no-op with your secrets-manager command.
: "$api_key"
unset stored_key api_key
current=$(curl -fsS "$BASE_URL/api/token/$token_id" "${auth[@]}")
update_payload=$(jq --argjson quota "$((10 * quota_per_unit))" '.data | {
id, name, expired_time, remain_quota, unlimited_quota,
model_limits_enabled, model_limits, allow_ips, group,
cross_group_retry, smart_routing, smart_route_tiers
} | .remain_quota = $quota' <<< "$current")
curl -fsS -X PUT "$BASE_URL/api/token/" \
"${auth[@]}" -H "Content-Type: application/json" \
-d "$update_payload" | jq -e '.success == true' >/dev/null
curl -fsS -X PUT "$BASE_URL/api/token/?status_only=true" \
"${auth[@]}" -H "Content-Type: application/json" \
-d "{\"id\":$token_id,\"status\":2}" \
| jq -e '.success == true' >/dev/null
delete_token
token_id=""
trap - EXIT
echo "API key lifecycle completed"
```
# Authentication and Quota
Source: https://docs.mixroute.ai/en/api-reference/system-api/authentication-and-quota
Authenticate System API requests and convert account and API-key quota units.
## Overview
The System API manages resources in your MixRoute account, including API keys, Smart Routing keys, and wallet operations. It is separate from the model inference API.
| Purpose | Base URL | Credential |
| -------------------------- | ---------------------------- | ---------------------------- |
| Account and key management | `https://api.mixroute.ai` | System access token |
| Model inference | `https://api.mixroute.ai/v1` | API key beginning with `sk-` |
A system access token grants account-level management access. Never place it in browser code, mobile applications, logs, or source control.
## Get a system access token
Open **Account Settings β API Access** in the [MixRoute Console](https://console.mixroute.ai/settings), then generate and copy a system access token. Store it in a secrets manager.
`GET /api/user/token` generates a new system access token. It is a rotation operation, not a read operation, and invalidates the previous token. Do not call it during routine automation.
Set the values used by the examples:
```bash theme={null}
export BASE_URL="https://api.mixroute.ai"
export ACCESS_TOKEN="YOUR_SYSTEM_ACCESS_TOKEN"
export USER_ID="YOUR_NUMERIC_USER_ID"
```
The numeric user ID is shown in the account settings page.
## Authentication headers
Every protected System API request requires both headers:
```http theme={null}
Authorization: Bearer YOUR_SYSTEM_ACCESS_TOKEN
New-Api-User: YOUR_NUMERIC_USER_ID
```
For requests with a JSON body, also send:
```http theme={null}
Content-Type: application/json
```
The user ID must belong to the system access token. Authentication failures do not use a single HTTP status: missing credentials or a user-ID mismatch can return HTTP `401`, while an invalid access token currently returns HTTP `200` with `success: false`. Always check both the HTTP status and the response envelope.
Use this request to verify authentication without changing account data:
```bash theme={null}
curl -fsS "$BASE_URL/api/user/self" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "New-Api-User: $USER_ID" \
| jq -e '
if .success == true then .data
else error(.message // "authentication failed")
end
'
```
## Response envelope
Most System API endpoints use this envelope:
```json theme={null}
{
"success": true,
"message": "",
"data": {}
}
```
Some validation and authentication failures return HTTP `200` with `success: false`, so check both the HTTP status and the `success` field.
```bash theme={null}
response=$(curl -fsS "$BASE_URL/api/user/self/groups" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "New-Api-User: $USER_ID")
jq -e '.success == true' <<< "$response" >/dev/null || {
jq -r '.message // "System API request failed"' <<< "$response" >&2
exit 1
}
```
## Quota units
Account quota and API-key quota are stored in internal quota units, not directly in USD. Read the current conversion from the public status endpoint:
```bash theme={null}
quota_per_unit=$(curl -fsS "$BASE_URL/api/status" \
| jq -er '.data.quota_per_unit')
usd_amount=20
internal_quota=$((usd_amount * quota_per_unit))
printf 'Quota for $%s: %s\n' "$usd_amount" "$internal_quota"
```
Use these formulas:
```text theme={null}
internal quota = USD amount Γ quota_per_unit
USD amount = internal quota Γ· quota_per_unit
```
`quota_per_unit` is deployment configuration and can change. Retrieve it instead of hard-coding the current value.
### Account balance versus key quota
* Account balance (`GET /api/user/self`, field `quota`) is the wallet balance available to the account.
* Key quota (`remain_quota`) is a spending ceiling for one API key.
* Assigning a key quota does not transfer funds out of the wallet.
* `unlimited_quota: true` removes the key-level ceiling, but requests still consume account balance.
Read and display the current account balance:
```bash theme={null}
user=$(curl -fsS "$BASE_URL/api/user/self" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "New-Api-User: $USER_ID")
quota_per_unit=$(curl -fsS "$BASE_URL/api/status" \
| jq -er '.data.quota_per_unit')
jq --argjson unit "$quota_per_unit" '{
user_id: .data.id,
internal_quota: .data.quota,
balance_usd: (.data.quota / $unit)
}' <<< "$user"
```
## Available groups
Use the account-specific group list when creating a key:
```bash theme={null}
curl -fsS "$BASE_URL/api/user/self/groups" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "New-Api-User: $USER_ID" | jq '.data'
```
Do not assume that a group available to another account is available to yours. The `default` group is suitable for most examples in this guide.
## Security checklist
* Keep the system access token server-side.
* Use a dedicated account or token for automation.
* Never log reveal-endpoint responses.
* Give each API key a clear name, expiration, quota, and IP restriction where possible.
* Rotate by creating a replacement first, then disable and delete the old key after traffic moves.
# Gemini 2.5 Flash
Source: https://docs.mixroute.ai/en/model-api/google/gemini-2.5-flash
Gemini 2.5 Flash: fast, efficient language model. Request examples and parameters for MixRoute.
Gemini 2.5 Flash is a fast, efficient language model from Google.
Call `gemini-2.5-flash` through MixRoute's native Gemini endpoint; an OpenAI-compatible endpoint is also supported.
## Key capabilities
* Native Gemini API - Uses generateContent with content parts
* System instructions - Supports systemInstruction
* Generation control - Uses generationConfig
* OpenAI-compatible - Also works through Chat Completions
## Quick example
### Gemini native API
```bash theme={null}
curl "https://api.mixroute.ai/v1/models/gemini-2.5-flash:generateContent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Explain quantum entanglement in simple terms."
}
]
}
],
"generationConfig": {
"temperature": 1,
"topP": 1
}
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-2.5-flash:generateContent",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'contents': [{'role': 'user',
'parts': [{'text': 'Explain quantum entanglement in simple terms.'}]}],
'generationConfig': {'temperature': 1, 'topP': 1}},
)
print(response.json())
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-2.5-flash",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gemini-2.5-flash",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gemini-2.5-flash",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Gemini native API
| Parameter | Type | Required | Description |
| ------------------- | ------ | -------- | ------------------------------------------------- |
| `contents` | array | Yes | Conversation content built from role and parts. |
| `systemInstruction` | object | No | System instruction with content parts. |
| `generationConfig` | object | No | Generation settings such as temperature and topP. |
| `safetySettings` | array | No | Content-safety settings. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gemini-2.5-flash`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Gemini 2.5 Flash Image
Source: https://docs.mixroute.ai/en/model-api/google/gemini-2.5-flash-image
Gemini 2.5 Flash Image: image generation model. Request examples and parameters for MixRoute.
Gemini 2.5 Flash Image is available through the native image API described below.
Uses the native Gemini Content/Part structure. Request IMAGE output and read the returned image parts rather than treating the response as a text-only chat completion.
[Native image parameters](/en/api-reference/endpoint/nano-banana) | [Streaming responses](/en/api-reference/endpoint/nano-banana-stream)
`POST https://api.mixroute.ai/v1/models/gemini-2.5-flash-image:generateContent`
## Examples
Use your MixRoute key in the `MIXROUTE_API_KEY` environment variable. Requests use `Authorization: Bearer ...`. Replace source-image placeholders with accessible images or local files before editing.
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/models/gemini-2.5-flash-image:generateContent" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "A clean product photograph of a red ceramic mug on a white background."
}
]
}
],
"generationConfig": {
"responseModalities": [
"TEXT",
"IMAGE"
],
"imageConfig": {
"aspectRatio": "1:1"
}
}
}'
```
### Python
```python theme={null}
import json
import os
import requests
payload = json.loads(r'''
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "A clean product photograph of a red ceramic mug on a white background."
}
]
}
],
"generationConfig": {
"responseModalities": [
"TEXT",
"IMAGE"
],
"imageConfig": {
"aspectRatio": "1:1"
}
}
}
''')
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-2.5-flash-image:generateContent",
headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
json=payload,
timeout=180,
)
response.raise_for_status()
result = response.json()
import base64
from pathlib import Path
image_index = 0
for candidate in result.get("candidates", []):
for part in candidate.get("content", {}).get("parts", []):
if part.get("thought"):
continue
inline = part.get("inlineData")
if inline and inline.get("data"):
extension = {"image/png": "png", "image/jpeg": "jpg", "image/webp": "webp"}.get(inline.get("mimeType"), "bin")
Path(f"image_{image_index}.{extension}").write_bytes(base64.b64decode(inline["data"]))
image_index += 1
elif "text" in part:
print(part["text"])
```
# Gemini 2.5 Flash Lite
Source: https://docs.mixroute.ai/en/model-api/google/gemini-2.5-flash-lite
Gemini 2.5 Flash Lite: fast, efficient language model. Request examples and parameters for MixRoute.
Gemini 2.5 Flash Lite is a fast, efficient language model from Google.
Call `gemini-2.5-flash-lite` through MixRoute's native Gemini endpoint; an OpenAI-compatible endpoint is also supported.
## Key capabilities
* Native Gemini API - Uses generateContent with content parts
* System instructions - Supports systemInstruction
* Generation control - Uses generationConfig
* OpenAI-compatible - Also works through Chat Completions
## Quick example
### Gemini native API
```bash theme={null}
curl "https://api.mixroute.ai/v1/models/gemini-2.5-flash-lite:generateContent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Explain quantum entanglement in simple terms."
}
]
}
],
"generationConfig": {
"temperature": 1,
"topP": 1
}
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-2.5-flash-lite:generateContent",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'contents': [{'role': 'user',
'parts': [{'text': 'Explain quantum entanglement in simple terms.'}]}],
'generationConfig': {'temperature': 1, 'topP': 1}},
)
print(response.json())
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-2.5-flash-lite",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gemini-2.5-flash-lite",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gemini-2.5-flash-lite",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Gemini native API
| Parameter | Type | Required | Description |
| ------------------- | ------ | -------- | ------------------------------------------------- |
| `contents` | array | Yes | Conversation content built from role and parts. |
| `systemInstruction` | object | No | System instruction with content parts. |
| `generationConfig` | object | No | Generation settings such as temperature and topP. |
| `safetySettings` | array | No | Content-safety settings. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gemini-2.5-flash-lite`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Gemini 2.5 Flash Lite Preview 09-2025
Source: https://docs.mixroute.ai/en/model-api/google/gemini-2.5-flash-lite-preview-09-2025
Gemini 2.5 Flash Lite Preview 09-2025: fast, efficient language model. Request examples and parameters for MixRoute.
Gemini 2.5 Flash Lite Preview 09-2025 is a fast, efficient language model from Google.
Call `gemini-2.5-flash-lite-preview-09-2025` through MixRoute's native Gemini endpoint; an OpenAI-compatible endpoint is also supported.
## Key capabilities
* Native Gemini API - Uses generateContent with content parts
* System instructions - Supports systemInstruction
* Generation control - Uses generationConfig
* OpenAI-compatible - Also works through Chat Completions
## Quick example
### Gemini native API
```bash theme={null}
curl "https://api.mixroute.ai/v1/models/gemini-2.5-flash-lite-preview-09-2025:generateContent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Explain quantum entanglement in simple terms."
}
]
}
],
"generationConfig": {
"temperature": 1,
"topP": 1
}
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-2.5-flash-lite-preview-09-2025:generateContent",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'contents': [{'role': 'user',
'parts': [{'text': 'Explain quantum entanglement in simple terms.'}]}],
'generationConfig': {'temperature': 1, 'topP': 1}},
)
print(response.json())
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-2.5-flash-lite-preview-09-2025",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gemini-2.5-flash-lite-preview-09-2025",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gemini-2.5-flash-lite-preview-09-2025",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Gemini native API
| Parameter | Type | Required | Description |
| ------------------- | ------ | -------- | ------------------------------------------------- |
| `contents` | array | Yes | Conversation content built from role and parts. |
| `systemInstruction` | object | No | System instruction with content parts. |
| `generationConfig` | object | No | Generation settings such as temperature and topP. |
| `safetySettings` | array | No | Content-safety settings. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gemini-2.5-flash-lite-preview-09-2025`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Gemini 2.5 Flash Preview TTS
Source: https://docs.mixroute.ai/en/model-api/google/gemini-2.5-flash-preview-tts
Gemini 2.5 Flash Preview TTS: text-to-speech model. Request examples and parameters for MixRoute.
Gemini 2.5 Flash Preview TTS is a text-to-speech model from Google.
Call `gemini-2.5-flash-preview-tts` through MixRoute's native Gemini endpoint.
## Key capabilities
* Text-to-speech - Convert text into generated audio
* Voice selection - Configure a prebuilt voice
* Audio output - Returns generated speech data
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/models/gemini-2.5-flash-preview-tts:generateContent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"parts": [
{
"text": "Say clearly: Welcome to MixRoute."
}
]
}
],
"generationConfig": {
"responseModalities": [
"AUDIO"
],
"speechConfig": {
"voiceConfig": {
"prebuiltVoiceConfig": {
"voiceName": "Kore"
}
}
}
}
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-2.5-flash-preview-tts:generateContent",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'contents': [{'parts': [{'text': 'Say clearly: Welcome to MixRoute.'}]}],
'generationConfig': {'responseModalities': ['AUDIO'],
'speechConfig': {'voiceConfig': {'prebuiltVoiceConfig': {'voiceName': 'Kore'}}}}},
)
print(response.json())
```
## Parameters
| Parameter | Type | Required | Description |
| ------------------------------------- | ------ | -------- | ---------------------- |
| `contents` | array | Yes | Text content to speak. |
| `generationConfig.responseModalities` | array | Yes | Set to AUDIO. |
| `generationConfig.speechConfig` | object | Yes | Voice configuration. |
# Gemini 2.5 Pro
Source: https://docs.mixroute.ai/en/model-api/google/gemini-2.5-pro
Gemini 2.5 Pro: fast, efficient language model. Request examples and parameters for MixRoute.
Gemini 2.5 Pro is a fast, efficient language model from Google.
Call `gemini-2.5-pro` through MixRoute's native Gemini endpoint; an OpenAI-compatible endpoint is also supported.
## Key capabilities
* Native Gemini API - Uses generateContent with content parts
* System instructions - Supports systemInstruction
* Generation control - Uses generationConfig
* OpenAI-compatible - Also works through Chat Completions
## Quick example
### Gemini native API
```bash theme={null}
curl "https://api.mixroute.ai/v1/models/gemini-2.5-pro:generateContent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Explain quantum entanglement in simple terms."
}
]
}
],
"generationConfig": {
"temperature": 1,
"topP": 1
}
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-2.5-pro:generateContent",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'contents': [{'role': 'user',
'parts': [{'text': 'Explain quantum entanglement in simple terms.'}]}],
'generationConfig': {'temperature': 1, 'topP': 1}},
)
print(response.json())
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-2.5-pro",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gemini-2.5-pro",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gemini-2.5-pro",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Gemini native API
| Parameter | Type | Required | Description |
| ------------------- | ------ | -------- | ------------------------------------------------- |
| `contents` | array | Yes | Conversation content built from role and parts. |
| `systemInstruction` | object | No | System instruction with content parts. |
| `generationConfig` | object | No | Generation settings such as temperature and topP. |
| `safetySettings` | array | No | Content-safety settings. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gemini-2.5-pro`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Gemini 2.5 Pro Preview TTS
Source: https://docs.mixroute.ai/en/model-api/google/gemini-2.5-pro-preview-tts
Gemini 2.5 Pro Preview TTS: text-to-speech model. Request examples and parameters for MixRoute.
Gemini 2.5 Pro Preview TTS is a text-to-speech model from Google.
Call `gemini-2.5-pro-preview-tts` through MixRoute's native Gemini endpoint.
## Key capabilities
* Text-to-speech - Convert text into generated audio
* Voice selection - Configure a prebuilt voice
* Audio output - Returns generated speech data
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/models/gemini-2.5-pro-preview-tts:generateContent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"parts": [
{
"text": "Say clearly: Welcome to MixRoute."
}
]
}
],
"generationConfig": {
"responseModalities": [
"AUDIO"
],
"speechConfig": {
"voiceConfig": {
"prebuiltVoiceConfig": {
"voiceName": "Kore"
}
}
}
}
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-2.5-pro-preview-tts:generateContent",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'contents': [{'parts': [{'text': 'Say clearly: Welcome to MixRoute.'}]}],
'generationConfig': {'responseModalities': ['AUDIO'],
'speechConfig': {'voiceConfig': {'prebuiltVoiceConfig': {'voiceName': 'Kore'}}}}},
)
print(response.json())
```
## Parameters
| Parameter | Type | Required | Description |
| ------------------------------------- | ------ | -------- | ---------------------- |
| `contents` | array | Yes | Text content to speak. |
| `generationConfig.responseModalities` | array | Yes | Set to AUDIO. |
| `generationConfig.speechConfig` | object | Yes | Voice configuration. |
# Gemini 3 Flash Preview
Source: https://docs.mixroute.ai/en/model-api/google/gemini-3-flash-preview
Gemini 3 Flash Preview: fast, efficient language model. Request examples and parameters for MixRoute.
Gemini 3 Flash Preview is a fast, efficient language model from Google.
Call `gemini-3-flash-preview` through MixRoute's native Gemini endpoint; an OpenAI-compatible endpoint is also supported.
## Key capabilities
* Native Gemini API - Uses generateContent with content parts
* System instructions - Supports systemInstruction
* Generation control - Uses generationConfig
* OpenAI-compatible - Also works through Chat Completions
## Quick example
### Gemini native API
```bash theme={null}
curl "https://api.mixroute.ai/v1/models/gemini-3-flash-preview:generateContent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Explain quantum entanglement in simple terms."
}
]
}
],
"generationConfig": {
"temperature": 1,
"topP": 1
}
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-3-flash-preview:generateContent",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'contents': [{'role': 'user',
'parts': [{'text': 'Explain quantum entanglement in simple terms.'}]}],
'generationConfig': {'temperature': 1, 'topP': 1}},
)
print(response.json())
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3-flash-preview",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gemini-3-flash-preview",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gemini-3-flash-preview",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Gemini native API
| Parameter | Type | Required | Description |
| ------------------- | ------ | -------- | ------------------------------------------------- |
| `contents` | array | Yes | Conversation content built from role and parts. |
| `systemInstruction` | object | No | System instruction with content parts. |
| `generationConfig` | object | No | Generation settings such as temperature and topP. |
| `safetySettings` | array | No | Content-safety settings. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gemini-3-flash-preview`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Gemini 3 Pro Image
Source: https://docs.mixroute.ai/en/model-api/google/gemini-3-pro-image
Gemini 3 Pro Image: image generation model. Request examples and parameters for MixRoute.
Gemini 3 Pro Image is available through the native image API described below.
Uses the native Gemini Content/Part structure. Request IMAGE output and read the returned image parts rather than treating the response as a text-only chat completion.
[Native image parameters](/en/api-reference/endpoint/nano-banana) | [Streaming responses](/en/api-reference/endpoint/nano-banana-stream)
`POST https://api.mixroute.ai/v1/models/gemini-3-pro-image:generateContent`
## Examples
Use your MixRoute key in the `MIXROUTE_API_KEY` environment variable. Requests use `Authorization: Bearer ...`. Replace source-image placeholders with accessible images or local files before editing.
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/models/gemini-3-pro-image:generateContent" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "A clean product photograph of a red ceramic mug on a white background."
}
]
}
],
"generationConfig": {
"responseModalities": [
"TEXT",
"IMAGE"
],
"imageConfig": {
"aspectRatio": "1:1",
"imageSize": "1K"
}
}
}'
```
### Python
```python theme={null}
import json
import os
import requests
payload = json.loads(r'''
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "A clean product photograph of a red ceramic mug on a white background."
}
]
}
],
"generationConfig": {
"responseModalities": [
"TEXT",
"IMAGE"
],
"imageConfig": {
"aspectRatio": "1:1",
"imageSize": "1K"
}
}
}
''')
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-3-pro-image:generateContent",
headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
json=payload,
timeout=180,
)
response.raise_for_status()
result = response.json()
import base64
from pathlib import Path
image_index = 0
for candidate in result.get("candidates", []):
for part in candidate.get("content", {}).get("parts", []):
if part.get("thought"):
continue
inline = part.get("inlineData")
if inline and inline.get("data"):
extension = {"image/png": "png", "image/jpeg": "jpg", "image/webp": "webp"}.get(inline.get("mimeType"), "bin")
Path(f"image_{image_index}.{extension}").write_bytes(base64.b64decode(inline["data"]))
image_index += 1
elif "text" in part:
print(part["text"])
```
# Gemini 3 Pro Image Preview
Source: https://docs.mixroute.ai/en/model-api/google/gemini-3-pro-image-preview
Gemini 3 Pro Image Preview: image generation model. Request examples and parameters for MixRoute.
Gemini 3 Pro Image Preview is available through the native image API described below.
Uses the native Gemini Content/Part structure. Request IMAGE output and read the returned image parts rather than treating the response as a text-only chat completion.
[Native image parameters](/en/api-reference/endpoint/nano-banana) | [Streaming responses](/en/api-reference/endpoint/nano-banana-stream)
`POST https://api.mixroute.ai/v1/models/gemini-3-pro-image-preview:generateContent`
## Examples
Use your MixRoute key in the `MIXROUTE_API_KEY` environment variable. Requests use `Authorization: Bearer ...`. Replace source-image placeholders with accessible images or local files before editing.
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/models/gemini-3-pro-image-preview:generateContent" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "A clean product photograph of a red ceramic mug on a white background."
}
]
}
],
"generationConfig": {
"responseModalities": [
"TEXT",
"IMAGE"
],
"imageConfig": {
"aspectRatio": "1:1",
"imageSize": "1K"
}
}
}'
```
### Python
```python theme={null}
import json
import os
import requests
payload = json.loads(r'''
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "A clean product photograph of a red ceramic mug on a white background."
}
]
}
],
"generationConfig": {
"responseModalities": [
"TEXT",
"IMAGE"
],
"imageConfig": {
"aspectRatio": "1:1",
"imageSize": "1K"
}
}
}
''')
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-3-pro-image-preview:generateContent",
headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
json=payload,
timeout=180,
)
response.raise_for_status()
result = response.json()
import base64
from pathlib import Path
image_index = 0
for candidate in result.get("candidates", []):
for part in candidate.get("content", {}).get("parts", []):
if part.get("thought"):
continue
inline = part.get("inlineData")
if inline and inline.get("data"):
extension = {"image/png": "png", "image/jpeg": "jpg", "image/webp": "webp"}.get(inline.get("mimeType"), "bin")
Path(f"image_{image_index}.{extension}").write_bytes(base64.b64decode(inline["data"]))
image_index += 1
elif "text" in part:
print(part["text"])
```
# Gemini 3.1 Flash Image
Source: https://docs.mixroute.ai/en/model-api/google/gemini-3.1-flash-image
Gemini 3.1 Flash Image: image generation model. Request examples and parameters for MixRoute.
Gemini 3.1 Flash Image is available through the native image API described below.
Uses the native Gemini Content/Part structure. Request IMAGE output and read the returned image parts rather than treating the response as a text-only chat completion.
[Native image parameters](/en/api-reference/endpoint/nano-banana) | [Streaming responses](/en/api-reference/endpoint/nano-banana-stream)
`POST https://api.mixroute.ai/v1/models/gemini-3.1-flash-image:generateContent`
## Examples
Use your MixRoute key in the `MIXROUTE_API_KEY` environment variable. Requests use `Authorization: Bearer ...`. Replace source-image placeholders with accessible images or local files before editing.
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/models/gemini-3.1-flash-image:generateContent" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "A clean product photograph of a red ceramic mug on a white background."
}
]
}
],
"generationConfig": {
"responseModalities": [
"TEXT",
"IMAGE"
],
"imageConfig": {
"aspectRatio": "1:1",
"imageSize": "1K"
}
}
}'
```
### Python
```python theme={null}
import json
import os
import requests
payload = json.loads(r'''
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "A clean product photograph of a red ceramic mug on a white background."
}
]
}
],
"generationConfig": {
"responseModalities": [
"TEXT",
"IMAGE"
],
"imageConfig": {
"aspectRatio": "1:1",
"imageSize": "1K"
}
}
}
''')
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-3.1-flash-image:generateContent",
headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
json=payload,
timeout=180,
)
response.raise_for_status()
result = response.json()
import base64
from pathlib import Path
image_index = 0
for candidate in result.get("candidates", []):
for part in candidate.get("content", {}).get("parts", []):
if part.get("thought"):
continue
inline = part.get("inlineData")
if inline and inline.get("data"):
extension = {"image/png": "png", "image/jpeg": "jpg", "image/webp": "webp"}.get(inline.get("mimeType"), "bin")
Path(f"image_{image_index}.{extension}").write_bytes(base64.b64decode(inline["data"]))
image_index += 1
elif "text" in part:
print(part["text"])
```
# Gemini 3.1 Flash Image Preview
Source: https://docs.mixroute.ai/en/model-api/google/gemini-3.1-flash-image-preview
Gemini 3.1 Flash Image Preview: image generation model. Request examples and parameters for MixRoute.
Gemini 3.1 Flash Image Preview is available through the native image API described below.
Uses the native Gemini Content/Part structure. Request IMAGE output and read the returned image parts rather than treating the response as a text-only chat completion.
[Native image parameters](/en/api-reference/endpoint/nano-banana) | [Streaming responses](/en/api-reference/endpoint/nano-banana-stream)
`POST https://api.mixroute.ai/v1/models/gemini-3.1-flash-image-preview:generateContent`
## Examples
Use your MixRoute key in the `MIXROUTE_API_KEY` environment variable. Requests use `Authorization: Bearer ...`. Replace source-image placeholders with accessible images or local files before editing.
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/models/gemini-3.1-flash-image-preview:generateContent" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "A clean product photograph of a red ceramic mug on a white background."
}
]
}
],
"generationConfig": {
"responseModalities": [
"TEXT",
"IMAGE"
],
"imageConfig": {
"aspectRatio": "1:1",
"imageSize": "1K"
}
}
}'
```
### Python
```python theme={null}
import json
import os
import requests
payload = json.loads(r'''
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "A clean product photograph of a red ceramic mug on a white background."
}
]
}
],
"generationConfig": {
"responseModalities": [
"TEXT",
"IMAGE"
],
"imageConfig": {
"aspectRatio": "1:1",
"imageSize": "1K"
}
}
}
''')
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-3.1-flash-image-preview:generateContent",
headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
json=payload,
timeout=180,
)
response.raise_for_status()
result = response.json()
import base64
from pathlib import Path
image_index = 0
for candidate in result.get("candidates", []):
for part in candidate.get("content", {}).get("parts", []):
if part.get("thought"):
continue
inline = part.get("inlineData")
if inline and inline.get("data"):
extension = {"image/png": "png", "image/jpeg": "jpg", "image/webp": "webp"}.get(inline.get("mimeType"), "bin")
Path(f"image_{image_index}.{extension}").write_bytes(base64.b64decode(inline["data"]))
image_index += 1
elif "text" in part:
print(part["text"])
```
# Gemini 3.1 Flash Lite
Source: https://docs.mixroute.ai/en/model-api/google/gemini-3.1-flash-lite
Gemini 3.1 Flash Lite: fast, efficient language model. Request examples and parameters for MixRoute.
Gemini 3.1 Flash Lite is a fast, efficient language model from Google.
Call `gemini-3.1-flash-lite` through MixRoute's native Gemini endpoint; an OpenAI-compatible endpoint is also supported.
## Key capabilities
* Native Gemini API - Uses generateContent with content parts
* System instructions - Supports systemInstruction
* Generation control - Uses generationConfig
* OpenAI-compatible - Also works through Chat Completions
## Quick example
### Gemini native API
```bash theme={null}
curl "https://api.mixroute.ai/v1/models/gemini-3.1-flash-lite:generateContent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Explain quantum entanglement in simple terms."
}
]
}
],
"generationConfig": {
"temperature": 1,
"topP": 1
}
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-3.1-flash-lite:generateContent",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'contents': [{'role': 'user',
'parts': [{'text': 'Explain quantum entanglement in simple terms.'}]}],
'generationConfig': {'temperature': 1, 'topP': 1}},
)
print(response.json())
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.1-flash-lite",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gemini-3.1-flash-lite",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gemini-3.1-flash-lite",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Gemini native API
| Parameter | Type | Required | Description |
| ------------------- | ------ | -------- | ------------------------------------------------- |
| `contents` | array | Yes | Conversation content built from role and parts. |
| `systemInstruction` | object | No | System instruction with content parts. |
| `generationConfig` | object | No | Generation settings such as temperature and topP. |
| `safetySettings` | array | No | Content-safety settings. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gemini-3.1-flash-lite`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Gemini 3.1 Flash Lite Image
Source: https://docs.mixroute.ai/en/model-api/google/gemini-3.1-flash-lite-image
Gemini 3.1 Flash Lite Image: image generation model. Request examples and parameters for MixRoute.
Gemini 3.1 Flash Lite Image is available through the native image API described below.
Uses the native Gemini Content/Part structure. Request IMAGE output and read the returned image parts rather than treating the response as a text-only chat completion.
[Native image parameters](/en/api-reference/endpoint/nano-banana) | [Streaming responses](/en/api-reference/endpoint/nano-banana-stream)
`POST https://api.mixroute.ai/v1/models/gemini-3.1-flash-lite-image:generateContent`
## Examples
Use your MixRoute key in the `MIXROUTE_API_KEY` environment variable. Requests use `Authorization: Bearer ...`. Replace source-image placeholders with accessible images or local files before editing.
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/models/gemini-3.1-flash-lite-image:generateContent" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "A clean product photograph of a red ceramic mug on a white background."
}
]
}
],
"generationConfig": {
"responseModalities": [
"TEXT",
"IMAGE"
],
"imageConfig": {
"aspectRatio": "1:1",
"imageSize": "1K"
}
}
}'
```
### Python
```python theme={null}
import json
import os
import requests
payload = json.loads(r'''
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "A clean product photograph of a red ceramic mug on a white background."
}
]
}
],
"generationConfig": {
"responseModalities": [
"TEXT",
"IMAGE"
],
"imageConfig": {
"aspectRatio": "1:1",
"imageSize": "1K"
}
}
}
''')
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-3.1-flash-lite-image:generateContent",
headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
json=payload,
timeout=180,
)
response.raise_for_status()
result = response.json()
import base64
from pathlib import Path
image_index = 0
for candidate in result.get("candidates", []):
for part in candidate.get("content", {}).get("parts", []):
if part.get("thought"):
continue
inline = part.get("inlineData")
if inline and inline.get("data"):
extension = {"image/png": "png", "image/jpeg": "jpg", "image/webp": "webp"}.get(inline.get("mimeType"), "bin")
Path(f"image_{image_index}.{extension}").write_bytes(base64.b64decode(inline["data"]))
image_index += 1
elif "text" in part:
print(part["text"])
```
# Gemini 3.1 Flash Lite Preview
Source: https://docs.mixroute.ai/en/model-api/google/gemini-3.1-flash-lite-preview
Gemini 3.1 Flash Lite Preview: fast, efficient language model. Request examples and parameters for MixRoute.
Gemini 3.1 Flash Lite Preview is a fast, efficient language model from Google.
Call `gemini-3.1-flash-lite-preview` through MixRoute's native Gemini endpoint; an OpenAI-compatible endpoint is also supported.
## Key capabilities
* Native Gemini API - Uses generateContent with content parts
* System instructions - Supports systemInstruction
* Generation control - Uses generationConfig
* OpenAI-compatible - Also works through Chat Completions
## Quick example
### Gemini native API
```bash theme={null}
curl "https://api.mixroute.ai/v1/models/gemini-3.1-flash-lite-preview:generateContent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Explain quantum entanglement in simple terms."
}
]
}
],
"generationConfig": {
"temperature": 1,
"topP": 1
}
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-3.1-flash-lite-preview:generateContent",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'contents': [{'role': 'user',
'parts': [{'text': 'Explain quantum entanglement in simple terms.'}]}],
'generationConfig': {'temperature': 1, 'topP': 1}},
)
print(response.json())
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.1-flash-lite-preview",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gemini-3.1-flash-lite-preview",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gemini-3.1-flash-lite-preview",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Gemini native API
| Parameter | Type | Required | Description |
| ------------------- | ------ | -------- | ------------------------------------------------- |
| `contents` | array | Yes | Conversation content built from role and parts. |
| `systemInstruction` | object | No | System instruction with content parts. |
| `generationConfig` | object | No | Generation settings such as temperature and topP. |
| `safetySettings` | array | No | Content-safety settings. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gemini-3.1-flash-lite-preview`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Gemini 3.1 Flash TTS Preview
Source: https://docs.mixroute.ai/en/model-api/google/gemini-3.1-flash-tts-preview
Gemini 3.1 Flash TTS Preview: text-to-speech model. Request examples and parameters for MixRoute.
Gemini 3.1 Flash TTS Preview is a text-to-speech model from Google.
Call `gemini-3.1-flash-tts-preview` through MixRoute's native Gemini endpoint.
## Key capabilities
* Text-to-speech - Convert text into generated audio
* Voice selection - Configure a prebuilt voice
* Audio output - Returns generated speech data
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/models/gemini-3.1-flash-tts-preview:generateContent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"parts": [
{
"text": "Say clearly: Welcome to MixRoute."
}
]
}
],
"generationConfig": {
"responseModalities": [
"AUDIO"
],
"speechConfig": {
"voiceConfig": {
"prebuiltVoiceConfig": {
"voiceName": "Kore"
}
}
}
}
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-3.1-flash-tts-preview:generateContent",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'contents': [{'parts': [{'text': 'Say clearly: Welcome to MixRoute.'}]}],
'generationConfig': {'responseModalities': ['AUDIO'],
'speechConfig': {'voiceConfig': {'prebuiltVoiceConfig': {'voiceName': 'Kore'}}}}},
)
print(response.json())
```
## Parameters
| Parameter | Type | Required | Description |
| ------------------------------------- | ------ | -------- | ---------------------- |
| `contents` | array | Yes | Text content to speak. |
| `generationConfig.responseModalities` | array | Yes | Set to AUDIO. |
| `generationConfig.speechConfig` | object | Yes | Voice configuration. |
# Gemini 3.1 Pro Preview
Source: https://docs.mixroute.ai/en/model-api/google/gemini-3.1-pro-preview
Gemini 3.1 Pro Preview: fast, efficient language model. Request examples and parameters for MixRoute.
Gemini 3.1 Pro Preview is a fast, efficient language model from Google.
Call `gemini-3.1-pro-preview` through MixRoute's native Gemini endpoint; an OpenAI-compatible endpoint is also supported.
## Key capabilities
* Native Gemini API - Uses generateContent with content parts
* System instructions - Supports systemInstruction
* Generation control - Uses generationConfig
* OpenAI-compatible - Also works through Chat Completions
## Quick example
### Gemini native API
```bash theme={null}
curl "https://api.mixroute.ai/v1/models/gemini-3.1-pro-preview:generateContent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Explain quantum entanglement in simple terms."
}
]
}
],
"generationConfig": {
"temperature": 1,
"topP": 1
}
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-3.1-pro-preview:generateContent",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'contents': [{'role': 'user',
'parts': [{'text': 'Explain quantum entanglement in simple terms.'}]}],
'generationConfig': {'temperature': 1, 'topP': 1}},
)
print(response.json())
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.1-pro-preview",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gemini-3.1-pro-preview",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gemini-3.1-pro-preview",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Gemini native API
| Parameter | Type | Required | Description |
| ------------------- | ------ | -------- | ------------------------------------------------- |
| `contents` | array | Yes | Conversation content built from role and parts. |
| `systemInstruction` | object | No | System instruction with content parts. |
| `generationConfig` | object | No | Generation settings such as temperature and topP. |
| `safetySettings` | array | No | Content-safety settings. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gemini-3.1-pro-preview`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Gemini 3.1 Pro Preview Custom Tools
Source: https://docs.mixroute.ai/en/model-api/google/gemini-3.1-pro-preview-customtools
Gemini 3.1 Pro Preview Custom Tools: fast, efficient language model. Request examples and parameters for MixRoute.
Gemini 3.1 Pro Preview Custom Tools is a fast, efficient language model from Google.
Call `gemini-3.1-pro-preview-customtools` through MixRoute's native Gemini endpoint; an OpenAI-compatible endpoint is also supported.
## Key capabilities
* Native Gemini API - Uses generateContent with content parts
* System instructions - Supports systemInstruction
* Generation control - Uses generationConfig
* OpenAI-compatible - Also works through Chat Completions
## Quick example
### Gemini native API
```bash theme={null}
curl "https://api.mixroute.ai/v1/models/gemini-3.1-pro-preview-customtools:generateContent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Explain quantum entanglement in simple terms."
}
]
}
],
"generationConfig": {
"temperature": 1,
"topP": 1
}
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-3.1-pro-preview-customtools:generateContent",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'contents': [{'role': 'user',
'parts': [{'text': 'Explain quantum entanglement in simple terms.'}]}],
'generationConfig': {'temperature': 1, 'topP': 1}},
)
print(response.json())
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.1-pro-preview-customtools",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gemini-3.1-pro-preview-customtools",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gemini-3.1-pro-preview-customtools",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Gemini native API
| Parameter | Type | Required | Description |
| ------------------- | ------ | -------- | ------------------------------------------------- |
| `contents` | array | Yes | Conversation content built from role and parts. |
| `systemInstruction` | object | No | System instruction with content parts. |
| `generationConfig` | object | No | Generation settings such as temperature and topP. |
| `safetySettings` | array | No | Content-safety settings. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gemini-3.1-pro-preview-customtools`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Gemini 3.5 Flash
Source: https://docs.mixroute.ai/en/model-api/google/gemini-3.5-flash
Gemini 3.5 Flash: fast, efficient language model. Request examples and parameters for MixRoute.
Gemini 3.5 Flash is a fast, efficient language model from Google.
Call `gemini-3.5-flash` through MixRoute's native Gemini endpoint; an OpenAI-compatible endpoint is also supported.
## Key capabilities
* Native Gemini API - Uses generateContent with content parts
* System instructions - Supports systemInstruction
* Generation control - Uses generationConfig
* OpenAI-compatible - Also works through Chat Completions
## Quick example
### Gemini native API
```bash theme={null}
curl "https://api.mixroute.ai/v1/models/gemini-3.5-flash:generateContent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Explain quantum entanglement in simple terms."
}
]
}
],
"generationConfig": {
"temperature": 1,
"topP": 1
}
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-3.5-flash:generateContent",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'contents': [{'role': 'user',
'parts': [{'text': 'Explain quantum entanglement in simple terms.'}]}],
'generationConfig': {'temperature': 1, 'topP': 1}},
)
print(response.json())
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.5-flash",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gemini-3.5-flash",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gemini-3.5-flash",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Gemini native API
| Parameter | Type | Required | Description |
| ------------------- | ------ | -------- | ------------------------------------------------- |
| `contents` | array | Yes | Conversation content built from role and parts. |
| `systemInstruction` | object | No | System instruction with content parts. |
| `generationConfig` | object | No | Generation settings such as temperature and topP. |
| `safetySettings` | array | No | Content-safety settings. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gemini-3.5-flash`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Gemini 3.5 Flash Lite
Source: https://docs.mixroute.ai/en/model-api/google/gemini-3.5-flash-lite
Gemini 3.5 Flash Lite: fast, efficient language model. Request examples and parameters for MixRoute.
Gemini 3.5 Flash Lite is a fast, efficient language model from Google.
Call `gemini-3.5-flash-lite` through MixRoute's native Gemini endpoint; an OpenAI-compatible endpoint is also supported.
## Key capabilities
* Native Gemini API - Uses generateContent with content parts
* System instructions - Supports systemInstruction
* Generation control - Uses generationConfig
* OpenAI-compatible - Also works through Chat Completions
## Quick example
### Gemini native API
```bash theme={null}
curl "https://api.mixroute.ai/v1/models/gemini-3.5-flash-lite:generateContent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Explain quantum entanglement in simple terms."
}
]
}
],
"generationConfig": {
"maxOutputTokens": 256
}
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-3.5-flash-lite:generateContent",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'contents': [{'role': 'user',
'parts': [{'text': 'Explain quantum entanglement in simple terms.'}]}],
'generationConfig': {'maxOutputTokens': 256}},
)
print(response.json())
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.5-flash-lite",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gemini-3.5-flash-lite",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gemini-3.5-flash-lite",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Gemini native API
| Parameter | Type | Required | Description |
| ------------------- | ------ | -------- | --------------------------------------------------------------- |
| `contents` | array | Yes | Conversation content built from role and parts. |
| `systemInstruction` | object | No | System instruction with content parts. |
| `generationConfig` | object | No | Output and response-generation settings supported by the model. |
| `safetySettings` | array | No | Content-safety settings. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------ | --------------- | -------- | -------------------------------------------- |
| `model` | string | Yes | Must be `gemini-3.5-flash-lite`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Gemini 3.6 Flash
Source: https://docs.mixroute.ai/en/model-api/google/gemini-3.6-flash
Gemini 3.6 Flash: fast, efficient language model. Request examples and parameters for MixRoute.
Gemini 3.6 Flash is a fast, efficient language model from Google.
Call `gemini-3.6-flash` through MixRoute's native Gemini endpoint; an OpenAI-compatible endpoint is also supported.
## Key capabilities
* Native Gemini API - Uses generateContent with content parts
* System instructions - Supports systemInstruction
* Generation control - Uses generationConfig
* OpenAI-compatible - Also works through Chat Completions
## Quick example
### Gemini native API
```bash theme={null}
curl "https://api.mixroute.ai/v1/models/gemini-3.6-flash:generateContent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Explain quantum entanglement in simple terms."
}
]
}
],
"generationConfig": {
"maxOutputTokens": 256
}
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-3.6-flash:generateContent",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'contents': [{'role': 'user',
'parts': [{'text': 'Explain quantum entanglement in simple terms.'}]}],
'generationConfig': {'maxOutputTokens': 256}},
)
print(response.json())
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.6-flash",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gemini-3.6-flash",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gemini-3.6-flash",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Gemini native API
| Parameter | Type | Required | Description |
| ------------------- | ------ | -------- | --------------------------------------------------------------- |
| `contents` | array | Yes | Conversation content built from role and parts. |
| `systemInstruction` | object | No | System instruction with content parts. |
| `generationConfig` | object | No | Output and response-generation settings supported by the model. |
| `safetySettings` | array | No | Content-safety settings. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------ | --------------- | -------- | -------------------------------------------- |
| `model` | string | Yes | Must be `gemini-3.6-flash`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Gemini 3.7 Flash
Source: https://docs.mixroute.ai/en/model-api/google/gemini-3.7-flash
Gemini 3.7 Flash: stable multimodal reasoning model for coding and agentic workflows. Native Gemini and OpenAI-compatible examples for MixRoute.
Gemini 3.7 Flash is Google's stable, natively multimodal reasoning model for complex coding, agentic workflows, and reliable multi-step execution.
Call `gemini-3.7-flash` through MixRoute's native Gemini endpoint; an OpenAI-compatible endpoint is also supported.
## Key capabilities
* Native multimodality - Accepts text, image, video, audio, and PDF input and returns text
* Long context - Supports up to 1,048,576 input tokens and 65,536 output tokens
* Reasoning and tools - Supports thinking, function calling, and structured output
* Native Gemini API - Uses generateContent with content parts
* OpenAI-compatible - Also works through Chat Completions
## Quick example
### Gemini native API
```bash theme={null}
curl "https://api.mixroute.ai/v1/models/gemini-3.7-flash:generateContent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Explain quantum entanglement in simple terms."
}
]
}
],
"generationConfig": {
"maxOutputTokens": 256
}
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-3.7-flash:generateContent",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'contents': [{'role': 'user',
'parts': [{'text': 'Explain quantum entanglement in simple terms.'}]}],
'generationConfig': {'maxOutputTokens': 256}},
)
print(response.json())
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.7-flash",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gemini-3.7-flash",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gemini-3.7-flash",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Gemini native API
| Parameter | Type | Required | Description |
| ------------------- | ------ | -------- | --------------------------------------------------------------- |
| `contents` | array | Yes | Conversation content built from role and parts. |
| `systemInstruction` | object | No | System instruction with content parts. |
| `generationConfig` | object | No | Output and response-generation settings supported by the model. |
| `safetySettings` | array | No | Content-safety settings. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------ | --------------- | -------- | -------------------------------------------- |
| `model` | string | Yes | Must be `gemini-3.7-flash`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Gemini 3.8 Flash
Source: https://docs.mixroute.ai/en/model-api/google/gemini-3.8-flash
Gemini 3.8 Flash: stable 1M-context model for long-horizon software engineering, autonomous agents, and enterprise workflows.
Gemini 3.8 Flash is Google's most intelligent Flash model, built for long-horizon software engineering, autonomous agents, and complex enterprise workflows.
Call `gemini-3.8-flash` through MixRoute's native Gemini endpoint; an OpenAI-compatible endpoint is also supported.
## Key capabilities
* Native multimodality - Accepts text, image, video, audio, and PDF input and returns text
* Long context - Supports up to 1,048,576 input tokens and 65,536 output tokens
* Tunable reasoning - Supports low, medium, and high thinking levels
* Agent tools - Supports function calling, structured output, code execution, Search grounding, and preview computer use
* Dual API support - Works through native Gemini generateContent and OpenAI-compatible Chat Completions
## Quick example
### Gemini native API
```bash theme={null}
curl "https://api.mixroute.ai/v1/models/gemini-3.8-flash:generateContent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Explain quantum entanglement in simple terms."
}
]
}
],
"generationConfig": {
"maxOutputTokens": 256
}
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-3.8-flash:generateContent",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'contents': [{'role': 'user',
'parts': [{'text': 'Explain quantum entanglement in simple terms.'}]}],
'generationConfig': {'maxOutputTokens': 256}},
)
print(response.json())
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.8-flash",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gemini-3.8-flash",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gemini-3.8-flash",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Gemini native API
| Parameter | Type | Required | Description |
| ------------------- | ------ | -------- | --------------------------------------------------------------- |
| `contents` | array | Yes | Conversation content built from role and parts. |
| `systemInstruction` | object | No | System instruction with content parts. |
| `generationConfig` | object | No | Output and response-generation settings supported by the model. |
| `safetySettings` | array | No | Content-safety settings. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------ | --------------- | -------- | -------------------------------------------- |
| `model` | string | Yes | Must be `gemini-3.8-flash`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
## Vendor reference
* [Gemini 3.8 Flash documentation](https://ai.google.dev/gemini-api/docs/models/gemini-3.8-flash)
# Gemini Embedding 001
Source: https://docs.mixroute.ai/en/model-api/google/gemini-embedding-001
Gemini Embedding 001: text embedding model. Request examples and parameters for MixRoute.
Gemini Embedding 001 is a text embedding model from Google.
Call `gemini-embedding-001` through MixRoute's native Gemini endpoint; an OpenAI-compatible endpoint is also supported.
## Key capabilities
* Gemini embedContent - Native Gemini embedding endpoint
* Vector embeddings - Convert text into numeric vectors
* Batch input - Accept a string or an array of strings
* Similarity workflows - Use vectors for search and clustering
## Quick example
### Gemini embedContent
```bash theme={null}
curl "https://api.mixroute.ai/v1/models/gemini-embedding-001:embedContent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": {
"parts": [
{
"text": "MixRoute model API"
}
]
}
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-embedding-001:embedContent",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'content': {'parts': [{'text': 'MixRoute model API'}]}},
)
print(response.json())
```
### OpenAI-compatible Embeddings
```bash theme={null}
curl "https://api.mixroute.ai/v1/embeddings" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-embedding-001",
"input": "MixRoute model API"
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/embeddings",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'model': 'gemini-embedding-001', 'input': 'MixRoute model API'},
)
print(response.json())
```
## Parameters
### Gemini embedContent
| Parameter | Type | Required | Description |
| ---------------------- | ------- | -------- | ------------------------------------------- |
| `content` | object | Yes | Text content built from parts. |
| `taskType` | string | No | Embedding task type when supported. |
| `outputDimensionality` | integer | No | Requested output dimensions when supported. |
### OpenAI-compatible Embeddings
| Parameter | Type | Required | Description |
| ------------ | --------------- | -------- | ------------------------------------ |
| `model` | string | Yes | Must be `gemini-embedding-001`. |
| `input` | string \| array | Yes | Text to embed. |
| `dimensions` | integer | No | Requested dimensions when supported. |
# Gemini Embedding 2 Preview
Source: https://docs.mixroute.ai/en/model-api/google/gemini-embedding-2-preview
Gemini Embedding 2 Preview: text embedding model. Request examples and parameters for MixRoute.
Gemini Embedding 2 Preview is a text embedding model from Google.
Call `gemini-embedding-2-preview` through MixRoute's native Gemini endpoint; an OpenAI-compatible endpoint is also supported.
## Key capabilities
* Gemini embedContent - Native Gemini embedding endpoint
* Vector embeddings - Convert text into numeric vectors
* Batch input - Accept a string or an array of strings
* Similarity workflows - Use vectors for search and clustering
## Quick example
### Gemini embedContent
```bash theme={null}
curl "https://api.mixroute.ai/v1/models/gemini-embedding-2-preview:embedContent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": {
"parts": [
{
"text": "MixRoute model API"
}
]
}
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-embedding-2-preview:embedContent",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'content': {'parts': [{'text': 'MixRoute model API'}]}},
)
print(response.json())
```
### OpenAI-compatible Embeddings
```bash theme={null}
curl "https://api.mixroute.ai/v1/embeddings" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-embedding-2-preview",
"input": "MixRoute model API"
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/embeddings",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'model': 'gemini-embedding-2-preview', 'input': 'MixRoute model API'},
)
print(response.json())
```
## Parameters
### Gemini embedContent
| Parameter | Type | Required | Description |
| ---------------------- | ------- | -------- | ------------------------------------------- |
| `content` | object | Yes | Text content built from parts. |
| `taskType` | string | No | Embedding task type when supported. |
| `outputDimensionality` | integer | No | Requested output dimensions when supported. |
### OpenAI-compatible Embeddings
| Parameter | Type | Required | Description |
| ------------ | --------------- | -------- | ------------------------------------- |
| `model` | string | Yes | Must be `gemini-embedding-2-preview`. |
| `input` | string \| array | Yes | Text to embed. |
| `dimensions` | integer | No | Requested dimensions when supported. |
# Gemini Flash Latest
Source: https://docs.mixroute.ai/en/model-api/google/gemini-flash-latest
Gemini Flash Latest: fast, efficient language model. Request examples and parameters for MixRoute.
Gemini Flash Latest is a fast, efficient language model from Google.
Call `gemini-flash-latest` through MixRoute's native Gemini endpoint; an OpenAI-compatible endpoint is also supported.
## Key capabilities
* Native Gemini API - Uses generateContent with content parts
* System instructions - Supports systemInstruction
* Generation control - Uses generationConfig
* OpenAI-compatible - Also works through Chat Completions
## Quick example
### Gemini native API
```bash theme={null}
curl "https://api.mixroute.ai/v1/models/gemini-flash-latest:generateContent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Explain quantum entanglement in simple terms."
}
]
}
],
"generationConfig": {
"temperature": 1,
"topP": 1
}
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-flash-latest:generateContent",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'contents': [{'role': 'user',
'parts': [{'text': 'Explain quantum entanglement in simple terms.'}]}],
'generationConfig': {'temperature': 1, 'topP': 1}},
)
print(response.json())
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-flash-latest",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gemini-flash-latest",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gemini-flash-latest",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Gemini native API
| Parameter | Type | Required | Description |
| ------------------- | ------ | -------- | ------------------------------------------------- |
| `contents` | array | Yes | Conversation content built from role and parts. |
| `systemInstruction` | object | No | System instruction with content parts. |
| `generationConfig` | object | No | Generation settings such as temperature and topP. |
| `safetySettings` | array | No | Content-safety settings. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gemini-flash-latest`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Gemini Flash Lite Latest
Source: https://docs.mixroute.ai/en/model-api/google/gemini-flash-lite-latest
Gemini Flash Lite Latest: fast, efficient language model. Request examples and parameters for MixRoute.
Gemini Flash Lite Latest is a fast, efficient language model from Google.
Call `gemini-flash-lite-latest` through MixRoute's native Gemini endpoint; an OpenAI-compatible endpoint is also supported.
## Key capabilities
* Native Gemini API - Uses generateContent with content parts
* System instructions - Supports systemInstruction
* Generation control - Uses generationConfig
* OpenAI-compatible - Also works through Chat Completions
## Quick example
### Gemini native API
```bash theme={null}
curl "https://api.mixroute.ai/v1/models/gemini-flash-lite-latest:generateContent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Explain quantum entanglement in simple terms."
}
]
}
],
"generationConfig": {
"temperature": 1,
"topP": 1
}
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-flash-lite-latest:generateContent",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'contents': [{'role': 'user',
'parts': [{'text': 'Explain quantum entanglement in simple terms.'}]}],
'generationConfig': {'temperature': 1, 'topP': 1}},
)
print(response.json())
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-flash-lite-latest",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gemini-flash-lite-latest",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gemini-flash-lite-latest",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Gemini native API
| Parameter | Type | Required | Description |
| ------------------- | ------ | -------- | ------------------------------------------------- |
| `contents` | array | Yes | Conversation content built from role and parts. |
| `systemInstruction` | object | No | System instruction with content parts. |
| `generationConfig` | object | No | Generation settings such as temperature and topP. |
| `safetySettings` | array | No | Content-safety settings. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gemini-flash-lite-latest`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Gemini Omni 1.1 Flash
Source: https://docs.mixroute.ai/en/model-api/google/gemini-omni-1.1-flash
Gemini Omni 1.1 Flash: conversational video generation and editing from text, images, or video through MixRoute.
Gemini Omni 1.1 Flash is Google's high-performance model for fast, conversational video generation and editing.
MixRoute exposes `gemini-omni-1.1-flash` through the asynchronous Video Generations API.
Do not call this route with Chat Completions. Use `POST /v1/video/generations`. Advanced media-input and editing fields can vary at the MixRoute route level; check the Model Marketplace before relying on optional controls.
## Key capabilities
* Conversational video workflows - Supports generation, editing, extension, upscaling, and interpolation upstream
* Multimodal input - Accepts text, images, and source video up to 10 seconds for editing and extension
* Video output - Produces 3-10 second video at 24 FPS, from 360p through 4K
* Asynchronous MixRoute route - Submit a task and poll its task ID for completion
## Quick example
```bash theme={null}
curl -X POST "https://api.mixroute.ai/v1/video/generations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-omni-1.1-flash",
"prompt": "Create a six-second cinematic video of a paper city unfolding at sunrise."
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/video/generations",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"model": "gemini-omni-1.1-flash",
"prompt": "Create a six-second cinematic video of a paper city unfolding at sunrise.",
},
)
response.raise_for_status()
print(response.json())
```
## Workflow
1. Submit the task with `POST /v1/video/generations`.
2. Read the returned task ID.
3. Poll the result using [Query Video Task](/en/api-reference/endpoint/query-video-task).
## Parameters
| Parameter | Type | Required | Description |
| --------- | ------ | -------- | ---------------------------------------- |
| `model` | string | Yes | Model ID: `gemini-omni-1.1-flash`. |
| `prompt` | string | Yes | Video generation or editing instruction. |
# Gemini Pro Latest
Source: https://docs.mixroute.ai/en/model-api/google/gemini-pro-latest
Gemini Pro Latest: fast, efficient language model. Request examples and parameters for MixRoute.
Gemini Pro Latest is a fast, efficient language model from Google.
Call `gemini-pro-latest` through MixRoute's native Gemini endpoint; an OpenAI-compatible endpoint is also supported.
## Key capabilities
* Native Gemini API - Uses generateContent with content parts
* System instructions - Supports systemInstruction
* Generation control - Uses generationConfig
* OpenAI-compatible - Also works through Chat Completions
## Quick example
### Gemini native API
```bash theme={null}
curl "https://api.mixroute.ai/v1/models/gemini-pro-latest:generateContent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Explain quantum entanglement in simple terms."
}
]
}
],
"generationConfig": {
"temperature": 1,
"topP": 1
}
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/models/gemini-pro-latest:generateContent",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'contents': [{'role': 'user',
'parts': [{'text': 'Explain quantum entanglement in simple terms.'}]}],
'generationConfig': {'temperature': 1, 'topP': 1}},
)
print(response.json())
```
### OpenAI-compatible API
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-pro-latest",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gemini-pro-latest",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gemini-pro-latest",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Gemini native API
| Parameter | Type | Required | Description |
| ------------------- | ------ | -------- | ------------------------------------------------- |
| `contents` | array | Yes | Conversation content built from role and parts. |
| `systemInstruction` | object | No | System instruction with content parts. |
| `generationConfig` | object | No | Generation settings such as temperature and topP. |
| `safetySettings` | array | No | Content-safety settings. |
### OpenAI-compatible API
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gemini-pro-latest`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GPT-3.5 Turbo
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-3.5-turbo
GPT-3.5 Turbo: general-purpose language model. Request examples and parameters for MixRoute.
GPT-3.5 Turbo is a general-purpose language model from OpenAI.
Call `gpt-3.5-turbo` through both the OpenAI-compatible Chat Completions API and the Responses API.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
### Chat Completions
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-3.5-turbo",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gpt-3.5-turbo",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gpt-3.5-turbo",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
### Responses API
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-3.5-turbo",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-3.5-turbo",
input="Explain quantum entanglement in simple terms.",
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-3.5-turbo",
input="Write a short poem about the sea.",
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
## Parameters
### Chat Completions
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gpt-3.5-turbo`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
### Responses API
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------- |
| `model` | string | Yes | Must be `gpt-3.5-turbo`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
# GPT-3.5 Turbo 16K
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-3.5-turbo-16k
GPT-3.5 Turbo 16K: general-purpose language model. Request examples and parameters for MixRoute.
GPT-3.5 Turbo 16K is a general-purpose language model from OpenAI.
Call `gpt-3.5-turbo-16k` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-3.5-turbo-16k",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gpt-3.5-turbo-16k",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gpt-3.5-turbo-16k",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gpt-3.5-turbo-16k`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GPT-4
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-4
GPT-4: general-purpose language model. Request examples and parameters for MixRoute.
GPT-4 is a general-purpose language model from OpenAI.
Call `gpt-4` through both the OpenAI-compatible Chat Completions API and the Responses API.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
### Chat Completions
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
### Responses API
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-4",
input="Explain quantum entanglement in simple terms.",
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-4",
input="Write a short poem about the sea.",
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
## Parameters
### Chat Completions
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gpt-4`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
### Responses API
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------- |
| `model` | string | Yes | Must be `gpt-4`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
# GPT-4 Turbo
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-4-turbo
GPT-4 Turbo: general-purpose language model. Request examples and parameters for MixRoute.
GPT-4 Turbo is a general-purpose language model from OpenAI.
Call `gpt-4-turbo` through both the OpenAI-compatible Chat Completions API and the Responses API.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
### Chat Completions
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4-turbo",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gpt-4-turbo",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gpt-4-turbo",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
### Responses API
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4-turbo",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-4-turbo",
input="Explain quantum entanglement in simple terms.",
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-4-turbo",
input="Write a short poem about the sea.",
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
## Parameters
### Chat Completions
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gpt-4-turbo`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
### Responses API
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------- |
| `model` | string | Yes | Must be `gpt-4-turbo`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
# GPT-4.1
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-4.1
GPT-4.1: general-purpose language model. Request examples and parameters for MixRoute.
GPT-4.1 is a general-purpose language model from OpenAI.
Call `gpt-4.1` through both the OpenAI-compatible Chat Completions API and the Responses API.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
### Chat Completions
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4.1",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gpt-4.1",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gpt-4.1",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
### Responses API
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4.1",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-4.1",
input="Explain quantum entanglement in simple terms.",
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-4.1",
input="Write a short poem about the sea.",
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
## Parameters
### Chat Completions
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gpt-4.1`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
### Responses API
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------- |
| `model` | string | Yes | Must be `gpt-4.1`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
# GPT-4.1 Mini
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-4.1-mini
GPT-4.1 Mini: fast, efficient language model. Request examples and parameters for MixRoute.
GPT-4.1 Mini is a fast, efficient language model from OpenAI.
Call `gpt-4.1-mini` through both the OpenAI-compatible Chat Completions API and the Responses API.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
### Chat Completions
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4.1-mini",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gpt-4.1-mini",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gpt-4.1-mini",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
### Responses API
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4.1-mini",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-4.1-mini",
input="Explain quantum entanglement in simple terms.",
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-4.1-mini",
input="Write a short poem about the sea.",
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
## Parameters
### Chat Completions
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gpt-4.1-mini`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
### Responses API
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------- |
| `model` | string | Yes | Must be `gpt-4.1-mini`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
# GPT-4.1 Nano
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-4.1-nano
GPT-4.1 Nano: fast, efficient language model. Request examples and parameters for MixRoute.
GPT-4.1 Nano is a fast, efficient language model from OpenAI.
Call `gpt-4.1-nano` through both the OpenAI-compatible Chat Completions API and the Responses API.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
### Chat Completions
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4.1-nano",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gpt-4.1-nano",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gpt-4.1-nano",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
### Responses API
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4.1-nano",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-4.1-nano",
input="Explain quantum entanglement in simple terms.",
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-4.1-nano",
input="Write a short poem about the sea.",
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
## Parameters
### Chat Completions
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gpt-4.1-nano`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
### Responses API
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------- |
| `model` | string | Yes | Must be `gpt-4.1-nano`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
# GPT-4o
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-4o
GPT-4o: general-purpose language model. Request examples and parameters for MixRoute.
GPT-4o is a general-purpose language model from OpenAI.
Call `gpt-4o` through both the OpenAI-compatible Chat Completions API and the Responses API.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
### Chat Completions
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
### Responses API
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-4o",
input="Explain quantum entanglement in simple terms.",
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-4o",
input="Write a short poem about the sea.",
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
## Parameters
### Chat Completions
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gpt-4o`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
### Responses API
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------- |
| `model` | string | Yes | Must be `gpt-4o`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
# GPT-4o Mini
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-4o-mini
GPT-4o Mini: fast, efficient language model. Request examples and parameters for MixRoute.
GPT-4o Mini is a fast, efficient language model from OpenAI.
Call `gpt-4o-mini` through both the OpenAI-compatible Chat Completions API and the Responses API.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
### Chat Completions
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
### Responses API
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-4o-mini",
input="Explain quantum entanglement in simple terms.",
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-4o-mini",
input="Write a short poem about the sea.",
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
## Parameters
### Chat Completions
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gpt-4o-mini`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
### Responses API
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------- |
| `model` | string | Yes | Must be `gpt-4o-mini`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
# GPT-4o Mini Transcribe
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-4o-mini-transcribe
GPT-4o Mini Transcribe: speech-to-text model. Request examples and parameters for MixRoute.
GPT-4o Mini Transcribe is a speech-to-text model from OpenAI.
Call `gpt-4o-mini-transcribe` through MixRoute using the endpoint shown below.
## Key capabilities
* Speech-to-text - Transcribe an uploaded audio file
* Multipart upload - Sends the source file as form data
* Output formats - Supports model-specific response formats
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/audio/transcriptions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@speech.wav" \
-F "model=gpt-4o-mini-transcribe"
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with open("speech.wav", "rb") as audio_file:
transcript = client.audio.transcriptions.create(
model="gpt-4o-mini-transcribe",
file=audio_file,
)
print(transcript.text)
```
## Parameters
| Parameter | Type | Required | Description |
| ----------------- | ------ | -------- | ------------------------------------------- |
| `file` | file | Yes | Audio file uploaded as multipart form data. |
| `model` | string | Yes | Must be `gpt-4o-mini-transcribe`. |
| `language` | string | No | Input language code when supported. |
| `prompt` | string | No | Optional text that guides transcription. |
| `response_format` | string | No | Transcription response format. |
# GPT-4o Mini TTS
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-4o-mini-tts
GPT-4o Mini TTS: text-to-speech model. Request examples and parameters for MixRoute.
GPT-4o Mini TTS is a text-to-speech model from OpenAI.
Call `gpt-4o-mini-tts` through MixRoute using the endpoint shown below.
## Key capabilities
* Text-to-speech - Convert text into generated audio
* Voice selection - Configure a prebuilt voice
* Audio output - Returns generated speech data
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/audio/speech" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini-tts",
"voice": "alloy",
"input": "Welcome to MixRoute.",
"response_format": "wav"
}' \
--output speech.wav
```
```python theme={null}
from pathlib import Path
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.audio.speech.with_streaming_response.create(
model="gpt-4o-mini-tts",
voice="alloy",
input="Welcome to MixRoute.",
response_format="wav",
) as response:
response.stream_to_file(Path("speech.wav"))
```
## Parameters
| Parameter | Type | Required | Description |
| ----------------- | ------ | -------- | --------------------------------- |
| `model` | string | Yes | Must be `gpt-4o-mini-tts`. |
| `input` | string | Yes | Text to synthesize. |
| `voice` | string | Yes | Voice used for speech generation. |
| `response_format` | string | No | Audio output format. |
# GPT-4o Transcribe
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-4o-transcribe
GPT-4o Transcribe: speech-to-text model. Request examples and parameters for MixRoute.
GPT-4o Transcribe is a speech-to-text model from OpenAI.
Call `gpt-4o-transcribe` through MixRoute using the endpoint shown below.
## Key capabilities
* Speech-to-text - Transcribe an uploaded audio file
* Multipart upload - Sends the source file as form data
* Output formats - Supports model-specific response formats
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/audio/transcriptions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@speech.wav" \
-F "model=gpt-4o-transcribe"
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with open("speech.wav", "rb") as audio_file:
transcript = client.audio.transcriptions.create(
model="gpt-4o-transcribe",
file=audio_file,
)
print(transcript.text)
```
## Parameters
| Parameter | Type | Required | Description |
| ----------------- | ------ | -------- | ------------------------------------------- |
| `file` | file | Yes | Audio file uploaded as multipart form data. |
| `model` | string | Yes | Must be `gpt-4o-transcribe`. |
| `language` | string | No | Input language code when supported. |
| `prompt` | string | No | Optional text that guides transcription. |
| `response_format` | string | No | Transcription response format. |
# GPT-4o Transcribe Diarize
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-4o-transcribe-diarize
GPT-4o Transcribe Diarize: speech transcription model with speaker diarization. Request examples and parameters for MixRoute.
GPT-4o Transcribe Diarize is a speech transcription model with speaker diarization from OpenAI.
Call `gpt-4o-transcribe-diarize` through MixRoute using the endpoint shown below.
## Key capabilities
* Speech-to-text - Transcribe an uploaded audio file
* Multipart upload - Sends the source file as form data
* Output formats - Supports model-specific response formats
* Speaker diarization - Labels who spoke in each segment
* Segment timestamps - Returns start and end times for each speaker turn
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/audio/transcriptions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@speech.wav" \
-F "model=gpt-4o-transcribe-diarize" \
-F "response_format=diarized_json" \
-F "chunking_strategy=auto"
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with open("speech.wav", "rb") as audio_file:
transcript = client.audio.transcriptions.create(
model="gpt-4o-transcribe-diarize",
file=audio_file,
response_format="diarized_json",
chunking_strategy="auto",
)
print(transcript)
```
## Parameters
| Parameter | Type | Required | Description |
| ------------------- | ---------------- | -------- | --------------------------------------------------------- |
| `file` | file | Yes | Audio file uploaded as multipart form data. |
| `model` | string | Yes | Must be `gpt-4o-transcribe-diarize`. |
| `language` | string | No | Input language code when supported. |
| `prompt` | string | No | Optional text that guides transcription. |
| `response_format` | string | Yes | Set to diarized\_json to return speaker-labeled segments. |
| `chunking_strategy` | string \| object | No | Use auto or provide a custom audio chunking strategy. |
# GPT-5
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-5
GPT-5: reasoning and coding model. Request examples and parameters for MixRoute.
GPT-5 is a reasoning and coding model from OpenAI.
Call `gpt-5` through both the OpenAI-compatible Chat Completions API and the Responses API.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
### Responses API
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "low"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-5",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "low"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-5",
input="Write a short poem about the sea.",
reasoning={"effort": "low"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
### Chat Completions
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_completion_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gpt-5",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_completion_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gpt-5",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_completion_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Responses API
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------ |
| `model` | string | Yes | Must be `gpt-5`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration, including effort. |
| `text` | object | No | Text format and verbosity controls. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
### Chat Completions
| Parameter | Type | Required | Description |
| ----------------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gpt-5`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_completion_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GPT-5 Codex
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-5-codex
GPT-5 Codex: coding and software engineering model. Request examples and parameters for MixRoute.
GPT-5 Codex is a coding and software engineering model from OpenAI.
Call `gpt-5-codex` through MixRoute using the endpoint shown below.
## Key capabilities
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5-codex",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "low"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-5-codex",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "low"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-5-codex",
input="Write a short poem about the sea.",
reasoning={"effort": "low"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------ |
| `model` | string | Yes | Must be `gpt-5-codex`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration, including effort. |
| `text` | object | No | Text format and verbosity controls. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
# GPT-5 Mini
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-5-mini
GPT-5 Mini: reasoning and coding model. Request examples and parameters for MixRoute.
GPT-5 Mini is a reasoning and coding model from OpenAI.
Call `gpt-5-mini` through both the OpenAI-compatible Chat Completions API and the Responses API.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
### Responses API
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5-mini",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "low"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-5-mini",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "low"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-5-mini",
input="Write a short poem about the sea.",
reasoning={"effort": "low"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
### Chat Completions
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5-mini",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_completion_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gpt-5-mini",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_completion_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gpt-5-mini",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_completion_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Responses API
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------ |
| `model` | string | Yes | Must be `gpt-5-mini`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration, including effort. |
| `text` | object | No | Text format and verbosity controls. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
### Chat Completions
| Parameter | Type | Required | Description |
| ----------------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gpt-5-mini`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_completion_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GPT-5 Nano
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-5-nano
GPT-5 Nano: reasoning and coding model. Request examples and parameters for MixRoute.
GPT-5 Nano is a reasoning and coding model from OpenAI.
Call `gpt-5-nano` through both the OpenAI-compatible Chat Completions API and the Responses API.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
### Responses API
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5-nano",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "low"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-5-nano",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "low"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-5-nano",
input="Write a short poem about the sea.",
reasoning={"effort": "low"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
### Chat Completions
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5-nano",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_completion_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gpt-5-nano",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_completion_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gpt-5-nano",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_completion_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Responses API
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------ |
| `model` | string | Yes | Must be `gpt-5-nano`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration, including effort. |
| `text` | object | No | Text format and verbosity controls. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
### Chat Completions
| Parameter | Type | Required | Description |
| ----------------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gpt-5-nano`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_completion_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GPT-5 Pro
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-5-pro
GPT-5 Pro: reasoning and coding model. Request examples and parameters for MixRoute.
GPT-5 Pro is a reasoning and coding model from OpenAI.
Call `gpt-5-pro` through MixRoute using the endpoint shown below.
## Key capabilities
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5-pro",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "high"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-5-pro",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "high"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-5-pro",
input="Write a short poem about the sea.",
reasoning={"effort": "high"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------ |
| `model` | string | Yes | Must be `gpt-5-pro`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration, including effort. |
| `text` | object | No | Text format and verbosity controls. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
# GPT-5.1
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-5.1
GPT-5.1: reasoning and coding model. Request examples and parameters for MixRoute.
GPT-5.1 is a reasoning and coding model from OpenAI.
Call `gpt-5.1` through both the OpenAI-compatible Chat Completions API and the Responses API.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
### Responses API
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.1",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "low"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-5.1",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "low"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-5.1",
input="Write a short poem about the sea.",
reasoning={"effort": "low"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
### Chat Completions
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.1",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_completion_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gpt-5.1",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_completion_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gpt-5.1",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_completion_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Responses API
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------ |
| `model` | string | Yes | Must be `gpt-5.1`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration, including effort. |
| `text` | object | No | Text format and verbosity controls. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
### Chat Completions
| Parameter | Type | Required | Description |
| ----------------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gpt-5.1`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_completion_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GPT-5.1 Chat Latest
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-5.1-chat-latest
GPT-5.1 Chat Latest: reasoning and coding model. Request examples and parameters for MixRoute.
GPT-5.1 Chat Latest is a reasoning and coding model from OpenAI.
Call `gpt-5.1-chat-latest` through both the OpenAI-compatible Chat Completions API and the Responses API.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
### Responses API
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.1-chat-latest",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "medium"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-5.1-chat-latest",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "medium"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-5.1-chat-latest",
input="Write a short poem about the sea.",
reasoning={"effort": "medium"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
### Chat Completions
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.1-chat-latest",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_completion_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gpt-5.1-chat-latest",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_completion_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gpt-5.1-chat-latest",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_completion_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Responses API
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------ |
| `model` | string | Yes | Must be `gpt-5.1-chat-latest`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration, including effort. |
| `text` | object | No | Text format and verbosity controls. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
### Chat Completions
| Parameter | Type | Required | Description |
| ----------------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gpt-5.1-chat-latest`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_completion_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GPT-5.1 Codex
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-5.1-codex
GPT-5.1 Codex: coding and software engineering model. Request examples and parameters for MixRoute.
GPT-5.1 Codex is a coding and software engineering model from OpenAI.
Call `gpt-5.1-codex` through MixRoute using the endpoint shown below.
## Key capabilities
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.1-codex",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "low"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-5.1-codex",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "low"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-5.1-codex",
input="Write a short poem about the sea.",
reasoning={"effort": "low"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------ |
| `model` | string | Yes | Must be `gpt-5.1-codex`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration, including effort. |
| `text` | object | No | Text format and verbosity controls. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
# GPT-5.1 Codex Max
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-5.1-codex-max
GPT-5.1 Codex Max: coding and software engineering model. Request examples and parameters for MixRoute.
GPT-5.1 Codex Max is a coding and software engineering model from OpenAI.
Call `gpt-5.1-codex-max` through MixRoute using the endpoint shown below.
## Key capabilities
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.1-codex-max",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "low"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-5.1-codex-max",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "low"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-5.1-codex-max",
input="Write a short poem about the sea.",
reasoning={"effort": "low"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------ |
| `model` | string | Yes | Must be `gpt-5.1-codex-max`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration, including effort. |
| `text` | object | No | Text format and verbosity controls. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
# GPT-5.1 Codex Mini
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-5.1-codex-mini
GPT-5.1 Codex Mini: coding and software engineering model. Request examples and parameters for MixRoute.
GPT-5.1 Codex Mini is a coding and software engineering model from OpenAI.
Call `gpt-5.1-codex-mini` through MixRoute using the endpoint shown below.
## Key capabilities
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.1-codex-mini",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "low"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-5.1-codex-mini",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "low"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-5.1-codex-mini",
input="Write a short poem about the sea.",
reasoning={"effort": "low"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------ |
| `model` | string | Yes | Must be `gpt-5.1-codex-mini`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration, including effort. |
| `text` | object | No | Text format and verbosity controls. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
# GPT-5.2
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-5.2
GPT-5.2: reasoning and coding model. Request examples and parameters for MixRoute.
GPT-5.2 is a reasoning and coding model from OpenAI.
Call `gpt-5.2` through both the OpenAI-compatible Chat Completions API and the Responses API.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
### Responses API
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.2",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "low"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-5.2",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "low"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-5.2",
input="Write a short poem about the sea.",
reasoning={"effort": "low"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
### Chat Completions
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.2",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_completion_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gpt-5.2",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_completion_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gpt-5.2",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_completion_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Responses API
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------ |
| `model` | string | Yes | Must be `gpt-5.2`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration, including effort. |
| `text` | object | No | Text format and verbosity controls. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
### Chat Completions
| Parameter | Type | Required | Description |
| ----------------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gpt-5.2`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_completion_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GPT-5.2 Chat Latest
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-5.2-chat-latest
GPT-5.2 Chat Latest: reasoning and coding model. Request examples and parameters for MixRoute.
GPT-5.2 Chat Latest is a reasoning and coding model from OpenAI.
Call `gpt-5.2-chat-latest` through both the OpenAI-compatible Chat Completions API and the Responses API.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
### Responses API
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.2-chat-latest",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "low"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-5.2-chat-latest",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "low"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-5.2-chat-latest",
input="Write a short poem about the sea.",
reasoning={"effort": "low"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
### Chat Completions
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.2-chat-latest",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_completion_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gpt-5.2-chat-latest",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_completion_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gpt-5.2-chat-latest",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_completion_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Responses API
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------ |
| `model` | string | Yes | Must be `gpt-5.2-chat-latest`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration, including effort. |
| `text` | object | No | Text format and verbosity controls. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
### Chat Completions
| Parameter | Type | Required | Description |
| ----------------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gpt-5.2-chat-latest`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_completion_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GPT-5.2 Codex
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-5.2-codex
GPT-5.2 Codex: coding and software engineering model. Request examples and parameters for MixRoute.
GPT-5.2 Codex is a coding and software engineering model from OpenAI.
Call `gpt-5.2-codex` through MixRoute using the endpoint shown below.
## Key capabilities
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.2-codex",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "low"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-5.2-codex",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "low"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-5.2-codex",
input="Write a short poem about the sea.",
reasoning={"effort": "low"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------ |
| `model` | string | Yes | Must be `gpt-5.2-codex`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration, including effort. |
| `text` | object | No | Text format and verbosity controls. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
# GPT-5.2 Pro
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-5.2-pro
GPT-5.2 Pro: reasoning and coding model. Request examples and parameters for MixRoute.
GPT-5.2 Pro is a reasoning and coding model from OpenAI.
Call `gpt-5.2-pro` through MixRoute using the endpoint shown below.
## Key capabilities
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.2-pro",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "medium"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-5.2-pro",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "medium"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-5.2-pro",
input="Write a short poem about the sea.",
reasoning={"effort": "medium"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------ |
| `model` | string | Yes | Must be `gpt-5.2-pro`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration, including effort. |
| `text` | object | No | Text format and verbosity controls. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
# GPT-5.3 Codex
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-5.3-codex
GPT-5.3 Codex: coding and software engineering model. Request examples and parameters for MixRoute.
GPT-5.3 Codex is a coding and software engineering model from OpenAI.
Call `gpt-5.3-codex` through MixRoute using the endpoint shown below.
## Key capabilities
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.3-codex",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "low"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-5.3-codex",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "low"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-5.3-codex",
input="Write a short poem about the sea.",
reasoning={"effort": "low"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------ |
| `model` | string | Yes | Must be `gpt-5.3-codex`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration, including effort. |
| `text` | object | No | Text format and verbosity controls. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
# GPT-5.4
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-5.4
GPT-5.4: reasoning and coding model. Request examples and parameters for MixRoute.
GPT-5.4 is a reasoning and coding model from OpenAI.
Call `gpt-5.4` through both the OpenAI-compatible Chat Completions API and the Responses API.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
### Responses API
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.4",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "low"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-5.4",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "low"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-5.4",
input="Write a short poem about the sea.",
reasoning={"effort": "low"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
### Chat Completions
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.4",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_completion_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gpt-5.4",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_completion_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gpt-5.4",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_completion_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Responses API
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------ |
| `model` | string | Yes | Must be `gpt-5.4`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration, including effort. |
| `text` | object | No | Text format and verbosity controls. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
### Chat Completions
| Parameter | Type | Required | Description |
| ----------------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gpt-5.4`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_completion_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GPT-5.4 Mini
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-5.4-mini
GPT-5.4 Mini: reasoning and coding model. Request examples and parameters for MixRoute.
GPT-5.4 Mini is a reasoning and coding model from OpenAI.
Call `gpt-5.4-mini` through both the OpenAI-compatible Chat Completions API and the Responses API.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
### Responses API
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.4-mini",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "low"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-5.4-mini",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "low"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-5.4-mini",
input="Write a short poem about the sea.",
reasoning={"effort": "low"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
### Chat Completions
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.4-mini",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_completion_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gpt-5.4-mini",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_completion_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gpt-5.4-mini",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_completion_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Responses API
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------ |
| `model` | string | Yes | Must be `gpt-5.4-mini`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration, including effort. |
| `text` | object | No | Text format and verbosity controls. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
### Chat Completions
| Parameter | Type | Required | Description |
| ----------------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gpt-5.4-mini`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_completion_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GPT-5.4 Nano
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-5.4-nano
GPT-5.4 Nano: low-cost reasoning model for simple, high-volume tasks.
GPT-5.4 Nano is OpenAI's cheapest GPT-5.4-class model for classification, extraction, ranking, and high-volume subagent tasks.
Call `gpt-5.4-nano` through MixRoute using the endpoint below.
## Key capabilities
* 400K context window - Supports substantial input context
* 128K maximum output - Handles long structured results
* Reasoning control - Supports none, low, medium, high, and xhigh
* Responses and Chat Completions - Available through both interfaces
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.4-nano",
"input": "Classify this request and return a short JSON result.",
"reasoning": {"effort": "low"},
"max_output_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-5.4-nano",
input="Classify this request and return a short JSON result.",
reasoning={"effort": "low"},
max_output_tokens=256,
)
print(response.output_text)
```
## Parameters
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------ |
| `model` | string | Yes | Model ID. Must be `gpt-5.4-nano`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `reasoning` | object | No | Reasoning configuration, including effort. |
| `stream` | boolean | No | Enable SSE streaming. |
| `tools` | array | No | Tools available to the model. |
## Vendor reference
* [OpenAI GPT-5.4 Nano model page](https://developers.openai.com/api/docs/models/gpt-5.4-nano)
# GPT-5.4 Pro
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-5.4-pro
GPT-5.4 Pro: reasoning and coding model. Request examples and parameters for MixRoute.
GPT-5.4 Pro is a reasoning and coding model from OpenAI.
Call `gpt-5.4-pro` through MixRoute using the endpoint shown below.
## Key capabilities
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.4-pro",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "high"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-5.4-pro",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "high"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-5.4-pro",
input="Write a short poem about the sea.",
reasoning={"effort": "high"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------ |
| `model` | string | Yes | Must be `gpt-5.4-pro`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration, including effort. |
| `text` | object | No | Text format and verbosity controls. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
# GPT-5.5
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-5.5
GPT-5.5: reasoning and coding model. Request examples and parameters for MixRoute.
GPT-5.5 is a reasoning and coding model from OpenAI.
Call `gpt-5.5` through both the OpenAI-compatible Chat Completions API and the Responses API.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
### Responses API
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.5",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "low"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-5.5",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "low"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-5.5",
input="Write a short poem about the sea.",
reasoning={"effort": "low"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
### Chat Completions
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.5",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_completion_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gpt-5.5",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_completion_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gpt-5.5",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_completion_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Responses API
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------ |
| `model` | string | Yes | Must be `gpt-5.5`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration, including effort. |
| `text` | object | No | Text format and verbosity controls. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
### Chat Completions
| Parameter | Type | Required | Description |
| ----------------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gpt-5.5`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_completion_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GPT-5.6 Luna
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-5.6-luna
GPT-5.6 Luna: fast, cost-efficient reasoning and coding model. Request examples and parameters for MixRoute.
GPT-5.6 Luna is a fast, cost-efficient reasoning and coding model from OpenAI.
Call `gpt-5.6-luna` through both the OpenAI-compatible Chat Completions API and the Responses API.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
* Max reasoning - Supports none, low, medium, high, xhigh, and max effort
* Pro mode - Use reasoning.mode in the Responses API for quality-first work
## Quick example
### Responses API
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.6-luna",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "medium"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-5.6-luna",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "medium"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-5.6-luna",
input="Write a short poem about the sea.",
reasoning={"effort": "medium"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
### Chat Completions
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.6-luna",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_completion_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gpt-5.6-luna",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_completion_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gpt-5.6-luna",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_completion_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Responses API
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `model` | string | Yes | Must be `gpt-5.6-luna`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration. effort supports none, low, medium, high, xhigh, and max; set mode to pro for quality-first execution. |
| `text` | object | No | Text format and verbosity controls. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
### Chat Completions
| Parameter | Type | Required | Description |
| ----------------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gpt-5.6-luna`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_completion_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GPT-5.6 Sol
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-5.6-sol
GPT-5.6 Sol: flagship reasoning and coding model. Request examples and parameters for MixRoute.
GPT-5.6 Sol is a flagship reasoning and coding model from OpenAI.
Call `gpt-5.6-sol` through both the OpenAI-compatible Chat Completions API and the Responses API.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
* Max reasoning - Supports none, low, medium, high, xhigh, and max effort
* Pro mode - Use reasoning.mode in the Responses API for quality-first work
## Quick example
### Responses API
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.6-sol",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "medium"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-5.6-sol",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "medium"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-5.6-sol",
input="Write a short poem about the sea.",
reasoning={"effort": "medium"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
### Chat Completions
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.6-sol",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_completion_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gpt-5.6-sol",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_completion_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gpt-5.6-sol",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_completion_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Responses API
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `model` | string | Yes | Must be `gpt-5.6-sol`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration. effort supports none, low, medium, high, xhigh, and max; set mode to pro for quality-first execution. |
| `text` | object | No | Text format and verbosity controls. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
### Chat Completions
| Parameter | Type | Required | Description |
| ----------------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gpt-5.6-sol`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_completion_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GPT-5.6 Terra
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-5.6-terra
GPT-5.6 Terra: balanced reasoning and coding model. Request examples and parameters for MixRoute.
GPT-5.6 Terra is a balanced reasoning and coding model from OpenAI.
Call `gpt-5.6-terra` through both the OpenAI-compatible Chat Completions API and the Responses API.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
* Max reasoning - Supports none, low, medium, high, xhigh, and max effort
* Pro mode - Use reasoning.mode in the Responses API for quality-first work
## Quick example
### Responses API
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.6-terra",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "medium"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-5.6-terra",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "medium"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-5.6-terra",
input="Write a short poem about the sea.",
reasoning={"effort": "medium"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
### Chat Completions
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.6-terra",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_completion_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gpt-5.6-terra",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_completion_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gpt-5.6-terra",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_completion_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Responses API
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `model` | string | Yes | Must be `gpt-5.6-terra`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration. effort supports none, low, medium, high, xhigh, and max; set mode to pro for quality-first execution. |
| `text` | object | No | Text format and verbosity controls. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
### Chat Completions
| Parameter | Type | Required | Description |
| ----------------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `gpt-5.6-terra`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_completion_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# GPT Audio
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-audio
GPT Audio: audio conversation model with speech input and output. Request examples and parameters for MixRoute.
GPT Audio is an audio conversation model with speech input and output from OpenAI.
Call `gpt-audio` through MixRoute using the endpoint shown below.
## Key capabilities
* Audio input and output - Use speech as part of a Chat Completions conversation
* Voice selection - Configure the voice used for generated audio
* Text transcript - Receive text alongside generated audio
* OpenAI-compatible - Uses the Chat Completions request format
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-audio",
"modalities": [
"text",
"audio"
],
"audio": {
"voice": "alloy",
"format": "wav"
},
"messages": [
{
"role": "user",
"content": "Give a short spoken welcome to MixRoute."
}
],
"max_completion_tokens": 256
}'
```
```python theme={null}
import base64
from pathlib import Path
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gpt-audio",
modalities=["text", "audio"],
audio={"voice": "alloy", "format": "wav"},
messages=[{"role": "user", "content": "Give a short spoken welcome to MixRoute."}],
max_completion_tokens=256,
)
audio = response.choices[0].message.audio
Path("reply.wav").write_bytes(base64.b64decode(audio.data))
print(audio.transcript)
```
## Parameters
| Parameter | Type | Required | Description |
| ----------------------- | ------- | -------- | ---------------------------------------------------------------------- |
| `model` | string | Yes | Must be `gpt-audio`. |
| `messages` | array | Yes | Conversation messages. Content may include text or input\_audio parts. |
| `modalities` | array | Yes | Include audio to request generated speech. |
| `audio` | object | Yes | Output voice and audio format. |
| `max_completion_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable streamed Chat Completions output. |
# GPT Audio 1.5
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-audio-1.5
GPT Audio 1.5: audio conversation model with speech input and output. Request examples and parameters for MixRoute.
GPT Audio 1.5 is an audio conversation model with speech input and output from OpenAI.
Call `gpt-audio-1.5` through MixRoute using the endpoint shown below.
## Key capabilities
* Audio input and output - Use speech as part of a Chat Completions conversation
* Voice selection - Configure the voice used for generated audio
* Text transcript - Receive text alongside generated audio
* OpenAI-compatible - Uses the Chat Completions request format
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-audio-1.5",
"modalities": [
"text",
"audio"
],
"audio": {
"voice": "alloy",
"format": "wav"
},
"messages": [
{
"role": "user",
"content": "Give a short spoken welcome to MixRoute."
}
],
"max_completion_tokens": 256
}'
```
```python theme={null}
import base64
from pathlib import Path
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gpt-audio-1.5",
modalities=["text", "audio"],
audio={"voice": "alloy", "format": "wav"},
messages=[{"role": "user", "content": "Give a short spoken welcome to MixRoute."}],
max_completion_tokens=256,
)
audio = response.choices[0].message.audio
Path("reply.wav").write_bytes(base64.b64decode(audio.data))
print(audio.transcript)
```
## Parameters
| Parameter | Type | Required | Description |
| ----------------------- | ------- | -------- | ---------------------------------------------------------------------- |
| `model` | string | Yes | Must be `gpt-audio-1.5`. |
| `messages` | array | Yes | Conversation messages. Content may include text or input\_audio parts. |
| `modalities` | array | Yes | Include audio to request generated speech. |
| `audio` | object | Yes | Output voice and audio format. |
| `max_completion_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable streamed Chat Completions output. |
# GPT Chat Latest
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-chat-latest
GPT Chat Latest: general-purpose language model. Request examples and parameters for MixRoute.
GPT Chat Latest is a general-purpose language model from OpenAI.
Call `gpt-chat-latest` through both the OpenAI-compatible Chat Completions API and the Responses API.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
### Chat Completions
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-chat-latest",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_completion_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="gpt-chat-latest",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_completion_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="gpt-chat-latest",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_completion_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
### Responses API
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-chat-latest",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="gpt-chat-latest",
input="Explain quantum entanglement in simple terms.",
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="gpt-chat-latest",
input="Write a short poem about the sea.",
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
## Parameters
### Chat Completions
| Parameter | Type | Required | Description |
| ----------------------- | --------------- | -------- | -------------------------------------------- |
| `model` | string | Yes | Must be `gpt-chat-latest`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_completion_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
### Responses API
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------- |
| `model` | string | Yes | Must be `gpt-chat-latest`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
# GPT Image 2
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-image-2
GPT Image 2: image generation model. Request examples and parameters for MixRoute.
GPT Image 2 is available through the native image API described below.
Supports image generation and editing. Size constraints, transparent-background support, and input fidelity are model-specific.
[Generation parameters](/en/api-reference/endpoint/gpt-image) | [Editing parameters](/en/api-reference/endpoint/gpt-image-edit)
`POST https://api.mixroute.ai/v1/images/generations`
## Examples
Use your MixRoute key in the `MIXROUTE_API_KEY` environment variable. Requests use `Authorization: Bearer ...`. Replace source-image placeholders with accessible images or local files before editing.
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/images/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "gpt-image-2",
"prompt": "A clean product photograph of a red ceramic mug on a white background.",
"n": 1,
"size": "1024x1024",
"quality": "low",
"output_format": "png"
}'
```
### Python
```python theme={null}
import json
import os
import requests
payload = json.loads(r'''
{
"model": "gpt-image-2",
"prompt": "A clean product photograph of a red ceramic mug on a white background.",
"n": 1,
"size": "1024x1024",
"quality": "low",
"output_format": "png"
}
''')
response = requests.post(
"https://api.mixroute.ai/v1/images/generations",
headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
json=payload,
timeout=180,
)
response.raise_for_status()
result = response.json()
import base64
from pathlib import Path
for index, item in enumerate(result["data"]):
Path(f"image_{index}.png").write_bytes(base64.b64decode(item["b64_json"]))
```
# GPT-Realtime-2
Source: https://docs.mixroute.ai/en/model-api/openai/gpt-realtime-2
GPT-Realtime-2: reasoning-capable realtime voice model with tool use.
GPT-Realtime-2 is OpenAI's reasoning-capable realtime voice model for speech-to-speech agents and tool use.
Use the Realtime WebSocket endpoint. The Chat Completions endpoint is not supported for this MixRoute route.
## Key capabilities
* Realtime speech - Text and audio input and output
* Configurable reasoning - Adjust reasoning effort for voice workflows
* Tool use - Supports function calls in realtime sessions
* Multimodal input - Accepts text, audio, and image input
## Quick example
### Node.js WebSocket
Install the `ws` package, then connect with the model query parameter and a Bearer token.
```javascript theme={null}
import WebSocket from "ws";
const ws = new WebSocket(
"wss://api.mixroute.ai/v1/realtime?model=gpt-realtime-2",
{ headers: { Authorization: "Bearer YOUR_API_KEY" } },
);
ws.on("open", () => {
ws.send(JSON.stringify({
type: "response.create",
response: { modalities: ["text"] },
}));
});
ws.on("message", (data) => console.log(data.toString()));
```
## Parameters
| Parameter | Type | Required | Description |
| ----------------- | ------ | -------- | ---------------------------------------------------------------- |
| `model` | string | Yes | Must be `gpt-realtime-2`. |
| `Authorization` | header | Yes | Bearer API key sent during the WebSocket handshake. |
| `session.update` | event | No | Configure modalities, instructions, tools, audio, and reasoning. |
| `response.create` | event | Yes | Start model generation for the current session. |
## Vendor reference
* [OpenAI GPT-Realtime-2 model page](https://developers.openai.com/api/docs/models/gpt-realtime-2)
# o1
Source: https://docs.mixroute.ai/en/model-api/openai/o1
o1: reasoning model for complex problem solving. Request examples and parameters for MixRoute.
o1 is a reasoning model for complex problem solving from OpenAI.
Call `o1` through both the OpenAI-compatible Chat Completions API and the Responses API.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
### Responses API
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "o1",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "low"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="o1",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "low"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="o1",
input="Write a short poem about the sea.",
reasoning={"effort": "low"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
### Chat Completions
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "o1",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_completion_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="o1",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_completion_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="o1",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_completion_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Responses API
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------ |
| `model` | string | Yes | Must be `o1`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration, including effort. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
### Chat Completions
| Parameter | Type | Required | Description |
| ----------------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `o1`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_completion_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# o3
Source: https://docs.mixroute.ai/en/model-api/openai/o3
o3: reasoning model for complex problem solving. Request examples and parameters for MixRoute.
o3 is a reasoning model for complex problem solving from OpenAI.
Call `o3` through both the OpenAI-compatible Chat Completions API and the Responses API.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
### Responses API
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "o3",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "low"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="o3",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "low"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="o3",
input="Write a short poem about the sea.",
reasoning={"effort": "low"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
### Chat Completions
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "o3",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_completion_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="o3",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_completion_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="o3",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_completion_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Responses API
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------ |
| `model` | string | Yes | Must be `o3`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration, including effort. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
### Chat Completions
| Parameter | Type | Required | Description |
| ----------------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `o3`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_completion_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# o3 Mini
Source: https://docs.mixroute.ai/en/model-api/openai/o3-mini
o3 Mini: reasoning model for complex problem solving. Request examples and parameters for MixRoute.
o3 Mini is a reasoning model for complex problem solving from OpenAI.
Call `o3-mini` through both the OpenAI-compatible Chat Completions API and the Responses API.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
### Responses API
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "o3-mini",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "low"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="o3-mini",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "low"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="o3-mini",
input="Write a short poem about the sea.",
reasoning={"effort": "low"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
### Chat Completions
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "o3-mini",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_completion_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="o3-mini",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_completion_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="o3-mini",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_completion_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Responses API
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------ |
| `model` | string | Yes | Must be `o3-mini`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration, including effort. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
### Chat Completions
| Parameter | Type | Required | Description |
| ----------------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `o3-mini`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_completion_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# o3 Pro
Source: https://docs.mixroute.ai/en/model-api/openai/o3-pro
o3 Pro: reasoning model for complex problem solving. Request examples and parameters for MixRoute.
o3 Pro is a reasoning model for complex problem solving from OpenAI.
Call `o3-pro` through MixRoute using the endpoint shown below.
## Key capabilities
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "o3-pro",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "low"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="o3-pro",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "low"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="o3-pro",
input="Write a short poem about the sea.",
reasoning={"effort": "low"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------ |
| `model` | string | Yes | Must be `o3-pro`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration, including effort. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
# o4 Mini
Source: https://docs.mixroute.ai/en/model-api/openai/o4-mini
o4 Mini: reasoning model for complex problem solving. Request examples and parameters for MixRoute.
o4 Mini is a reasoning model for complex problem solving from OpenAI.
Call `o4-mini` through both the OpenAI-compatible Chat Completions API and the Responses API.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions
## Quick example
### Responses API
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "o4-mini",
"input": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_output_tokens": 256,
"reasoning": {
"effort": "low"
}
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="o4-mini",
input="Explain quantum entanglement in simple terms.",
reasoning={"effort": "low"},
max_output_tokens=256,
)
print(response.output_text)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with client.responses.stream(
model="o4-mini",
input="Write a short poem about the sea.",
reasoning={"effort": "low"},
max_output_tokens=256,
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")
```
### Chat Completions
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "o4-mini",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_completion_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="o4-mini",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_completion_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="o4-mini",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_completion_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
### Responses API
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | ------------------------------------------ |
| `model` | string | Yes | Must be `o4-mini`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration, including effort. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |
### Chat Completions
| Parameter | Type | Required | Description |
| ----------------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `o4-mini`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_completion_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Sora 2
Source: https://docs.mixroute.ai/en/model-api/openai/sora-2
Sora 2: video generation model with synchronized audio. Request examples and parameters for MixRoute.
Sora 2 generates video with synchronized audio. The MixRoute route uses `POST /v1/video/generations` with the Sora creation fields below.
OpenAI has scheduled shutdown of the Sora 2 models and Videos API for September 24, 2026. Confirm MixRoute route access before integration; a model ID in the catalog alone does not guarantee an enabled video route or continued availability after the upstream shutdown.
## Request Parameters
| Field | Type | Required | Description |
| ----------------- | -------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `model` | string | Yes | Use `sora-2`. |
| `prompt` | string | Yes | Describe the scene, movement, and desired audio. |
| `seconds` | string | No | Clip duration: "4", "8", or "12"; default "4". This is a string, not a duration integer. |
| `size` | string | No | Use `720x1280` (default, portrait) or `1280x720` (landscape) for Sora 2. Do not infer square output or Pro-only sizes. |
| `input_reference` | object \| file | No | Native first-frame input: JSON object with image\_url or file\_id, or a multipart upload. Media-input support must be enabled on the selected MixRoute route. |
These fields are top-level Sora fields. Do not replace them with Seedance-style `duration`, `resolution`, or `aspect_ratio`, and do not wrap them in `metadata`.
An image reference must match the requested size and use JPEG, PNG, or WebP. In JSON, the native shape is `input_reference: {"image_url": "..."}` or `input_reference: {"file_id": "..."}`, not a top-level image\_url. A file ID must be accessible to the upstream account.
Remixing is a separate video operation, not a `remix_url` field on a creation request. Do not reuse an arbitrary source URL as that field.
## Text-to-Video
Set the environment variable `MIXROUTE_API_KEY` before calling.
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "sora-2",
"prompt": "A red paper square slowly rotates on a plain white background.",
"seconds": "4",
"size": "720x1280"
}'
```
### Python
```python theme={null}
import json
import os
import requests
payload = json.loads(r'''
{
"model": "sora-2",
"prompt": "A red paper square slowly rotates on a plain white background.",
"seconds": "4",
"size": "720x1280"
}
''')
response = requests.post(
"https://api.mixroute.ai/v1/video/generations",
headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
json=payload,
timeout=60,
)
response.raise_for_status()
result = response.json()
if result.get("code") not in (None, 0, 200, "0", "200", "success"):
raise RuntimeError(result.get("message") or result)
print(result)
```
## Workflow
1. Submit to an enabled Sora route and retain the returned MixRoute task ID.
2. Poll [Query Video Task](/en/api-reference/endpoint/query-video-task) until success or a terminal failure.
3. Use the returned result URL or [Download Video](/en/api-reference/endpoint/download-video) for routes that require the separate download endpoint.
An HTTP error or an application-level error is not a created task. A platform-routing error requires route configuration; changing the prompt or adding undocumented fields does not resolve it.
# Text Embedding 3 Large
Source: https://docs.mixroute.ai/en/model-api/openai/text-embedding-3-large
Text Embedding 3 Large: text embedding model. Request examples and parameters for MixRoute.
Text Embedding 3 Large is a text embedding model from OpenAI.
Call `text-embedding-3-large` through MixRoute using the endpoint shown below.
## Key capabilities
* Vector embeddings - Convert text into numeric vectors
* Batch input - Accept a string or an array of strings
* Similarity workflows - Use vectors for search and clustering
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/embeddings" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "text-embedding-3-large",
"input": "MixRoute model API"
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/embeddings",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'model': 'text-embedding-3-large', 'input': 'MixRoute model API'},
)
print(response.json())
```
## Parameters
| Parameter | Type | Required | Description |
| ----------------- | --------------- | -------- | ------------------------------------------- |
| `model` | string | Yes | Must be `text-embedding-3-large`. |
| `input` | string \| array | Yes | Text or text array to embed. |
| `dimensions` | integer | No | Requested output dimensions when supported. |
| `encoding_format` | string | No | Embedding encoding format. |
# Text Embedding 3 Small
Source: https://docs.mixroute.ai/en/model-api/openai/text-embedding-3-small
Text Embedding 3 Small: text embedding model. Request examples and parameters for MixRoute.
Text Embedding 3 Small is a text embedding model from OpenAI.
Call `text-embedding-3-small` through MixRoute using the endpoint shown below.
## Key capabilities
* Vector embeddings - Convert text into numeric vectors
* Batch input - Accept a string or an array of strings
* Similarity workflows - Use vectors for search and clustering
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/embeddings" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "text-embedding-3-small",
"input": "MixRoute model API"
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/embeddings",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'model': 'text-embedding-3-small', 'input': 'MixRoute model API'},
)
print(response.json())
```
## Parameters
| Parameter | Type | Required | Description |
| ----------------- | --------------- | -------- | ------------------------------------------- |
| `model` | string | Yes | Must be `text-embedding-3-small`. |
| `input` | string \| array | Yes | Text or text array to embed. |
| `dimensions` | integer | No | Requested output dimensions when supported. |
| `encoding_format` | string | No | Embedding encoding format. |
# Text Embedding Ada 002
Source: https://docs.mixroute.ai/en/model-api/openai/text-embedding-ada-002
Text Embedding Ada 002: text embedding model. Request examples and parameters for MixRoute.
Text Embedding Ada 002 is a text embedding model from OpenAI.
Call `text-embedding-ada-002` through MixRoute using the endpoint shown below.
## Key capabilities
* Vector embeddings - Convert text into numeric vectors
* Batch input - Accept a string or an array of strings
* Similarity workflows - Use vectors for search and clustering
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/embeddings" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "text-embedding-ada-002",
"input": "MixRoute model API"
}'
```
```python theme={null}
import requests
response = requests.post(
"https://api.mixroute.ai/v1/embeddings",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'model': 'text-embedding-ada-002', 'input': 'MixRoute model API'},
)
print(response.json())
```
## Parameters
| Parameter | Type | Required | Description |
| ----------------- | --------------- | -------- | ------------------------------------------- |
| `model` | string | Yes | Must be `text-embedding-ada-002`. |
| `input` | string \| array | Yes | Text or text array to embed. |
| `dimensions` | integer | No | Requested output dimensions when supported. |
| `encoding_format` | string | No | Embedding encoding format. |
# Whisper 1
Source: https://docs.mixroute.ai/en/model-api/openai/whisper-1
Whisper 1: speech-to-text model. Request examples and parameters for MixRoute.
Whisper 1 is a speech-to-text model from OpenAI.
Call `whisper-1` through MixRoute using the endpoint shown below.
## Key capabilities
* Speech-to-text - Transcribe an uploaded audio file
* Multipart upload - Sends the source file as form data
* Output formats - Supports model-specific response formats
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/audio/transcriptions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@speech.wav" \
-F "model=whisper-1"
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with open("speech.wav", "rb") as audio_file:
transcript = client.audio.transcriptions.create(
model="whisper-1",
file=audio_file,
)
print(transcript.text)
```
## Parameters
| Parameter | Type | Required | Description |
| ----------------- | ------ | -------- | ------------------------------------------- |
| `file` | file | Yes | Audio file uploaded as multipart form data. |
| `model` | string | Yes | Must be `whisper-1`. |
| `language` | string | No | Input language code when supported. |
| `prompt` | string | No | Optional text that guides transcription. |
| `response_format` | string | No | Transcription response format. |
# Grok 3
Source: https://docs.mixroute.ai/en/model-api/xai/grok-3
Grok 3: general-purpose language model. Request examples and parameters for MixRoute.
Grok 3 is a general-purpose language model from xAI.
Call `grok-3` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-3",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="grok-3",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="grok-3",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `grok-3`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Grok 3 Mini
Source: https://docs.mixroute.ai/en/model-api/xai/grok-3-mini
Grok 3 Mini: fast, efficient language model. Request examples and parameters for MixRoute.
Grok 3 Mini is a fast, efficient language model from xAI.
Call `grok-3-mini` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-3-mini",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="grok-3-mini",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="grok-3-mini",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `grok-3-mini`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Grok 4
Source: https://docs.mixroute.ai/en/model-api/xai/grok-4
Grok 4: general-purpose language model. Request examples and parameters for MixRoute.
Grok 4 is a general-purpose language model from xAI.
Call `grok-4` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-4",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="grok-4",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="grok-4",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `grok-4`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Grok 4.1 Fast Reasoning
Source: https://docs.mixroute.ai/en/model-api/xai/grok-4-1-fast-reasoning
Grok 4.1 Fast Reasoning: reasoning model for complex problem solving. Request examples and parameters for MixRoute.
Grok 4.1 Fast Reasoning is a reasoning model for complex problem solving from xAI.
Call `grok-4-1-fast-reasoning` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-4-1-fast-reasoning",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="grok-4-1-fast-reasoning",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="grok-4-1-fast-reasoning",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `grok-4-1-fast-reasoning`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Grok 4 Fast Non-Reasoning
Source: https://docs.mixroute.ai/en/model-api/xai/grok-4-fast-non-reasoning
Grok 4 Fast Non-Reasoning: general-purpose language model. Request examples and parameters for MixRoute.
Grok 4 Fast Non-Reasoning is a general-purpose language model from xAI.
Call `grok-4-fast-non-reasoning` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-4-fast-non-reasoning",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="grok-4-fast-non-reasoning",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="grok-4-fast-non-reasoning",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `grok-4-fast-non-reasoning`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Grok 4 Fast Reasoning
Source: https://docs.mixroute.ai/en/model-api/xai/grok-4-fast-reasoning
Grok 4 Fast Reasoning: reasoning model for complex problem solving. Request examples and parameters for MixRoute.
Grok 4 Fast Reasoning is a reasoning model for complex problem solving from xAI.
Call `grok-4-fast-reasoning` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-4-fast-reasoning",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="grok-4-fast-reasoning",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="grok-4-fast-reasoning",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `grok-4-fast-reasoning`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Grok 4.2
Source: https://docs.mixroute.ai/en/model-api/xai/grok-4.2
Grok 4.2: general-purpose language model. Request examples and parameters for MixRoute.
Grok 4.2 is a general-purpose language model from xAI.
Call `grok-4.2` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-4.2",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="grok-4.2",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="grok-4.2",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `grok-4.2`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Grok 4.20 0309 Non-Reasoning
Source: https://docs.mixroute.ai/en/model-api/xai/grok-4.20-0309-non-reasoning
Grok 4.20 0309 Non-Reasoning: general-purpose language model. Request examples and parameters for MixRoute.
Grok 4.20 0309 Non-Reasoning is a general-purpose language model from xAI.
Call `grok-4.20-0309-non-reasoning` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-4.20-0309-non-reasoning",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="grok-4.20-0309-non-reasoning",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="grok-4.20-0309-non-reasoning",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `grok-4.20-0309-non-reasoning`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Grok 4.20 0309 Reasoning
Source: https://docs.mixroute.ai/en/model-api/xai/grok-4.20-0309-reasoning
Grok 4.20 0309 Reasoning: reasoning model for complex problem solving. Request examples and parameters for MixRoute.
Grok 4.20 0309 Reasoning is a reasoning model for complex problem solving from xAI.
Call `grok-4.20-0309-reasoning` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-4.20-0309-reasoning",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="grok-4.20-0309-reasoning",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="grok-4.20-0309-reasoning",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `grok-4.20-0309-reasoning`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Grok 4.20 Beta 0309 Non-Reasoning
Source: https://docs.mixroute.ai/en/model-api/xai/grok-4.20-beta-0309-non-reasoning
Grok 4.20 Beta 0309 Non-Reasoning: general-purpose language model. Request examples and parameters for MixRoute.
Grok 4.20 Beta 0309 Non-Reasoning is a general-purpose language model from xAI.
Call `grok-4.20-beta-0309-non-reasoning` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-4.20-beta-0309-non-reasoning",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="grok-4.20-beta-0309-non-reasoning",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="grok-4.20-beta-0309-non-reasoning",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `grok-4.20-beta-0309-non-reasoning`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Grok 4.20 Beta 0309 Reasoning
Source: https://docs.mixroute.ai/en/model-api/xai/grok-4.20-beta-0309-reasoning
Grok 4.20 Beta 0309 Reasoning: reasoning model for complex problem solving. Request examples and parameters for MixRoute.
Grok 4.20 Beta 0309 Reasoning is a reasoning model for complex problem solving from xAI.
Call `grok-4.20-beta-0309-reasoning` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-4.20-beta-0309-reasoning",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="grok-4.20-beta-0309-reasoning",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="grok-4.20-beta-0309-reasoning",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `grok-4.20-beta-0309-reasoning`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Grok 4.20 Multi-Agent
Source: https://docs.mixroute.ai/en/model-api/xai/grok-4.20-multi-agent-0309
Grok 4.20 Multi-Agent: 1M-context xAI model where multiple agents collaborate in parallel on deep research.
Grok 4.20 Multi-Agent is xAI's deep-research model in which multiple agents work in parallel and combine their results.
Call `grok-4.20-multi-agent-0309` through MixRoute using the OpenAI-compatible Responses API.
This model is not available through Chat Completions. Use `POST /v1/responses`; Chat Completions returns an endpoint error.
## Key capabilities
* Parallel agents - Multiple agents collaborate on the same research task
* 1M context window - Handles large source sets and long investigations
* Reasoning and tools - Supports reasoning, function calling, and structured output
* Multimodal input - Accepts text and images and returns text
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-4.20-multi-agent-0309",
"input": "Compare the main operational risks of three database migration strategies and produce a sourced recommendation.",
"max_output_tokens": 512
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.responses.create(
model="grok-4.20-multi-agent-0309",
input="Compare the main operational risks of three database migration strategies and produce a sourced recommendation.",
max_output_tokens=512,
)
print(response.output_text)
```
## Parameters
| Parameter | Type | Required | Description |
| ------------------- | --------------- | -------- | --------------------------------------- |
| `model` | string | Yes | Model ID: `grok-4.20-multi-agent-0309`. |
| `input` | string \| array | Yes | Text or structured multimodal input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
MixRoute may also list `grok-4.20-multi-agent-beta-0309`. Use the canonical `grok-4.20-multi-agent-0309` ID shown above for new integrations.
## Vendor reference
* [Grok 4.20 Multi-Agent documentation](https://docs.x.ai/developers/models/grok-4.20-multi-agent-0309)
# Grok Code Fast 1
Source: https://docs.mixroute.ai/en/model-api/xai/grok-code-fast-1
Grok Code Fast 1: coding and software engineering model. Request examples and parameters for MixRoute.
Grok Code Fast 1 is a coding and software engineering model from xAI.
Call `grok-code-fast-1` through MixRoute using the endpoint shown below.
## Key capabilities
* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
## Quick example
```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-code-fast-1",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in simple terms."
}
],
"max_tokens": 256
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="grok-code-fast-1",
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
max_tokens=256,
)
print(response.choices[0].message.content)
```
```python theme={null}
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
stream = client.chat.completions.create(
model="grok-code-fast-1",
messages=[{"role": "user", "content": "Write a short poem about the sea."}],
max_tokens=256,
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
```
## Parameters
| Parameter | Type | Required | Description |
| ------------- | --------------- | -------- | ------------------------------------------------- |
| `model` | string | Yes | Must be `grok-code-fast-1`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |
# Grok Imagine Image
Source: https://docs.mixroute.ai/en/model-api/xai/grok-imagine-image
Grok Imagine Image: image generation model. Request examples and parameters for MixRoute.
Grok Imagine Image is available through the native image API described below.
Uses native aspect\_ratio and resolution fields rather than the GPT Image size field. The quality control is available only for Image 2.0.
[Generation parameters](/en/api-reference/endpoint/grok-imagine-image) | [Editing parameters](/en/api-reference/endpoint/grok-imagine-edit)
`POST https://api.mixroute.ai/v1/images/generations`
## Examples
Use your MixRoute key in the `MIXROUTE_API_KEY` environment variable. Requests use `Authorization: Bearer ...`. Replace source-image placeholders with accessible images or local files before editing.
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/images/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "grok-imagine-image",
"prompt": "A clean product photograph of a red ceramic mug on a white background.",
"n": 1,
"response_format": "url"
}'
```
### Python
```python theme={null}
import json
import os
import requests
payload = json.loads(r'''
{
"model": "grok-imagine-image",
"prompt": "A clean product photograph of a red ceramic mug on a white background.",
"n": 1,
"response_format": "url"
}
''')
response = requests.post(
"https://api.mixroute.ai/v1/images/generations",
headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
json=payload,
timeout=180,
)
response.raise_for_status()
result = response.json()
for item in result["data"]:
print(item.get("url") or item.get("b64_json"))
```
# Grok Imagine Image Quality
Source: https://docs.mixroute.ai/en/model-api/xai/grok-imagine-image-quality
Grok Imagine Image Quality: image generation model. Request examples and parameters for MixRoute.
Grok Imagine Image Quality is available through the native image API described below.
Uses native aspect\_ratio and resolution fields rather than the GPT Image size field. The quality control is available only for Image 2.0.
[Generation parameters](/en/api-reference/endpoint/grok-imagine-image) | [Editing parameters](/en/api-reference/endpoint/grok-imagine-edit)
`POST https://api.mixroute.ai/v1/images/generations`
## Examples
Use your MixRoute key in the `MIXROUTE_API_KEY` environment variable. Requests use `Authorization: Bearer ...`. Replace source-image placeholders with accessible images or local files before editing.
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/images/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "grok-imagine-image-quality",
"prompt": "A clean product photograph of a red ceramic mug on a white background.",
"n": 1,
"response_format": "url"
}'
```
### Python
```python theme={null}
import json
import os
import requests
payload = json.loads(r'''
{
"model": "grok-imagine-image-quality",
"prompt": "A clean product photograph of a red ceramic mug on a white background.",
"n": 1,
"response_format": "url"
}
''')
response = requests.post(
"https://api.mixroute.ai/v1/images/generations",
headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
json=payload,
timeout=180,
)
response.raise_for_status()
result = response.json()
for item in result["data"]:
print(item.get("url") or item.get("b64_json"))
```
# Chat Completions (OpenAI)
Source: https://docs.mixroute.ai/en/api-reference/endpoint/chat-openai
POST /v1/chat/completions
Universal text chat API supporting OpenAI-compatible LLMs
## Introduction
Universal text chat interface supporting OpenAI-compatible large language models. Through a unified API, you can access OpenAI, Claude, DeepSeek, Grok, Qwen, and many other mainstream models via MixRoute
## Authentication
Bearer Token, e.g., `Bearer sk-xxxxxxxxxx`
## Request Parameters
Model identifier, corresponding to the Model Marketplace.
MixRoute supports multiple models. See the complete list at [Model Marketplace](https://console.mixroute.ai/models).
Array of conversation messages, each containing `role` (user/system/assistant) and `content`
Randomness control, 0-2. Higher values produce more random responses
Enable streaming output, returns SSE format chunked data
Maximum tokens to generate, controls response length
Output format, supports `text` or `json_object` / `json_schema`
Nucleus sampling parameter, 0-1, alternative to temperature. Lower values make sampling more conservative
Frequency penalty, -2 to 2. Positive values reduce repetition of frequent tokens
Presence penalty, -2 to 2. Positive values encourage discussing new topics
Stop sequences, generation stops when specified strings are encountered
Random seed. Same seed makes results more consistent
End-user identifier for monitoring and rate-limiting
Number of response candidates per prompt, defaults to 1
Token bias, maps token IDs to bias values (-100 to 100)
Tools definition list, each tool must include `type` and `function`
Tool selection strategy: `"auto"` / `"none"` / `"required"`, or specify a tool name
## Basic Examples
```bash theme={null}
curl -X POST "https://api.mixroute.ai/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "gpt-5.5",
"messages": [
{"role": "system", "content": "You are a helpful assistant"},
{"role": "user", "content": "Please briefly introduce artificial intelligence"}
],
"temperature": 0.7
}'
```
```bash theme={null}
curl -N -X POST "https://api.mixroute.ai/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "doubao-seed-1-8-251228",
"stream": true,
"messages": [
{"role": "system", "content": "You are a helpful assistant"},
{"role": "user", "content": "Please briefly introduce artificial intelligence"}
]
}'
```
```python theme={null}
from openai import OpenAI
client = OpenAI(
api_key="sk-xxxxxxxxxx",
base_url="https://api.mixroute.ai/v1"
)
# Non-streaming
completion = client.chat.completions.create(
model="gpt-5.5",
messages=[
{"role": "system", "content": "You are a helpful assistant"},
{"role": "user", "content": "Please briefly introduce artificial intelligence"}
],
temperature=0.7
)
print(completion.choices[0].message.content)
# Streaming
stream = client.chat.completions.create(
model="doubao-seed-1-8-251228",
messages=[
{"role": "user", "content": "Please briefly introduce artificial intelligence"}
],
stream=True
)
for chunk in stream:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")
```
## Advanced Features
Supports OpenAI-compatible tool calling format:
```bash theme={null}
curl -X POST "https://api.mixroute.ai/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "gpt-5.5",
"messages": [
{"role": "user", "content": "What is the weather in Shanghai?"}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get weather information by city",
"parameters": {
"type": "object",
"properties": {
"city": {"type": "string"}
},
"required": ["city"]
}
}
}
],
"tool_choice": "auto"
}'
```
Use JSON Schema to constrain model output format:
```bash theme={null}
curl -X POST "https://api.mixroute.ai/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "gpt-5.5",
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "Answer",
"schema": {
"type": "object",
"properties": {
"summary": {"type": "string"}
},
"required": ["summary"]
}
}
},
"messages": [
{"role": "user", "content": "Return a JSON with a summary field"}
]
}'
```
DeepSeek series supports deep thinking capability:
```bash theme={null}
curl -X POST "https://api.mixroute.ai/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "deepseek-v4-pro",
"messages": [
{"role": "user", "content": "Analyze this math problem: if x^2 + 2x - 3 = 0, find x"}
],
"temperature": 0.6
}'
```
Response will include `reasoning_content` field showing the thinking process.
Qwen series supports thinking capability:
```bash theme={null}
curl -X POST "https://api.mixroute.ai/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "qwen3.7-max",
"messages": [
{"role": "user", "content": "Analyze the development trends of artificial intelligence"}
],
"enable_thinking": true
}'
```
GPT-5.6 series (`gpt-5.6-sol` / `gpt-5.6-terra` / `gpt-5.6-luna`) supports advanced reasoning configuration:
* `reasoning.mode` β Execution mode: `"standard"` (default) or `"pro"`. Pro Mode performs additional model work to improve reliability on difficult tasks
* `reasoning.effort` β Reasoning intensity: `none` / `low` / `medium` / `high` / `xhigh` / `max` (`max` is a new level)
```bash theme={null}
curl https://api.mixroute.ai/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk" \
-d '{
"model": "gpt-5.6-luna",
"reasoning": {
"mode": "pro",
"effort":"max"
},
"input": "Analyze the potential risks of this database migration plan."
}'
```
Gemini 2.0 Flash Thinking supports thinking capability:
```bash theme={null}
curl -X POST "https://api.mixroute.ai/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "gemini-2.0-flash-thinking-exp",
"messages": [
{"role": "user", "content": "Explain the basic principles of quantum computing"}
]
}'
```
Qwen supports additional extended parameters:
```bash theme={null}
curl -X POST "https://api.mixroute.ai/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "qwen3.7-max",
"messages": [
{"role": "user", "content": "Hello"}
],
"enable_search": true,
"search_options": {
"search_strategy": "standard",
"forced_search": false
}
}'
```
| Parameter | Description |
| -------------------------------- | --------------------------------- |
| `enable_search` | Enable web search |
| `search_options.search_strategy` | Search strategy: `standard`/`pro` |
| `search_options.forced_search` | Force search |
Claude models support web search functionality:
```bash theme={null}
curl -X POST "https://api.mixroute.ai/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "claude-sonnet-5",
"messages": [
{"role": "user", "content": "What are today major news?"}
],
"tools": [
{
"type": "web_search_20250305",
"name": "web_search",
"max_uses": 5
}
]
}'
```
Grok models support real-time web search:
```bash theme={null}
curl -X POST "https://api.mixroute.ai/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "grok-3",
"messages": [
{"role": "user", "content": "What are the latest tech news?"}
],
"search_parameters": {
"mode": "auto",
"return_citations": true
}
}'
```
GPT models support direct file content processing:
```bash theme={null}
curl -X POST "https://api.mixroute.ai/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "gpt-5.5",
"messages": [
{
"role": "user",
"content": [
{"type": "text", "text": "Please analyze the content of this document"},
{
"type": "file",
"file": {
"url": "https://example.com/document.pdf"
}
}
]
}
]
}'
```
Supported file types include PDF, Word, Excel, images, etc.
Model file processing capabilities vary between models, please choose a model that supports the file types you need.
Grok models support enhanced reasoning capability:
```bash theme={null}
curl -X POST "https://api.mixroute.ai/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "grok-3-mini",
"messages": [
{"role": "user", "content": "Analyze this logic problem: If all A are B, and all B are C, then..."}
],
"reasoning_effort": "high"
}'
```
| reasoning\_effort | Description |
| ----------------- | ------------------------------- |
| `low` | Quick response, basic reasoning |
| `medium` | Balanced mode |
| `high` | Deep reasoning, more accurate |
## Response Format
```json theme={null}
{
"id": "chatcmpl-xxx",
"object": "chat.completion",
"created": 1234567890,
"model": "gpt-5.5",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Response content..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 25,
"completion_tokens": 100,
"total_tokens": 125
}
}
```
Streaming responses use Server-Sent Events (SSE) format:
```text theme={null}
data: {"id":"chatcmpl-xxx","object":"chat.completion.chunk","created":1234567890,"model":"gpt-5.5","choices":[{"index":0,"delta":{"role":"assistant","content":"Hello"},"finish_reason":null}]}
data: {"id":"chatcmpl-xxx","object":"chat.completion.chunk","created":1234567890,"model":"gpt-5.5","choices":[{"index":0,"delta":{"content":"!"},"finish_reason":null}]}
data: {"id":"chatcmpl-xxx","object":"chat.completion.chunk","created":1234567890,"model":"gpt-5.5","choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}
data: [DONE]
```
Each chunk contains incremental content, ending with `[DONE]`.
## Error Handling
| Error Type | Trigger Scenario |
| ------------------- | --------------------------------------------- |
| AuthenticationError | Invalid API key or unauthorized |
| NotFoundError | Model does not exist or is not supported |
| APIConnectionError | Network interruption or server not responding |
| RateLimitError | Request rate limit exceeded |
```bash cURL theme={null}
curl --request POST \
--url https://api.mixroute.ai/v1/chat/completions \
--header 'Authorization: Bearer sk-xxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-5.5",
"messages": [
{"role": "system", "content": "You are a helpful assistant"},
{"role": "user", "content": "Briefly introduce artificial intelligence"}
],
"temperature": 0.7
}'
```
```python Python theme={null}
from openai import OpenAI
client = OpenAI(
api_key="sk-xxxxxxxxxx",
base_url="https://api.mixroute.ai/v1"
)
response = client.chat.completions.create(
model="gpt-5.5",
messages=[
{"role": "system", "content": "You are a helpful assistant"},
{"role": "user", "content": "Briefly introduce artificial intelligence"}
],
temperature=0.7
)
print(response.choices[0].message.content)
```
```javascript JavaScript theme={null}
const OpenAI = require('openai');
const client = new OpenAI({
apiKey: 'sk-xxxxxxxxxx',
baseURL: 'https://api.mixroute.ai/v1'
});
const response = await client.chat.completions.create({
model: 'gpt-5.5',
messages: [
{ role: 'system', content: 'You are a helpful assistant' },
{ role: 'user', content: 'Briefly introduce artificial intelligence' }
],
temperature: 0.7
});
console.log(response.choices[0].message.content);
```
```php PHP theme={null}
post('https://api.mixroute.ai/v1/chat/completions', [
'headers' => [
'Authorization' => 'Bearer sk-xxxxxxxxxx',
'Content-Type' => 'application/json',
],
'json' => [
'model' => 'gpt-5.5',
'messages' => [
['role' => 'system', 'content' => 'You are a helpful assistant'],
['role' => 'user', 'content' => 'Briefly introduce artificial intelligence']
],
'temperature' => 0.7
]
]);
echo $response->getBody();
```
```go Go theme={null}
package main
import (
"context"
"fmt"
openai "github.com/sashabaranov/go-openai"
)
func main() {
config := openai.DefaultConfig("sk-xxxxxxxxxx")
config.BaseURL = "https://api.mixroute.ai/v1"
client := openai.NewClientWithConfig(config)
resp, _ := client.CreateChatCompletion(
context.Background(),
openai.ChatCompletionRequest{
Model: "gpt-5.5",
Messages: []openai.ChatCompletionMessage{
{Role: "system", Content: "You are a helpful assistant"},
{Role: "user", Content: "Briefly introduce artificial intelligence"},
},
},
)
fmt.Println(resp.Choices[0].Message.Content)
}
```
```java Java theme={null}
import com.theokanning.openai.OpenAiService;
import com.theokanning.openai.completion.chat.*;
OpenAiService service = new OpenAiService("sk-xxxxxxxxxx");
ChatCompletionRequest request = ChatCompletionRequest.builder()
.model("gpt-5.5")
.messages(Arrays.asList(
new ChatMessage("system", "You are a helpful assistant"),
new ChatMessage("user", "Briefly introduce artificial intelligence")
))
.temperature(0.7)
.build();
ChatCompletionResult result = service.createChatCompletion(request);
System.out.println(result.getChoices().get(0).getMessage().getContent());
```
```ruby Ruby theme={null}
require 'openai'
client = OpenAI::Client.new(
access_token: 'sk-xxxxxxxxxx',
uri_base: 'https://api.mixroute.ai/v1'
)
response = client.chat(
parameters: {
model: 'gpt-5.5',
messages: [
{ role: 'system', content: 'You are a helpful assistant' },
{ role: 'user', content: 'Briefly introduce artificial intelligence' }
],
temperature: 0.7
}
)
puts response.dig('choices', 0, 'message', 'content')
```
```json Response theme={null}
{
"id": "chatcmpl-xxx",
"object": "chat.completion",
"created": 1234567890,
"model": "gpt-5.5",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Artificial intelligence is a new technical science that researches and develops theories, methods, techniques, and application systems for simulating, extending, and expanding human intelligence..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 25,
"completion_tokens": 100,
"total_tokens": 125
}
}
```
# Count Tokens (Claude)
Source: https://docs.mixroute.ai/en/api-reference/endpoint/count-tokens
POST /v1/messages/count_tokens
Calculate Claude message token count for cost estimation before sending requests
## Introduction
Calculate the token count for Claude messages, used for cost estimation before sending requests. This endpoint **does not consume quota**, only performs local calculation.
## Authentication
Bearer Token, e.g., `Bearer sk-xxxxxxxxxx`
## Request Parameters
Claude model identifier, supported models include:
* `claude-opus-4-8`
* `claude-sonnet-5`
* `claude-haiku-4-5`
* Other Claude series models
Conversation messages list, each element contains `role` (user/assistant) and `content`. `content` can be a string or media content array.
Supported content types:
* Plain text messages
* Multimodal messages (with images)
* Tool call results
System prompt (optional), can be a string or media content array. Used to set model behavior and role.
Tool definition list (optional), used to calculate tool call related token count.
## Response Parameters
Total token count of input messages, including:
* All messages token count
* System prompt token count
* Tools definition token count (if any)
## Basic Examples
```bash theme={null}
curl -X POST "https://api.mixroute.ai/v1/messages/count_tokens" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "claude-opus-4-8",
"messages": [
{
"role": "user",
"content": "Hello, how are you?"
}
]
}'
```
```bash theme={null}
curl -X POST "https://api.mixroute.ai/v1/messages/count_tokens" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "claude-opus-4-8",
"system": "You are a helpful AI assistant.",
"messages": [
{
"role": "user",
"content": "What is artificial intelligence?"
}
]
}'
```
```bash theme={null}
curl -X POST "https://api.mixroute.ai/v1/messages/count_tokens" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "claude-opus-4-8",
"messages": [
{
"role": "user",
"content": "Hello"
},
{
"role": "assistant",
"content": "Hello! How can I help you?"
},
{
"role": "user",
"content": "Tell me about the history of artificial intelligence"
}
]
}'
```
## Python Example
```python theme={null}
from anthropic import Anthropic
client = Anthropic(
api_key="sk-xxxxxxxxxx",
base_url="https://api.mixroute.ai"
)
# Count tokens
response = client.messages.count_tokens(
model="claude-opus-4-8",
system="You are a helpful assistant.",
messages=[
{"role": "user", "content": "Hello, Claude!"}
]
)
print(f"Input tokens: {response.input_tokens}")
```
## Response Example
```json theme={null}
{
"input_tokens": 14
}
```
## Advanced Use Cases
```bash theme={null}
curl -X POST "https://api.mixroute.ai/v1/messages/count_tokens" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "claude-opus-4-8",
"messages": [
{
"role": "user",
"content": "What is the weather in San Francisco?"
}
],
"tools": [
{
"name": "get_weather",
"description": "Get the current weather in a given location",
"input_schema": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA"
}
},
"required": ["location"]
}
}
]
}'
```
```bash theme={null}
curl -X POST "https://api.mixroute.ai/v1/messages/count_tokens" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "claude-opus-4-8",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What is in this image?"
},
{
"type": "image",
"source": {
"type": "url",
"url": "https://example.com/image.jpg"
}
}
]
}
]
}'
```
## Use Cases
### 1. Cost Estimation
Calculate token count before sending bulk requests to estimate costs:
```python theme={null}
# Batch cost calculation
messages_batch = [...] # Batch messages
total_tokens = 0
for messages in messages_batch:
response = client.messages.count_tokens(
model="claude-opus-4-8",
messages=messages
)
total_tokens += response.input_tokens
# Calculate total cost based on pricing
cost = total_tokens * price_per_token
print(f"Estimated cost: ${cost:.4f}")
```
### 2. Context Window Management
Check if messages exceed the model's context window limit:
```python theme={null}
MAX_CONTEXT_WINDOW = 1000000 # Claude Sonnet 5 context window
response = client.messages.count_tokens(
model="claude-opus-4-8",
messages=long_conversation
)
if response.input_tokens > MAX_CONTEXT_WINDOW:
print(f"Warning: Message token count ({response.input_tokens}) exceeds context window limit")
# Execute message truncation or summarization
```
### 3. Prompt Optimization
Compare token consumption of different prompts:
```python theme={null}
prompts = [
"Concise prompt...",
"Detailed prompt...",
"Very detailed prompt..."
]
for prompt in prompts:
response = client.messages.count_tokens(
model="claude-opus-4-8",
system=prompt,
messages=[{"role": "user", "content": "Test"}]
)
print(f"{len(prompt)} characters -> {response.input_tokens} tokens")
```
## Notes
* This endpoint does not make actual AI requests, does not consume quota
* Does not include output-related parameters like `max_tokens`, only calculates input token count
* Image tokens use fixed estimates (approx 1000 tokens), actual may vary based on resolution
## Error Handling
### Missing Required Parameters
```json theme={null}
{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "Key: 'ClaudeCountTokensRequest.Model' Error:Field validation for 'Model' failed on the 'required' tag"
}
}
```
### Invalid API Key
```json theme={null}
{
"error": {
"message": "Invalid token",
"type": "invalid_request_error"
}
}
```
## Related Resources
* Pricing - Learn about token billing standards
* [Model List](https://console.mixroute.ai/models) - View supported Claude models
* [Create Message Request (Claude)](/en/api-reference/endpoint/messages) - Send actual Claude requests
```bash cURL theme={null}
curl --request POST \
--url https://api.mixroute.ai/v1/messages/count_tokens \
--header 'Authorization: Bearer sk-xxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"model": "claude-opus-4-8",
"messages": [
{"role": "user", "content": "Hello, how are you?"}
]
}'
```
```python Python theme={null}
from anthropic import Anthropic
client = Anthropic(
api_key="sk-xxxxxxxxxx",
base_url="https://api.mixroute.ai"
)
response = client.messages.count_tokens(
model="claude-opus-4-8",
messages=[
{"role": "user", "content": "Hello, how are you?"}
]
)
print(f"Input tokens: {response.input_tokens}")
```
```javascript JavaScript theme={null}
const response = await fetch('https://api.mixroute.ai/v1/messages/count_tokens', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk-xxxxxxxxxx',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model: 'claude-opus-4-8',
messages: [
{ role: 'user', content: 'Hello, how are you?' }
]
})
});
const data = await response.json();
console.log(data);
```
```php PHP theme={null}
post('https://api.mixroute.ai/v1/messages/count_tokens', [
'headers' => [
'Authorization' => 'Bearer sk-xxxxxxxxxx',
'Content-Type' => 'application/json',
],
'json' => [
'model' => 'claude-opus-4-8',
'messages' => [
['role' => 'user', 'content' => 'Hello, how are you?']
]
]
]);
echo $response->getBody();
```
```go Go theme={null}
package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
payload := map[string]interface{}{
"model": "claude-opus-4-8",
"messages": []map[string]string{
{"role": "user", "content": "Hello, how are you?"},
},
}
body, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", "https://api.mixroute.ai/v1/messages/count_tokens", bytes.NewBuffer(body))
req.Header.Set("Authorization", "Bearer sk-xxxxxxxxxx")
req.Header.Set("Content-Type", "application/json")
http.DefaultClient.Do(req)
}
```
```java Java theme={null}
import java.net.http.*;
import java.net.URI;
HttpClient client = HttpClient.newHttpClient();
String json = """
{
"model": "claude-opus-4-8",
"messages": [
{"role": "user", "content": "Hello, how are you?"}
]
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.mixroute.ai/v1/messages/count_tokens"))
.header("Authorization", "Bearer sk-xxxxxxxxxx")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(json))
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```
```ruby Ruby theme={null}
require 'net/http'
require 'json'
uri = URI('https://api.mixroute.ai/v1/messages/count_tokens')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'Bearer sk-xxxxxxxxxx'
request['Content-Type'] = 'application/json'
request.body = {
model: 'claude-opus-4-8',
messages: [
{ role: 'user', content: 'Hello, how are you?' }
]
}.to_json
response = http.request(request)
puts response.body
```
```json Response theme={null}
{
"input_tokens": 14
}
```
# Doubao
Source: https://docs.mixroute.ai/en/api-reference/endpoint/doubao
POST /v1/video/generations
Doubao video generation parameters, supported values, input constraints, and request examples.
This page documents the `doubao-seedance-*` video routes. Doubao is the route/product prefix; Seedance is the video model family. Use the complete model ID rather than exchanging prefixes.
`POST https://api.mixroute.ai/v1/video/generations`
Keep `model`, `prompt`, and `asset` at the root. Put every provider field inside the single `metadata` object, including `content`, `duration`, `ratio`, `resolution`, and `generate_audio`.
For the separate text/chat route, see [Dola-Seed-SC](/en/model-api/volcengine/dola-seed-sc). This page covers video generation.
## Model IDs
| Version | MixRoute model ID |
| ----------------- | --------------------------------- |
| Seedance 2.5 | `doubao-seedance-2-5-260628` |
| Seedance 2.0 | `doubao-seedance-2-0-260128` |
| Seedance 2.0 Fast | `doubao-seedance-2-0-fast-260128` |
| Seedance 2.0 Mini | `doubao-seedance-2-0-mini-260615` |
Model availability is account-specific. Use the complete ID shown in the [Model Marketplace](https://console.mixroute.ai/models).
## Top-Level Fields
| Field | Type | Required | Description |
| ---------- | ------- | ----------- | ---------------------------------------------------------------------------------------------------------------- |
| `model` | string | Yes | Complete MixRoute model ID from the model table. |
| `prompt` | string | Yes | MixRoute video prompt. If `metadata.content` includes a text item, keep both texts consistent. |
| `asset` | boolean | Conditional | MixRoute media-processing switch, not a provider field. Keep it at the root; the text-only examples use `false`. |
| `metadata` | object | Yes | Container for the provider fields described below. |
## Generation Parameters
| Field | Type | Required | Description |
| ----------------------------------- | --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `metadata.content` | object\[] | Yes | Video inputs: text, images, video, and supported audio references. Pure text generation requires a text item; text is optional in provider media-input combinations. |
| `metadata.omni_reference_task_type` | string | No | Seedance 2.5 only. Default `auto`; values: `auto`, `reference`, `edit`, `extend`. Explicit modes enable early task-type validation. A mismatch between the declared mode and the inferred intent can still fail asynchronously. |
| `metadata.resolution` | string | No | Output resolution tier. Supported values and defaults depend on the model version; see the version table. Values are case-sensitive. |
| `metadata.ratio` | string | No | Default `adaptive`. Values: `16:9`, `4:3`, `1:1`, `3:4`, `9:16`, `21:9`, `adaptive`. Scenario constraints are listed below. |
| `metadata.duration` | integer | No | Requested duration in seconds; see the version table. `-1` selects the duration automatically on supported versions. Seedance 2.5 defaults to `-1`, and video editing requires `-1`. |
| `metadata.generate_audio` | boolean | No | Default `true`: generate synchronized mono audio, including speech, sound effects, or music. `false` produces a silent video. |
| `metadata.watermark` | boolean | No | Default `false`. `true` adds an AI-generated watermark in the lower-right corner; `false` omits it. |
| `metadata.output_format` | string | No | Seedance 2.5 only. Default `mp4`; values: `mp4`, `mov`. MP4 is intended for general playback; MOV preserves higher color precision for post-production and requires compatible playback software. |
| `metadata.return_last_frame` | boolean | No | Default `false`. `true` returns a watermark-free PNG of the final frame, with the same pixel dimensions as the generated video, in the task result. |
| `metadata.callback_url` | string | No | Task-status callback URL. The provider sends POST notifications with its task-query response structure. Statuses include `queued`, `running`, `succeeded`, `failed`, and `expired`. |
| `metadata.execution_expires_after` | integer | No | Range 3600-259200 seconds; default 172800 (48 hours), measured from task creation. A task that exceeds this threshold is terminated with status `expired`. |
| `metadata.priority` | integer | No | 2.5 and 2.0 only. Range 0-9; default 0. Higher values move ahead of lower-priority queued tasks on the same endpoint. Equal priorities remain FIFO; running tasks are not interrupted. Not supported with `flex`. |
| `metadata.safety_identifier` | string | No | Stable, unique identifier for the end user, limited to 64 English characters. Use a hashed identifier instead of raw personal information. |
| `metadata.tools` | object\[] | No | 2.5 and 2.0 only. Each tool requires `type`; the supported value is `web_search`. The model decides whether to search. The query result exposes the search count in `usage.tool_usage.web_search`. |
## Version Limits
| Version | Resolution | Default Resolution | Duration | Reference Limits (Images / Videos / Audio) |
| ------------------------ | -------------------------------- | ------------------ | ----------- | ------------------------------------------ |
| Seedance 2.5 | `480p` / `720p` / `1080p` | `720p` | 4-30 s / -1 | 30 / 10 / 10 |
| Seedance 2.0 | `480p` / `720p` / `1080p` / `4k` | `720p` | 4-15 s / -1 | 9 / 3 / 3 |
| Seedance 2.0 Fast / Mini | `480p` / `720p` | `720p` | 4-15 s / -1 | 9 / 3 / 3 |
The nested content fields and media size/format constraints are defined in [Seedance](/en/api-reference/endpoint/seedance).
## Scenario Constraints
* First-frame, first/last-frame, and multimodal reference workflows are mutually exclusive. Do not mix frame roles with `reference_*` roles.
* Seedance 2.5 requires `ratio="adaptive"` for first/last-frame input, editing, and extension. Editing requires at least one reference video lasting 4-30 seconds and `duration=-1`; extension requires a reference video. The optional `omni_reference_task_type` can explicitly select `edit` or `extend` instead of automatic classification.
* Seedance 2.0 audio references require at least one image or video reference. Seedance 2.5 also supports audio-only reference input.
## Examples
Set `MIXROUTE_API_KEY` before calling the API. Replace media placeholders with accessible inputs. Accepted requests create billable generation tasks; do not automatically resubmit after a submission timeout.
```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "doubao-seedance-2-5-260628",
"prompt": "A red cube slowly rotates on a white background. Static camera.",
"asset": false,
"metadata": {
"content": [
{
"type": "text",
"text": "A red cube slowly rotates on a white background. Static camera."
}
],
"duration": 4,
"ratio": "9:16",
"resolution": "480p",
"generate_audio": false
}
}'
```
### Python
```python theme={null}
import json
import os
import requests
payload = json.loads(r'''
{
"model": "doubao-seedance-2-5-260628",
"prompt": "A red cube slowly rotates on a white background. Static camera.",
"asset": false,
"metadata": {
"content": [
{
"type": "text",
"text": "A red cube slowly rotates on a white background. Static camera."
}
],
"duration": 4,
"ratio": "9:16",
"resolution": "480p",
"generate_audio": false
}
}
''')
response = requests.post(
"https://api.mixroute.ai/v1/video/generations",
headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
json=payload,
timeout=120,
)
response.raise_for_status()
result = response.json()
print(result)
```
## Task Results
Save the MixRoute task ID returned by submission and poll [Query Video Task](/en/api-reference/endpoint/query-video-task). A successful submission creates a task; read the result only after the task reaches a successful terminal state. Response envelopes and result locations vary by route.
# Download Video
Source: https://docs.mixroute.ai/en/api-reference/endpoint/download-video
GET /v1/video/generations/download
Download completed video file data
## Introduction
The download video endpoint is used to retrieve completed video file data.
This endpoint is only supported by Sora 2 model. Other models (Veo, Doubao Seedance) return the video URL directly in the query task response, no additional download step required.
## Authentication
Bearer Token, e.g., `Bearer sk-xxxxxxxxxx`
## Query Parameters
Video ID, the `task_id` returned by the query task endpoint
## cURL Example
```bash theme={null}
curl -X GET "https://api.mixroute.ai/v1/video/generations/download?id=video_69095b4ce0048190893a01510c0c98b0" \
-H "Authorization: Bearer sk-xxxxxxxxxx"
```
## Response Example
```json theme={null}
{
"success": true,
"generation_id": "video_69095b4ce0048190893a01510c0c98b0",
"task_id": "video_69095b4ce0048190893a01510c0c98b0",
"format": "mp4",
"size": 15728640,
"base64": "AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAAB...",
"data_url": "data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAAB..."
}
```
## Response Fields
| Field | Type | Description |
| --------------- | ------- | -------------------------------------------------------------------------- |
| `success` | boolean | Whether the request was successful |
| `generation_id` | string | Generation ID (same as videoId) |
| `task_id` | string | Task ID |
| `format` | string | Video format (fixed to `"mp4"`) |
| `size` | number | Video file size (bytes) |
| `base64` | string | Base64 encoded video data |
| `data_url` | string | Data URL format video data, can be used directly in frontend `