Pioneer
Access 76 Pioneer models through Mastra's model router. Authentication is handled automatically using the PIONEER_API_KEY environment variable.
Learn more in the Pioneer documentation.
.env
PIONEER_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: "pioneer/HuggingFaceTB/SmolLM3-3B-Base"
});
// 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 Pioneer documentation for details.
ModelsDirect link to Models
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|---|---|---|---|---|---|---|---|---|
pioneer/claude-haiku-4-5 | 200K | $1 | $5 | |||||
pioneer/claude-opus-4-1 | 200K | $15 | $75 | |||||
pioneer/claude-opus-4-5 | 200K | $5 | $25 | |||||
pioneer/claude-opus-4-6 | 1.0M | $5 | $25 | |||||
pioneer/claude-opus-4-7 | 1.0M | $5 | $25 | |||||
pioneer/claude-opus-4-8 | 1.0M | $5 | $25 | |||||
pioneer/claude-sonnet-4-5 | 1.0M | $3 | $15 | |||||
pioneer/claude-sonnet-4-6 | 1.0M | $3 | $15 | |||||
pioneer/deepseek-ai/DeepSeek-V4-Flash | 1.0M | $0.10 | $0.20 | |||||
pioneer/deepseek-ai/DeepSeek-V4-Pro | 1.0M | $0.43 | $0.87 | |||||
pioneer/fastino/gliguard-LLMGuardrails-300M | 8K | $0.15 | $0.15 | |||||
pioneer/fastino/gliner2-base-v1 | 8K | $0.15 | $0.15 | |||||
pioneer/fastino/gliner2-large-v1 | 8K | $0.15 | $0.15 | |||||
pioneer/fastino/gliner2-multi-large-v1 | 8K | $0.15 | $0.15 | |||||
pioneer/fastino/gliner2-multi-v1 | 8K | $0.15 | $0.15 | |||||
pioneer/fastino/gliner2-privacy-filter-PII-multi | 8K | $0.15 | $0.15 | |||||
pioneer/gemini-3-flash | 1.0M | $0.50 | $3 | |||||
pioneer/gemini-3.1-pro | 1.0M | $2 | $12 | |||||
pioneer/gemini-3.5-flash | 1.0M | $2 | $9 | |||||
pioneer/google/diffusiongemma-26B-A4B-it | 262K | $0.50 | $0.50 | |||||
pioneer/google/gemma-3-4b-pt | 33K | $0.15 | $0.15 | |||||
pioneer/google/gemma-4-12B-it | 33K | $0.25 | $0.25 | |||||
pioneer/google/gemma-4-31B-it | 33K | $0.50 | $0.50 | |||||
pioneer/google/gemma-4-E2B-it | 33K | $0.10 | $0.10 | |||||
pioneer/google/gemma-4-E4B-it | 33K | $0.20 | $0.20 | |||||
pioneer/gpt-4.1 | 1.0M | $2 | $8 | |||||
pioneer/gpt-4.1-mini | 1.0M | $0.40 | $2 | |||||
pioneer/gpt-4.1-nano | 1.0M | $0.10 | $0.40 | |||||
pioneer/gpt-4o | 128K | $3 | $10 | |||||
pioneer/gpt-4o-mini | 128K | $0.15 | $0.60 | |||||
pioneer/gpt-5-mini | 400K | $0.25 | $2 | |||||
pioneer/gpt-5-nano | 400K | $0.05 | $0.40 | |||||
pioneer/gpt-5.1 | 400K | $1 | $10 | |||||
pioneer/gpt-5.3-codex | 400K | $2 | $14 | |||||
pioneer/gpt-5.4 | 1.1M | $3 | $15 | |||||
pioneer/gpt-5.4-mini | 400K | $0.75 | $5 | |||||
pioneer/gpt-5.4-nano | 1.0M | $0.20 | $1 | |||||
pioneer/gpt-5.5 | 1.1M | $5 | $30 | |||||
pioneer/HuggingFaceTB/SmolLM3-3B-Base | 33K | $0.15 | $0.15 | |||||
pioneer/LiquidAI/LFM2-24B-A2B | 33K | $0.03 | $0.12 | |||||
pioneer/meta-llama/Llama-3.1-8B-Instruct | 131K | $0.20 | $0.20 | |||||
pioneer/meta-llama/Llama-3.2-1B-Instruct | 131K | $0.10 | $0.20 | |||||
pioneer/meta-llama/Llama-3.2-3B-Instruct | 131K | $0.10 | $0.34 | |||||
pioneer/meta-llama/Llama-3.3-70B-Instruct | 131K | $0.90 | $0.90 | |||||
pioneer/MiniMaxAI/MiniMax-M2.7 | 205K | $0.28 | $1 | |||||
pioneer/MiniMaxAI/MiniMax-M3 | 1.0M | $0.30 | $1 | |||||
pioneer/mistral-medium-3.5 | 262K | $2 | $8 | |||||
pioneer/mistralai/Mistral-7B-Instruct-v0.3 | 33K | $0.20 | $0.20 | |||||
pioneer/mistralai/Mistral-Nemo-Instruct-2407 | 131K | $0.02 | $0.03 | |||||
pioneer/mistralai/Mistral-Small-4-119B-2603 | 262K | $0.15 | $0.60 | |||||
pioneer/moonshotai/Kimi-K2.6 | 262K | $0.95 | $4 | |||||
pioneer/moonshotai/Kimi-K2.7-Code | 262K | $0.95 | $4 | |||||
pioneer/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16 | 262K | $0.05 | $0.20 | |||||
pioneer/nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-FP8 | 1.0M | $0.09 | $0.45 | |||||
pioneer/nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B-BF16 | 1.0M | $0.50 | $3 | |||||
pioneer/openai/gpt-oss-120b | 131K | $0.15 | $0.60 | |||||
pioneer/openai/gpt-oss-20b | 131K | $0.07 | $0.30 | |||||
pioneer/pioneer/auto | 1.0M | — | — | |||||
pioneer/Qwen/Qwen3-1.7B-Base | 33K | $0.10 | $0.10 | |||||
pioneer/Qwen/Qwen3-32B | 131K | $0.90 | $0.90 | |||||
pioneer/Qwen/Qwen3-4B-Base | 33K | $0.15 | $0.15 | |||||
pioneer/Qwen/Qwen3-4B-Instruct-2507 | 262K | $0.20 | $0.20 | |||||
pioneer/Qwen/Qwen3-8B | 131K | $0.20 | $0.20 | |||||
pioneer/Qwen/Qwen3.5-9B | 33K | $0.30 | $0.30 | |||||
pioneer/Qwen/Qwen3.6-27B | 33K | $0.60 | $0.60 | |||||
pioneer/Qwen/Qwen3.6-35B-A3B | 262K | $0.14 | $1 | |||||
pioneer/qwen3.6-flash | 1.0M | $0.19 | $1 | |||||
pioneer/qwen3.6-max-preview | 262K | $1 | $6 | |||||
pioneer/qwen3.6-plus | 1.0M | $0.33 | $2 | |||||
pioneer/qwen3.7-max | 1.0M | $1 | $4 | |||||
pioneer/qwen3.7-plus | 1.0M | $0.32 | $1 | |||||
pioneer/sakana/fugu-ultra | 1.0M | $5 | $30 | |||||
pioneer/XiaomiMiMo/MiMo-V2.5 | 1.1M | $0.14 | $0.28 | |||||
pioneer/XiaomiMiMo/MiMo-V2.5-Pro | 1.1M | $0.43 | $0.87 | |||||
pioneer/zai-org/GLM-5.1 | 203K | $0.98 | $3 | |||||
pioneer/zai-org/GLM-5.2 | 1.0M | $1 | $4 |
Advanced configurationDirect link to Advanced configuration
Custom headersDirect link to Custom headers
src/mastra/agents/my-agent.ts
const agent = new Agent({
id: "custom-agent",
name: "custom-agent",
model: {
url: "https://api.pioneer.ai/v1",
id: "pioneer/HuggingFaceTB/SmolLM3-3B-Base",
apiKey: process.env.PIONEER_API_KEY,
headers: {
"X-Custom-Header": "value"
}
}
});
Dynamic model selectionDirect link to Dynamic model selection
src/mastra/agents/my-agent.ts
const agent = new Agent({
id: "dynamic-agent",
name: "Dynamic Agent",
model: ({ requestContext }) => {
const useAdvanced = requestContext.task === "complex";
return useAdvanced
? "pioneer/zai-org/GLM-5.2"
: "pioneer/HuggingFaceTB/SmolLM3-3B-Base";
}
});