Watt Cloud
Access 18 Watt Cloud models through Mastra's model router. Authentication is handled automatically using the WATT_API_KEY environment variable.
Learn more in the Watt Cloud documentation.
.env
WATT_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: "watt/DeepSeek-V4-Flash"
});
// 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 Watt Cloud documentation for details.
ModelsDirect link to Models
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|---|---|---|---|---|---|---|---|---|
watt/DeepSeek-V4-Flash | 1.0M | $0.14 | $0.28 | |||||
watt/DeepSeek-V4-Flash-0731 | 1.0M | $0.44 | $1 | |||||
watt/DeepSeek-V4-Pro | 1.0M | $2 | $3 | |||||
watt/DeepSeek-V4.1-Flash | 1.0M | $0.29 | $1 | |||||
watt/DeepSeek-V4.1-Flash-1017 | 1.0M | $0.30 | $1 | |||||
watt/GLM-5.1 | 203K | $1 | $4 | |||||
watt/GLM-5.2 | 1.0M | $1 | $4 | |||||
watt/GLM-5.3 | 1.0M | $1 | $4 | |||||
watt/GLM-5.3-Flash | 1.0M | $0.15 | $0.50 | |||||
watt/Hy4-preview | 1.0M | $0.83 | $3 | |||||
watt/Kimi-K2.5 | 271K | $0.60 | $3 | |||||
watt/Kimi-K2.7-Code | 271K | $0.95 | $4 | |||||
watt/Kimi-K3 | 1.0M | $3 | $15 | |||||
watt/MiniMax-M3 | 524K | $0.60 | $2 | |||||
watt/Qwen3.5-122B-A10B | 262K | $0.40 | $3 | |||||
watt/Qwen3.5-27B | 262K | $0.30 | $2 | |||||
watt/Qwen3.5-35B-A3B | 262K | $0.25 | $2 | |||||
watt/Qwen3.5-397B-A17B | 262K | $0.60 | $4 |
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.watt-cloud.com/v1",
id: "watt/DeepSeek-V4-Flash",
apiKey: process.env.WATT_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
? "watt/Qwen3.5-397B-A17B"
: "watt/DeepSeek-V4-Flash";
}
});