SteadyRouter
Access 21 SteadyRouter models through Mastra's model router. Authentication is handled automatically using the STEADYROUTER_API_KEY environment variable.
Learn more in the SteadyRouter documentation.
.env
STEADYROUTER_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: "steadyrouter/MiniMax-M3"
});
// 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 SteadyRouter documentation for details.
ModelsDirect link to Models
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|---|---|---|---|---|---|---|---|---|
steadyrouter/claude-fable-5-1 | 1.0M | — | — | |||||
steadyrouter/claude-haiku-5-5 | 1.0M | — | — | |||||
steadyrouter/claude-opus-5-5 | 1.0M | — | — | |||||
steadyrouter/claude-sonnet-5-5 | 1.0M | — | — | |||||
steadyrouter/deepseek-v4-flash | 1.0M | — | — | |||||
steadyrouter/deepseek-v4-pro-0813 | 1.0M | — | — | |||||
steadyrouter/deepseek-v4.1-flash | 1.0M | — | — | |||||
steadyrouter/gemini-3.8-flash | 1.0M | — | — | |||||
steadyrouter/gemini-4-argon | 1.0M | — | — | |||||
steadyrouter/glm-5.3-flash | 1.0M | — | — | |||||
steadyrouter/gpt-5.4 | 1.1M | — | — | |||||
steadyrouter/gpt-5.4-mini | 400K | — | — | |||||
steadyrouter/gpt-6-astra | 1.1M | — | — | |||||
steadyrouter/gpt-6.1-sol | 1.1M | — | — | |||||
steadyrouter/gpt-image-2-c | — | — | — | |||||
steadyrouter/grok-4.7 | 500K | — | — | |||||
steadyrouter/kimi-k2.6 | 262K | — | — | |||||
steadyrouter/kimi-k3 | 1.0M | — | — | |||||
steadyrouter/MiniMax-M3 | 1.0M | — | — | |||||
steadyrouter/qwen3.8-flash | 1.0M | — | — | |||||
steadyrouter/qwen3.8-max | 1.0M | — | — |
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.steadyrouter.com/v1",
id: "steadyrouter/MiniMax-M3",
apiKey: process.env.STEADYROUTER_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
? "steadyrouter/qwen3.8-max"
: "steadyrouter/MiniMax-M3";
}
});