Chutes
Access 31 Chutes models through Mastra’s model router. Authentication is handled automatically using the CHUTES_API_KEY
environment variable.
Learn more in the Chutes documentation .
CHUTES_API_KEY=your-api-key
import { Agent } from "@mastra/core";
const agent = new Agent({
name: "my-agent",
instructions: "You are a helpful assistant",
model: "chutes/Qwen/Qwen3-235B-A22B-Instruct-2507"
});
// 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);
}
Mastra uses the OpenAI-compatible /chat/completions
endpoint. Some provider-specific features may not be available. Check the Chutes documentation for details.
Models
Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
---|---|---|---|---|---|---|---|---|
chutes/moonshotai/Kimi-Dev-72B | 131K | $0.07 | $0.27 | |||||
chutes/moonshotai/Kimi-K2-Instruct-75k | 75K | $0.15 | $0.59 | |||||
chutes/moonshotai/Kimi-K2-Instruct-0905 | 262K | $0.30 | $1 | |||||
chutes/moonshotai/Kimi-VL-A3B-Thinking | 131K | $0.02 | $0.10 | |||||
chutes/meituan-longcat/LongCat-Flash-Chat-FP8 | 131K | $0.25 | $1 | |||||
chutes/tngtech/DeepSeek-R1T-Chimera | 164K | $0.18 | $0.72 | |||||
chutes/tngtech/DeepSeek-TNG-R1T2-Chimera | 164K | $0.20 | $0.80 | |||||
chutes/openai/gpt-oss-120b | 131K | $0.10 | $0.41 | |||||
chutes/chutesai/Devstral-Small-2505 | 33K | $0.02 | $0.08 | |||||
chutes/chutesai/Mistral-Small-3.2-24B-Instruct-2506 | 131K | $0.02 | $0.08 | |||||
chutes/Qwen/Qwen3-30B-A3B | 41K | $0.02 | $0.08 | |||||
chutes/Qwen/Qwen3-30B-A3B-Thinking-2507 | 262K | $0.08 | $0.29 | |||||
chutes/Qwen/Qwen3-235B-A22B-Instruct-2507 | 262K | $0.08 | $0.31 | |||||
chutes/Qwen/Qwen3-Coder-30B-A3B-Instruct | 262K | — | — | |||||
chutes/Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8 | 262K | $0.20 | $0.80 | |||||
chutes/Qwen/Qwen3-30B-A3B-Instruct-2507 | 262K | $0.05 | $0.20 | |||||
chutes/Qwen/Qwen3-235B-A22B-Thinking-2507 | 262K | $0.08 | $0.31 | |||||
chutes/Qwen/Qwen3-Next-80B-A3B-Instruct | 262K | $0.10 | $0.80 | |||||
chutes/Qwen/Qwen3-Next-80B-A3B-Thinking | 262K | $0.10 | $0.80 | |||||
chutes/zai-org/GLM-4.5-turbo | 131K | $1 | $3 | |||||
chutes/zai-org/GLM-4.6-FP8 | 205K | $0.39 | $2 | |||||
chutes/zai-org/GLM-4.5-FP8 | 131K | — | — | |||||
chutes/zai-org/GLM-4.5-Air | 131K | — | — | |||||
chutes/deepseek-ai/DeepSeek-R1-0528-Qwen3-8B | 131K | $0.02 | $0.07 | |||||
chutes/deepseek-ai/DeepSeek-R1-0528 | 75K | $0.18 | $0.72 | |||||
chutes/deepseek-ai/DeepSeek-V3.1-Terminus | 131K | $0.25 | $1 | |||||
chutes/deepseek-ai/DeepSeek-V3.1-turbo | 128K | $1 | $3 | |||||
chutes/deepseek-ai/DeepSeek-V3.1:THINKING | 164K | $0.20 | $0.80 | |||||
chutes/deepseek-ai/DeepSeek-R1-Distill-Llama-70B | 131K | $0.03 | $0.14 | |||||
chutes/deepseek-ai/DeepSeek-V3.1 | 164K | $0.20 | $0.80 | |||||
chutes/deepseek-ai/DeepSeek-V3-0324 | 75K | $0.18 | $0.72 |
Advanced Configuration
Custom Headers
const agent = new Agent({
name: "custom-agent",
model: {
url: "https://llm.chutes.ai/v1/chat/completions",
modelId: "Qwen/Qwen3-235B-A22B-Instruct-2507",
apiKey: process.env.CHUTES_API_KEY,
headers: {
"X-Custom-Header": "value"
}
}
});
Dynamic Model Selection
const agent = new Agent({
name: "dynamic-agent",
model: ({ runtimeContext }) => {
const useAdvanced = runtimeContext.task === "complex";
return useAdvanced
? "chutes/Qwen/Qwen3-235B-A22B-Instruct-2507"
: "chutes/Qwen/Qwen3-235B-A22B-Thinking-2507";
}
});