Scaleway
Access 13 Scaleway models through Mastra's model router. Authentication is handled automatically using the SCALEWAY_API_KEY environment variable.
Learn more in the Scaleway documentation.
SCALEWAY_API_KEY=your-api-key
import { Agent } from "@mastra/core";
const agent = new Agent({
name: "my-agent",
instructions: "You are a helpful assistant",
model: "scaleway/bge-multilingual-gemma2"
});
// 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);
}
info
Mastra uses the OpenAI-compatible /chat/completions endpoint. Some provider-specific features may not be available. Check the Scaleway documentation for details.
Models
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|---|---|---|---|---|---|---|---|---|
scaleway/bge-multilingual-gemma2 | 8K | $0.13 | — | |||||
scaleway/deepseek-r1-distill-llama-70b | 32K | $0.90 | $0.90 | |||||
scaleway/gemma-3-27b-it | 40K | $0.25 | $0.50 | |||||
scaleway/gpt-oss-120b | 128K | $0.15 | $0.60 | |||||
scaleway/llama-3.1-8b-instruct | 128K | $0.20 | $0.20 | |||||
scaleway/llama-3.3-70b-instruct | 100K | $0.90 | $0.90 | |||||
scaleway/mistral-nemo-instruct-2407 | 128K | $0.20 | $0.20 | |||||
scaleway/mistral-small-3.2-24b-instruct-2506 | 128K | $0.15 | $0.35 | |||||
scaleway/pixtral-12b-2409 | 128K | $0.20 | $0.20 | |||||
scaleway/qwen3-235b-a22b-instruct-2507 | 260K | $0.75 | $2 | |||||
scaleway/qwen3-coder-30b-a3b-instruct | 128K | $0.20 | $0.80 | |||||
scaleway/voxtral-small-24b-2507 | 32K | $0.15 | $0.35 | |||||
scaleway/whisper-large-v3 | — | $0.00 | — |
Advanced Configuration
Custom Headers
const agent = new Agent({
name: "custom-agent",
model: {
url: "https://api.scaleway.ai/v1",
id: "scaleway/bge-multilingual-gemma2",
apiKey: process.env.SCALEWAY_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
? "scaleway/whisper-large-v3"
: "scaleway/bge-multilingual-gemma2";
}
});