IteraCompute
Access 27 IteraCompute models through Mastra's model router. Authentication is handled automatically using the ITERACOMPUTE_API_KEY environment variable.
Learn more in the IteraCompute documentation.
.env
ITERACOMPUTE_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: "iteracompute/anthropic/claude-fable-5-1"
});
// 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 IteraCompute documentation for details.
ModelsDirect link to Models
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|---|---|---|---|---|---|---|---|---|
iteracompute/anthropic/claude-fable-5-1 | 1.0M | $5 | $25 | |||||
iteracompute/anthropic/claude-haiku-5-5 | 1.0M | $0.05 | $0.25 | |||||
iteracompute/anthropic/claude-opus-5-5 | 1.0M | $2 | $10 | |||||
iteracompute/anthropic/claude-sonnet-5-5 | 1.0M | $1 | $5 | |||||
iteracompute/deepseek/deepseek-v4-flash-0731 | 1.0M | $0.17 | $0.70 | |||||
iteracompute/deepseek/deepseek-v4-pro-0813 | 1.0M | $0.60 | $2 | |||||
iteracompute/deepseek/deepseek-v4.1-flash | 1.0M | $0.14 | $0.55 | |||||
iteracompute/deepseek/deepseek-v4.1-flash-1017 | 1.0M | $0.14 | $0.55 | |||||
iteracompute/gemini/gemini-3.8-flash | 1.0M | $0.60 | $3 | |||||
iteracompute/gemini/gemini-4-argon | 1.0M | $2 | $8 | |||||
iteracompute/minimax/minimax-m2.5 | 205K | $0.27 | $1 | |||||
iteracompute/minimax/minimax-m2.7 | 205K | $0.38 | $1 | |||||
iteracompute/minimax/minimax-m3 | 1.0M | $0.30 | $1 | |||||
iteracompute/moonshotai/kimi-k2.5 | 262K | $0.54 | $3 | |||||
iteracompute/moonshotai/kimi-k2.6 | 262K | $0.87 | $4 | |||||
iteracompute/moonshotai/kimi-k2.7-code | 262K | $0.69 | $3 | |||||
iteracompute/moonshotai/kimi-k3 | 1.0M | $2 | $12 | |||||
iteracompute/openai/gpt-6-astra | 1.1M | $8 | $40 | |||||
iteracompute/openai/gpt-6-luna | 1.1M | $0.08 | $0.40 | |||||
iteracompute/openai/gpt-6.1-sol | 1.1M | $2 | $8 | |||||
iteracompute/qwen/qwen3.8-2.4t-a95b | 1.0M | $2 | $6 | |||||
iteracompute/qwen/qwen3.8-27b | 131K | — | — | |||||
iteracompute/qwen/qwen3.8-flash | 1.0M | $0.11 | $0.38 | |||||
iteracompute/qwen/qwen3.8-max | 1.0M | $2 | $6 | |||||
iteracompute/z-ai/glm-5.2 | 1.0M | $0.53 | $2 | |||||
iteracompute/z-ai/glm-5.3 | 1.0M | $0.82 | $3 | |||||
iteracompute/z-ai/glm-5.3-flash | 1.0M | $0.08 | $0.28 |
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
import { Agent } from "@mastra/core/agent";
const agent = new Agent({
id: "custom-agent",
name: "custom-agent",
model: {
url: "https://api.iteracompute.com/v1",
id: "iteracompute/anthropic/claude-fable-5-1",
apiKey: process.env.ITERACOMPUTE_API_KEY,
headers: {
"X-Custom-Header": "value"
}
}
});
Dynamic model selectionDirect link to Dynamic model selection
src/mastra/agents/my-agent.ts
import { Agent } from "@mastra/core/agent";
const agent = new Agent({
id: "dynamic-agent",
name: "Dynamic Agent",
model: ({ requestContext }) => {
const useAdvanced = requestContext.task === "complex";
return useAdvanced
? "iteracompute/z-ai/glm-5.3-flash"
: "iteracompute/anthropic/claude-fable-5-1";
}
});