Novita AI
Access 86 Novita AI models through Mastra's model router. Authentication is handled automatically using the NOVITA_API_KEY environment variable.
Learn more in the Novita AI documentation.
.env
NOVITA_API_KEY=your-api-key
src/mastra/agents/my-agent.ts
import { Agent } from "@mastra/core/agent";
const agent = new Agent({
id: "my-agent",
name: "My Agent",
instructions: "You are a helpful assistant",
model: "novita-ai/apodex/apodex-1.1-mini"
});
// Generate a response
const response = await agent.generate("Hello!");
// Stream a response
const stream = await agent.stream("Tell me a story");
for await (const chunk of stream) {
console.log(chunk);
}
note
Mastra uses the OpenAI-compatible /chat/completions endpoint. Some provider-specific features may not be available. Check the Novita AI documentation for details.
ModelsDirect link to Models
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|---|---|---|---|---|---|---|---|---|
novita-ai/apodex/apodex-1.1-mini | 262K | — | — | |||||
novita-ai/baai/bge-m3 | 8K | $0.01 | — | |||||
novita-ai/baai/bge-reranker-v2-m3 | 8K | $0.01 | — | |||||
novita-ai/baichuan/baichuan-m2-32b | 131K | $0.07 | $0.07 | |||||
novita-ai/baidu/cobuddy | 131K | $0.28 | $1 | |||||
novita-ai/baidu/ernie-4.5-21B-a3b | 120K | $0.07 | $0.28 | |||||
novita-ai/deepseek/deepseek_v3 | 64K | $0.89 | $0.89 | |||||
novita-ai/deepseek/deepseek-ocr-2 | 8K | $0.03 | $0.03 | |||||
novita-ai/deepseek/deepseek-r1-0528 | 164K | $0.70 | $3 | |||||
novita-ai/deepseek/deepseek-r1-0528-qwen3-8b | 128K | $0.06 | $0.09 | |||||
novita-ai/deepseek/deepseek-r1-turbo | 64K | $0.70 | $3 | |||||
novita-ai/deepseek/deepseek-v4-flash-0731 | 1.0M | $0.44 | $1 | |||||
novita-ai/deepseek/deepseek-v4-pro | 1.0M | $2 | $3 | |||||
novita-ai/deepseek/deepseek-v4-pro-0813 | 1.0M | $1 | $4 | |||||
novita-ai/deepseek/deepseek-v4.1-flash | 1.0M | $0.30 | $1 | |||||
novita-ai/deepseek/deepseek-v4.1-flash-1017 | 1.0M | $0.30 | $1 | |||||
novita-ai/google/gemma-3-12b-it | 131K | $0.05 | $0.10 | |||||
novita-ai/google/gemma-3-27b-it | 98K | $0.12 | $0.20 | |||||
novita-ai/google/gemma-4-26b-a4b-it | 262K | $0.13 | $0.40 | |||||
novita-ai/google/gemma-4-31b-it | 262K | $0.14 | $0.40 | |||||
novita-ai/gryphe/mythomax-l2-13b | 4K | $0.09 | $0.09 | |||||
novita-ai/inclusionai/ling-3.0-flash | 262K | $0.06 | $0.18 | |||||
novita-ai/inclusionai/ling-3.0-flash-fin | 262K | $0.07 | $0.22 | |||||
novita-ai/inclusionai/ling-3.0-flash-sante | 262K | $0.07 | $0.22 | |||||
novita-ai/inclusionai/ling-3.0-flash-vl | 262K | $0.07 | $0.22 | |||||
novita-ai/inclusionai/ling-3.1-flash | 262K | $0.30 | $0.90 | |||||
novita-ai/meta-llama/llama-3.1-8b-instruct | 16K | $0.02 | $0.05 | |||||
novita-ai/meta-llama/llama-3.2-1b-instruct | 131K | $0.02 | $0.02 | |||||
novita-ai/meta-llama/llama-3.3-70b-instruct | 12K | $0.14 | $0.40 | |||||
novita-ai/meta-llama/llama-4-maverick-17b-128e-instruct-fp8 | 1.0M | $0.27 | $0.85 | |||||
novita-ai/meta-llama/llama-4-scout-17b-16e-instruct | 131K | $0.18 | $0.59 | |||||
novita-ai/microsoft/wizardlm-2-8x22b | 66K | $0.62 | $0.62 | |||||
novita-ai/mindai/macaron-v1-tall | 262K | $0.25 | $1 | |||||
novita-ai/mindai/macaron-v1-venti | 1.0M | $0.82 | $2 | |||||
novita-ai/minimax/minimax-m2.5 | 205K | $0.30 | $1 | |||||
novita-ai/minimax/minimax-m2.7 | 205K | $0.30 | $1 | |||||
novita-ai/minimax/minimax-m2.7-highspeed | 205K | $0.60 | $2 | |||||
novita-ai/minimax/minimax-m3 | 1.0M | $0.30 | $1 | |||||
novita-ai/minimaxai/minimax-m1-80k | 1.0M | $0.55 | $2 | |||||
novita-ai/moonshotai/kimi-k2-0905 | 262K | $0.60 | $3 | |||||
novita-ai/moonshotai/kimi-k2-instruct | 131K | $0.57 | $2 | |||||
novita-ai/moonshotai/kimi-k2-thinking | 262K | $0.60 | $3 | |||||
novita-ai/moonshotai/kimi-k2.5 | 262K | $0.60 | $3 | |||||
novita-ai/moonshotai/kimi-k2.6 | 262K | $0.80 | $3 | |||||
novita-ai/moonshotai/kimi-k2.7-code | 262K | $0.95 | $4 | |||||
novita-ai/moonshotai/kimi-k3 | 1.0M | $3 | $15 | |||||
novita-ai/nousresearch/hermes-2-pro-llama-3-8b | 8K | $0.14 | $0.14 | |||||
novita-ai/nvidia/nemotron-3-nano-30b-a3b | 262K | $0.05 | $0.20 | |||||
novita-ai/openai/gpt-oss-120b | 131K | $0.05 | $0.25 | |||||
novita-ai/paddlepaddle/paddleocr-vl | 16K | $0.02 | $0.02 | |||||
novita-ai/qwen/qwen-mt-plus | 16K | $0.25 | $0.75 | |||||
novita-ai/qwen/qwen3-embedding-8b | 33K | $0.07 | — | |||||
novita-ai/qwen/qwen3-omni-30b-a3b-thinking | 66K | $0.25 | $0.97 | |||||
novita-ai/qwen/qwen3-reranker-8b | 33K | $0.05 | — | |||||
novita-ai/qwen/qwen3-vl-30b-a3b-instruct | 131K | $0.20 | $0.70 | |||||
novita-ai/qwen/qwen3.5-122b-a10b | 262K | $0.40 | $3 | |||||
novita-ai/qwen/qwen3.5-27b | 262K | $0.30 | $2 | |||||
novita-ai/qwen/qwen3.5-35b-a3b | 262K | $0.25 | $2 | |||||
novita-ai/qwen/qwen3.5-397b-a17b | 262K | $0.60 | $4 | |||||
novita-ai/qwen/qwen3.6-27b | 262K | $0.60 | $4 | |||||
novita-ai/qwen/qwen3.6-35b-a3b | 262K | $0.25 | $1 | |||||
novita-ai/qwen/qwen3.7-max | 1.0M | $1 | $4 | |||||
novita-ai/qwen/qwen3.8-2.4t-a95b | 1.0M | $2 | $6 | |||||
novita-ai/qwen/qwen3.8-27b | 1.0M | $0.42 | $3 | |||||
novita-ai/qwen/qwen3.8-flash | 1.0M | $0.15 | $0.47 | |||||
novita-ai/qwen/qwen3.8-max | 1.0M | $2 | $6 | |||||
novita-ai/stepfun/step-3.7-flash | 262K | $0.20 | $1 | |||||
novita-ai/stepfun/step-5-preview | 1.0M | $1 | $3 | |||||
novita-ai/tencent/hy3 | 262K | $0.14 | $0.58 | |||||
novita-ai/tencent/hy4-preview | 1.0M | $0.83 | $3 | |||||
novita-ai/xiaomimimo/mimo-v2.5 | 1.0M | $0.17 | $0.34 | |||||
novita-ai/xiaomimimo/mimo-v2.5-pro | 1.0M | $0.52 | $1 | |||||
novita-ai/xiaomimimo/mimo-v2.6-flash | 1.0M | $0.14 | $0.28 | |||||
novita-ai/xiaomimimo/mimo-v2.6-pro | 1.0M | $0.43 | $0.87 | |||||
novita-ai/zai-org/autoglm-phone-9b-multilingual | 66K | $0.04 | $0.14 | |||||
novita-ai/zai-org/glm-4.5-air | 131K | $0.13 | $0.85 | |||||
novita-ai/zai-org/glm-4.5v | 66K | $0.60 | $2 | |||||
novita-ai/zai-org/glm-4.6 | 205K | $0.55 | $2 | |||||
novita-ai/zai-org/glm-4.6v | 131K | $0.30 | $0.90 | |||||
novita-ai/zai-org/glm-4.7 | 205K | $0.60 | $2 | |||||
novita-ai/zai-org/glm-4.7-flash | 200K | $0.07 | $0.40 | |||||
novita-ai/zai-org/glm-5 | 203K | $1 | $3 | |||||
novita-ai/zai-org/glm-5.1 | 205K | $1 | $4 | |||||
novita-ai/zai-org/glm-5.2 | 1.0M | $1 | $4 | |||||
novita-ai/zai-org/glm-5.3 | 1.0M | $1 | $4 | |||||
novita-ai/zai-org/glm-5.3-flash | 1.0M | $0.15 | $0.50 |
Model availability, capabilities, context windows, and pricing are sourced from models.dev and may change.
Advanced configurationDirect link to Advanced configuration
Custom headersDirect link to Custom headers
src/mastra/agents/my-agent.ts
const agent = new Agent({
id: "custom-agent",
name: "custom-agent",
model: {
url: "https://api.novita.ai/openai",
id: "novita-ai/apodex/apodex-1.1-mini",
apiKey: process.env.NOVITA_API_KEY,
headers: {
"X-Custom-Header": "value"
}
}
});
Dynamic model selectionDirect link to Dynamic model selection
src/mastra/agents/my-agent.ts
const agent = new Agent({
id: "dynamic-agent",
name: "Dynamic Agent",
model: ({ requestContext }) => {
const useAdvanced = requestContext.task === "complex";
return useAdvanced
? "novita-ai/zai-org/glm-5.3-flash"
: "novita-ai/apodex/apodex-1.1-mini";
}
});