メインコンテンツへ移動

Nebius Token Factory ロゴNebius Token Factory

Mastra のモデルルーターを通じて 33 個の Nebius Token Factory モデルを利用できます。認証には NEBIUS_API_KEY 環境変数が自動的に使用されます。

詳しくは、Nebius Token Factory のドキュメントを参照してください。

.env
NEBIUS_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: "nebius/MiniMaxAI/MiniMax-M2.5"
});

// 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);
}
情報

Mastra は OpenAI 互換の /chat/completions endpoint を使用します。一部の Provider 固有機能は利用できない場合があります。詳しくは、Nebius Token Factory のドキュメントを確認してください。

モデル
モデルへの直接リンク

ModelContextToolsReasoningImageAudioVideoInput $/1MOutput $/1M
nebius/deepseek-ai/DeepSeek-V4-Pro1.0M$2$4
nebius/google/gemma-3-27b-it110K$0.10$0.30
nebius/meta-llama/Llama-3.3-70B-Instruct128K$0.13$0.40
nebius/MiniMaxAI/MiniMax-M2.5197K$0.30$1
nebius/MiniMaxAI/MiniMax-M31.0M$0.30$1
nebius/moonshotai/Kimi-K2.7-Code262K$0.95$4
nebius/moonshotai/Kimi-K31.0M$3$15
nebius/NousResearch/Hermes-4-405B128K$1$3
nebius/NousResearch/Hermes-4-70B128K$0.13$0.40
nebius/nvidia/Llama-3_1-Nemotron-Ultra-253B-v1128K$0.60$2
nebius/nvidia/Nemotron-3-Nano-Omni66K$0.06$0.24
nebius/nvidia/nemotron-3-super-120b-a12b256K$0.30$0.90
nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B32K$0.06$0.24
nebius/openai/gpt-oss-120b128K$0.15$0.60
nebius/Qwen/Qwen2.5-VL-72B-Instruct128K$0.25$0.75
nebius/Qwen/Qwen3-235B-A22B-Instruct-2507262K$0.20$0.60
nebius/Qwen/Qwen3-30B-A3B-Instruct-2507128K$0.10$0.30
nebius/Qwen/Qwen3-32B128K$0.10$0.30
nebius/Qwen/Qwen3-Embedding-8B33K$0.01
nebius/Qwen/Qwen3-Next-80B-A3B-Thinking128K$0.15$1
nebius/Qwen/Qwen3.5-397B-A17B262K$0.60$4
nebius/zai-org/GLM-5.2432K$1$4
22 available models

高度な設定
高度な設定への直接リンク

カスタムヘッダー
カスタムヘッダーへの直接リンク

src/mastra/agents/my-agent.ts
const agent = new Agent({
id: "custom-agent",
name: "custom-agent",
model: {
url: "https://api.tokenfactory.nebius.com/v1",
id: "nebius/MiniMaxAI/MiniMax-M2.5",
apiKey: process.env.NEBIUS_API_KEY,
headers: {
"X-Custom-Header": "value"
}
}
});

動的なモデル選択
動的なモデル選択への直接リンク

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
? "nebius/zai-org/GLM-5.2"
: "nebius/MiniMaxAI/MiniMax-M2.5";
}
});