OrcaRouter
Access 117 OrcaRouter models through Mastra's model router. Authentication is handled automatically using the ORCAROUTER_API_KEY environment variable.
Learn more in the OrcaRouter documentation.
.env
ORCAROUTER_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: "orcarouter/anthropic/claude-fable-5"
});
// 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 OrcaRouter documentation for details.
ModelsDirect link to Models
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|---|---|---|---|---|---|---|---|---|
orcarouter/anthropic/claude-fable-5 | 1.0M | $10 | $50 | |||||
orcarouter/anthropic/claude-haiku-4.5 | 200K | $1 | $5 | |||||
orcarouter/anthropic/claude-opus-4.5 | 200K | $5 | $25 | |||||
orcarouter/anthropic/claude-opus-4.6 | 1.0M | $5 | $25 | |||||
orcarouter/anthropic/claude-opus-4.7 | 1.0M | $5 | $25 | |||||
orcarouter/anthropic/claude-opus-4.8 | 1.0M | $5 | $25 | |||||
orcarouter/anthropic/claude-opus-5 | 1.0M | $5 | $25 | |||||
orcarouter/anthropic/claude-sonnet-4.5 | 1.0M | $3 | $15 | |||||
orcarouter/anthropic/claude-sonnet-4.6 | 1.0M | $3 | $15 | |||||
orcarouter/anthropic/claude-sonnet-5 | 1.0M | $2 | $10 | |||||
orcarouter/deepseek/deepseek-chat | 1.0M | $0.15 | $0.29 | |||||
orcarouter/deepseek/deepseek-reasoner | 1.0M | $0.15 | $0.29 | |||||
orcarouter/deepseek/deepseek-v4-flash | 1.0M | $0.15 | $0.29 | |||||
orcarouter/deepseek/deepseek-v4-flash-0731 | 1.0M | $0.15 | $0.29 | |||||
orcarouter/deepseek/deepseek-v4-flash-free | 1.0M | — | — | |||||
orcarouter/deepseek/deepseek-v4-flash-vision-exp | 1.0M | $0.15 | $0.29 | |||||
orcarouter/deepseek/deepseek-v4-pro | 1.0M | $0.44 | $0.88 | |||||
orcarouter/deepseek/deepseek-v4-pro-0813 | 1.0M | $0.44 | $0.88 | |||||
orcarouter/google/gemini-2.5-flash | 1.0M | $0.30 | $3 | |||||
orcarouter/google/gemini-2.5-flash-lite | 1.0M | $0.10 | $0.40 | |||||
orcarouter/google/gemini-2.5-pro | 1.0M | $1 | $10 | |||||
orcarouter/google/gemini-3-flash-preview | 1.0M | $0.50 | $3 | |||||
orcarouter/google/gemini-3.1-flash-lite | 1.0M | $0.25 | $2 | |||||
orcarouter/google/gemini-3.1-flash-lite-preview | 1.0M | $0.25 | $2 | |||||
orcarouter/google/gemini-3.1-pro-preview | 1.0M | $2 | $12 | |||||
orcarouter/google/gemini-3.1-pro-preview-customtools | 1.0M | $2 | $12 | |||||
orcarouter/google/gemini-3.5-flash | 1.0M | $2 | $9 | |||||
orcarouter/google/gemini-3.5-flash-lite | 1.0M | $0.30 | $3 | |||||
orcarouter/google/gemini-3.6-flash | 1.0M | $2 | $8 | |||||
orcarouter/google/gemini-flash-latest | 1.0M | $0.50 | $3 | |||||
orcarouter/google/gemini-flash-lite-latest | 1.0M | $0.25 | $2 | |||||
orcarouter/google/gemini-robotics-er-1.6-preview | 131K | $1 | $5 | |||||
orcarouter/google/gemma-4-26b-a4b-it | 262K | $0.06 | $0.33 | |||||
orcarouter/google/gemma-4-31b-it | 262K | $0.13 | $0.38 | |||||
orcarouter/grok/grok-4.3 | 1.0M | $1 | $3 | |||||
orcarouter/grok/grok-4.5 | 500K | $2 | $6 | |||||
orcarouter/grok/grok-4.6 | 500K | $2 | $6 | |||||
orcarouter/kimi/kimi-k2.5 | 262K | $0.60 | $3 | |||||
orcarouter/kimi/kimi-k2.6 | 262K | $0.95 | $4 | |||||
orcarouter/kimi/kimi-k2.7-code | 262K | $0.95 | $4 | |||||
orcarouter/kimi/kimi-k3 | 1.0M | $3 | $17 | |||||
orcarouter/meta/muse-spark-1.1 | 1.0M | $1 | $4 | |||||
orcarouter/meta/muse-spark-1.2 | 1.0M | $1 | $4 | |||||
orcarouter/minimax/minimax-m2.5 | 205K | $0.30 | $1 | |||||
orcarouter/minimax/minimax-m2.5-highspeed | 205K | $0.60 | $2 | |||||
orcarouter/minimax/minimax-m2.7 | 205K | $0.30 | $1 | |||||
orcarouter/minimax/minimax-m2.7-highspeed | 205K | $0.60 | $2 | |||||
orcarouter/minimax/minimax-m3 | 1.0M | $0.30 | $1 | |||||
orcarouter/openai/gpt-3.5-turbo | 16K | $0.50 | $2 | |||||
orcarouter/openai/gpt-4 | 8K | $30 | $60 | |||||
orcarouter/openai/gpt-4-turbo | 128K | $10 | $30 | |||||
orcarouter/openai/gpt-4.1 | 1.0M | $2 | $8 | |||||
orcarouter/openai/gpt-4.1-mini | 1.0M | $0.40 | $2 | |||||
orcarouter/openai/gpt-4.1-nano | 1.0M | $0.10 | $0.40 | |||||
orcarouter/openai/gpt-4o | 128K | $3 | $10 | |||||
orcarouter/openai/gpt-4o-2024-05-13 | 128K | $5 | $15 | |||||
orcarouter/openai/gpt-4o-2024-08-06 | 128K | $3 | $10 | |||||
orcarouter/openai/gpt-4o-2024-11-20 | 128K | $3 | $10 | |||||
orcarouter/openai/gpt-4o-mini | 128K | $0.15 | $0.60 | |||||
orcarouter/openai/gpt-5 | 400K | $1 | $10 | |||||
orcarouter/openai/gpt-5-chat-latest | 400K | $1 | $10 | |||||
orcarouter/openai/gpt-5-mini | 400K | $0.25 | $2 | |||||
orcarouter/openai/gpt-5-nano | 400K | $0.05 | $0.40 | |||||
orcarouter/openai/gpt-5-pro | 400K | $15 | $120 | |||||
orcarouter/openai/gpt-5.1 | 400K | $1 | $10 | |||||
orcarouter/openai/gpt-5.1-chat-latest | 128K | $1 | $10 | |||||
orcarouter/openai/gpt-5.1-codex | 400K | $1 | $10 | |||||
orcarouter/openai/gpt-5.1-codex-mini | 400K | $0.25 | $2 | |||||
orcarouter/openai/gpt-5.2 | 400K | $2 | $14 | |||||
orcarouter/openai/gpt-5.2-chat-latest | 128K | $2 | $14 | |||||
orcarouter/openai/gpt-5.2-codex | 400K | $2 | $14 | |||||
orcarouter/openai/gpt-5.2-pro | 400K | $21 | $168 | |||||
orcarouter/openai/gpt-5.3-codex | 400K | $2 | $14 | |||||
orcarouter/openai/gpt-5.4 | 1.1M | $3 | $15 | |||||
orcarouter/openai/gpt-5.4-mini | 400K | $0.75 | $5 | |||||
orcarouter/openai/gpt-5.4-nano | 400K | $0.20 | $1 | |||||
orcarouter/openai/gpt-5.4-pro | 1.1M | $30 | $180 | |||||
orcarouter/openai/gpt-5.5 | 1.1M | $5 | $30 | |||||
orcarouter/openai/gpt-5.5-pro | 1.1M | $30 | $180 | |||||
orcarouter/openai/gpt-5.6-luna | 1.1M | $0.20 | $1 | |||||
orcarouter/openai/gpt-5.6-sol | 1.1M | $4 | $20 | |||||
orcarouter/openai/gpt-5.6-terra | 1.1M | $2 | $12 | |||||
orcarouter/openai/gpt-oss-120b | 131K | $0.03 | $0.17 | |||||
orcarouter/orcarouter/auto | 128K | — | — | |||||
orcarouter/orcarouter/free | 66K | — | — | |||||
orcarouter/orcarouter/fusion | 1.0M | — | — | |||||
orcarouter/orcarouter/fusion-flash | 200K | — | — | |||||
orcarouter/orcarouter/fusion-mini | 1.0M | — | — | |||||
orcarouter/qwen/qwen3-max | 262K | $0.36 | $1 | |||||
orcarouter/qwen/qwen3-vl-235b-a22b-instruct | 131K | $0.40 | $2 | |||||
orcarouter/qwen/qwen3-vl-235b-a22b-thinking | 131K | $0.40 | $4 | |||||
orcarouter/qwen/qwen3.5-122b-a10b | 262K | $0.12 | $0.92 | |||||
orcarouter/qwen/qwen3.5-27b | 262K | $0.09 | $0.69 | |||||
orcarouter/qwen/qwen3.5-35b-a3b | 262K | $0.06 | $0.46 | |||||
orcarouter/qwen/qwen3.5-397b-a17b | 262K | $0.17 | $1 | |||||
orcarouter/qwen/qwen3.5-flash | 1.0M | $0.10 | $0.40 | |||||
orcarouter/qwen/qwen3.5-plus | 1.0M | $0.12 | $0.69 | |||||
orcarouter/qwen/qwen3.6-35b-a3b | 262K | $0.25 | $1 | |||||
orcarouter/qwen/qwen3.6-flash | 1.0M | $0.25 | $2 | |||||
orcarouter/qwen/qwen3.6-plus | 1.0M | $0.50 | $3 | |||||
orcarouter/qwen/qwen3.7-flash | 1.0M | $0.03 | $0.13 | |||||
orcarouter/qwen/qwen3.7-max | 1.0M | $1 | $4 | |||||
orcarouter/qwen/qwen3.7-plus | 1.0M | $0.35 | $1 | |||||
orcarouter/qwen/qwen3.8-27b | 262K | $0.33 | $2 | |||||
orcarouter/qwen/qwen3.8-27b-free | 66K | — | — | |||||
orcarouter/qwen/qwen3.8-max | 1.0M | $2 | $6 | |||||
orcarouter/tencent/hy3 | 256K | $0.18 | $0.59 | |||||
orcarouter/tencent/hy3-free | 256K | — | — | |||||
orcarouter/z-ai/glm-4.5 | 131K | $0.60 | $2 | |||||
orcarouter/z-ai/glm-4.5-air | 131K | $0.20 | $1 | |||||
orcarouter/z-ai/glm-4.6 | 205K | $0.60 | $2 | |||||
orcarouter/z-ai/glm-4.7 | 205K | $0.60 | $2 | |||||
orcarouter/z-ai/glm-5 | 205K | $1 | $3 | |||||
orcarouter/z-ai/glm-5.1 | 200K | $1 | $4 | |||||
orcarouter/z-ai/glm-5.2 | 1.0M | $1 | $4 | |||||
orcarouter/z-ai/glm-5.3 | 1.0M | $1 | $4 | |||||
orcarouter/z-ai/glm-5.3-flash | 1.0M | $0.07 | $0.25 |
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.orcarouter.ai/v1",
id: "orcarouter/anthropic/claude-fable-5",
apiKey: process.env.ORCAROUTER_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
? "orcarouter/z-ai/glm-5.3-flash"
: "orcarouter/anthropic/claude-fable-5";
}
});