> Discover all available pages from the documentation index: https://mastra.zisheng.pro/zh-HK/llms.txt # ![ZenMux 標誌](https://models.dev/logos/zenmux.svg)ZenMux 透過 Mastra 的模型路由器存取 120 個 ZenMux 模型。系統會自動使用 `ZENMUX_API_KEY` 環境變數進行驗證。 詳情請參閱[ZenMux 文件](https://docs.zenmux.ai)。 ```bash ZENMUX_API_KEY=your-api-key ``` ```typescript import { Agent } from '@mastra/core/agent' const agent = new Agent({ id: 'my-agent', name: 'My Agent', instructions: 'You are a helpful assistant', model: 'zenmux/anthropic/claude-3.5-haiku', }) // 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` 端點。部分 Provider 專屬功能可能無法使用,詳情請參閱[ZenMux 文件](https://docs.zenmux.ai)。 ## 模型 | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M | | --------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- | | `zenmux/anthropic/claude-3.5-haiku` | 200K | | | | | | $0.80 | $4 | | `zenmux/anthropic/claude-3.7-sonnet` | 200K | | | | | | $3 | $15 | | `zenmux/anthropic/claude-fable-5` | 1.0M | | | | | | $10 | $50 | | `zenmux/anthropic/claude-haiku-4.5` | 200K | | | | | | $1 | $5 | | `zenmux/anthropic/claude-opus-4` | 200K | | | | | | $15 | $75 | | `zenmux/anthropic/claude-opus-4.1` | 200K | | | | | | $15 | $75 | | `zenmux/anthropic/claude-opus-4.5` | 200K | | | | | | $5 | $25 | | `zenmux/anthropic/claude-opus-4.6` | 1.0M | | | | | | $5 | $25 | | `zenmux/anthropic/claude-opus-4.7` | 1.0M | | | | | | $5 | $25 | | `zenmux/anthropic/claude-opus-4.8` | 1.0M | | | | | | $5 | $25 | | `zenmux/anthropic/claude-sonnet-4` | 1.0M | | | | | | $3 | $15 | | `zenmux/anthropic/claude-sonnet-4.5` | 1.0M | | | | | | $3 | $15 | | `zenmux/anthropic/claude-sonnet-4.6` | 1.0M | | | | | | $3 | $15 | | `zenmux/anthropic/claude-sonnet-5` | 1.0M | | | | | | $2 | $10 | | `zenmux/anthropic/claude-sonnet-5-free` | 1.0M | | | | | | — | — | | `zenmux/baidu/ernie-5.0-thinking-preview` | 128K | | | | | | $0.84 | $3 | | `zenmux/deepseek/deepseek-chat` | 128K | | | | | | $0.28 | $0.42 | | `zenmux/deepseek/deepseek-v3.2` | 128K | | | | | | $0.28 | $0.43 | | `zenmux/deepseek/deepseek-v3.2-exp` | 163K | | | | | | $0.22 | $0.33 | | `zenmux/deepseek/deepseek-v4-flash` | 1.0M | | | | | | $0.14 | $0.28 | | `zenmux/deepseek/deepseek-v4-pro` | 1.0M | | | | | | $0.43 | $0.87 | | `zenmux/google/gemini-2.5-flash` | 1.0M | | | | | | $0.30 | $3 | | `zenmux/google/gemini-2.5-flash-lite` | 1.0M | | | | | | $0.10 | $0.40 | | `zenmux/google/gemini-2.5-pro` | 1.0M | | | | | | $1 | $10 | | `zenmux/google/gemini-3-flash-preview` | 1.0M | | | | | | $0.50 | $3 | | `zenmux/google/gemini-3.1-flash-lite` | 1.0M | | | | | | $0.25 | $2 | | `zenmux/google/gemini-3.1-flash-lite-preview` | 1.1M | | | | | | $0.25 | $2 | | `zenmux/google/gemini-3.1-pro-preview` | 1.0M | | | | | | $2 | $12 | | `zenmux/google/gemini-3.5-flash` | 1.0M | | | | | | $2 | $9 | | `zenmux/inclusionai/ling-1t` | 128K | | | | | | $0.56 | $2 | | `zenmux/inclusionai/ring-1t` | 128K | | | | | | $0.56 | $2 | | `zenmux/inclusionai/ring-2.6-1t` | 262K | | | | | | $0.30 | $3 | | `zenmux/kuaishou/kat-coder-pro-v2` | 256K | | | | | | $0.30 | $1 | | `zenmux/minimax/minimax-m2` | 204K | | | | | | $0.30 | $1 | | `zenmux/minimax/minimax-m2.1` | 204K | | | | | | $0.30 | $1 | | `zenmux/minimax/minimax-m2.5` | 205K | | | | | | $0.30 | $1 | | `zenmux/minimax/minimax-m2.5-lightning` | 205K | | | | | | $0.60 | $5 | | `zenmux/minimax/minimax-m2.7` | 205K | | | | | | $0.31 | $1 | | `zenmux/minimax/minimax-m2.7-highspeed` | 205K | | | | | | $0.61 | $2 | | `zenmux/minimax/minimax-m3` | 512K | | | | | | $0.60 | $2 | | `zenmux/moonshotai/kimi-k2-0905` | 262K | | | | | | $0.60 | $3 | | `zenmux/moonshotai/kimi-k2-thinking` | 262K | | | | | | $0.60 | $3 | | `zenmux/moonshotai/kimi-k2-thinking-turbo` | 262K | | | | | | $1 | $8 | | `zenmux/moonshotai/kimi-k2.5` | 262K | | | | | | $0.58 | $3 | | `zenmux/moonshotai/kimi-k2.6` | 262K | | | | | | $0.95 | $4 | | `zenmux/moonshotai/kimi-k2.7-code` | 262K | | | | | | $0.95 | $4 | | `zenmux/moonshotai/kimi-k2.7-code-free` | 262K | | | | | | — | — | | `zenmux/moonshotai/kimi-k3` | 1.0M | | | | | | $3 | $15 | | `zenmux/moonshotai/kimi-k3-free` | 1.0M | | | | | | — | — | | `zenmux/openai/gpt-5` | 400K | | | | | | $1 | $10 | | `zenmux/openai/gpt-5-codex` | 400K | | | | | | $1 | $10 | | `zenmux/openai/gpt-5.1` | 400K | | | | | | $1 | $10 | | `zenmux/openai/gpt-5.1-chat` | 128K | | | | | | $1 | $10 | | `zenmux/openai/gpt-5.1-codex` | 400K | | | | | | $1 | $10 | | `zenmux/openai/gpt-5.1-codex-mini` | 400K | | | | | | $0.25 | $2 | | `zenmux/openai/gpt-5.2` | 400K | | | | | | $2 | $14 | | `zenmux/openai/gpt-5.2-codex` | 400K | | | | | | $2 | $14 | | `zenmux/openai/gpt-5.2-pro` | 400K | | | | | | $21 | $168 | | `zenmux/openai/gpt-5.3-chat` | 128K | | | | | | $2 | $14 | | `zenmux/openai/gpt-5.3-codex` | 400K | | | | | | $2 | $14 | | `zenmux/openai/gpt-5.4` | 1.1M | | | | | | $4 | $19 | | `zenmux/openai/gpt-5.4-mini` | 400K | | | | | | $0.75 | $5 | | `zenmux/openai/gpt-5.4-nano` | 400K | | | | | | $0.20 | $1 | | `zenmux/openai/gpt-5.4-pro` | 1.1M | | | | | | $45 | $225 | | `zenmux/openai/gpt-5.5` | 1.1M | | | | | | $5 | $30 | | `zenmux/openai/gpt-5.5-instant` | 400K | | | | | | $5 | $30 | | `zenmux/openai/gpt-5.5-pro` | 1.1M | | | | | | $30 | $180 | | `zenmux/openai/gpt-5.6-luna` | 1.1M | | | | | | $1 | $6 | | `zenmux/openai/gpt-5.6-sol` | 1.1M | | | | | | $5 | $30 | | `zenmux/openai/gpt-5.6-terra` | 1.1M | | | | | | $3 | $15 | | `zenmux/qwen/qwen3-coder-plus` | 1.0M | | | | | | $1 | $5 | | `zenmux/qwen/qwen3-max` | 256K | | | | | | $1 | $6 | | `zenmux/qwen/qwen3.5-flash` | 1.0M | | | | | | $0.10 | $0.40 | | `zenmux/qwen/qwen3.5-plus` | 1.0M | | | | | | $0.80 | $5 | | `zenmux/qwen/qwen3.6-plus` | 1.0M | | | | | | $0.50 | $3 | | `zenmux/qwen/qwen3.7-max` | 1.0M | | | | | | $3 | $8 | | `zenmux/qwen/qwen3.7-plus` | 1.0M | | | | | | $0.40 | $2 | | `zenmux/sapiens-ai/agnes-1.5-lite` | 256K | | | | | | $0.12 | $0.60 | | `zenmux/sapiens-ai/agnes-1.5-pro` | 256K | | | | | | $0.16 | $0.80 | | `zenmux/stepfun/step-3` | 66K | | | | | | $0.21 | $0.57 | | `zenmux/stepfun/step-3.5-flash` | 256K | | | | | | $0.10 | $0.30 | | `zenmux/stepfun/step-3.7-flash` | 256K | | | | | | $0.20 | $1 | | `zenmux/stepfun/step-3.7-flash-free` | 256K | | | | | | — | — | | `zenmux/tencent/hy3-preview` | 256K | | | | | | $0.17 | $0.57 | | `zenmux/volcengine/doubao-seed-1.8` | 256K | | | | | | $0.11 | $0.28 | | `zenmux/volcengine/doubao-seed-2.0-code` | 256K | | | | | | $0.90 | $4 | | `zenmux/volcengine/doubao-seed-2.0-lite` | 256K | | | | | | $0.09 | $0.51 | | `zenmux/volcengine/doubao-seed-2.0-mini` | 256K | | | | | | $0.03 | $0.28 | | `zenmux/volcengine/doubao-seed-2.0-pro` | 256K | | | | | | $0.45 | $2 | | `zenmux/volcengine/doubao-seed-code` | 256K | | | | | | $0.17 | $1 | | `zenmux/x-ai/grok-4` | 256K | | | | | | $3 | $15 | | `zenmux/x-ai/grok-4-fast` | 2.0M | | | | | | $0.20 | $0.50 | | `zenmux/x-ai/grok-4.1-fast` | 2.0M | | | | | | $0.20 | $0.50 | | `zenmux/x-ai/grok-4.1-fast-non-reasoning` | 2.0M | | | | | | $0.20 | $0.50 | | `zenmux/x-ai/grok-4.2-fast` | 2.0M | | | | | | $3 | $9 | | `zenmux/x-ai/grok-4.2-fast-non-reasoning` | 2.0M | | | | | | $3 | $9 | | `zenmux/x-ai/grok-4.3` | 1.0M | | | | | | $1 | $3 | | `zenmux/x-ai/grok-4.5` | 500K | | | | | | $2 | $6 | | `zenmux/x-ai/grok-build-0.1` | 256K | | | | | | $1 | $2 | | `zenmux/x-ai/grok-code-fast-1` | 256K | | | | | | $0.20 | $2 | | `zenmux/xiaomi/mimo-v2-flash` | 262K | | | | | | $0.10 | $0.30 | | `zenmux/xiaomi/mimo-v2-omni` | 265K | | | | | | $0.40 | $2 | | `zenmux/xiaomi/mimo-v2-pro` | 1.0M | | | | | | $1 | $3 | | `zenmux/xiaomi/mimo-v2.5` | 1.0M | | | | | | $0.40 | $2 | | `zenmux/xiaomi/mimo-v2.5-pro` | 1.0M | | | | | | $1 | $3 | | `zenmux/z-ai/glm-4.5` | 128K | | | | | | $0.35 | $2 | | `zenmux/z-ai/glm-4.5-air` | 128K | | | | | | $0.11 | $0.56 | | `zenmux/z-ai/glm-4.6` | 200K | | | | | | $0.35 | $2 | | `zenmux/z-ai/glm-4.6v` | 200K | | | | | | $0.14 | $0.42 | | `zenmux/z-ai/glm-4.6v-flash` | 200K | | | | | | $0.02 | $0.21 | | `zenmux/z-ai/glm-4.6v-flash-free` | 200K | | | | | | — | — | | `zenmux/z-ai/glm-4.7` | 200K | | | | | | $0.28 | $1 | | `zenmux/z-ai/glm-4.7-flash-free` | 200K | | | | | | — | — | | `zenmux/z-ai/glm-4.7-flashx` | 200K | | | | | | $0.07 | $0.42 | | `zenmux/z-ai/glm-5` | 200K | | | | | | $0.58 | $3 | | `zenmux/z-ai/glm-5-turbo` | 200K | | | | | | $0.88 | $3 | | `zenmux/z-ai/glm-5.1` | 200K | | | | | | $0.88 | $4 | | `zenmux/z-ai/glm-5.2` | 1.0M | | | | | | $1 | $5 | | `zenmux/z-ai/glm-5.2-free` | 1.0M | | | | | | — | — | | `zenmux/z-ai/glm-5v-turbo` | 200K | | | | | | $0.73 | $3 | ## 進階設定 ### 自訂標頭 ```typescript const agent = new Agent({ id: 'custom-agent', name: 'custom-agent', model: { url: 'https://zenmux.ai/api/v1', id: 'zenmux/anthropic/claude-3.5-haiku', apiKey: process.env.ZENMUX_API_KEY, headers: { 'X-Custom-Header': 'value', }, }, }) ``` ### 動態選擇模型 ```typescript const agent = new Agent({ id: 'dynamic-agent', name: 'Dynamic Agent', model: ({ requestContext }) => { const useAdvanced = requestContext.task === 'complex' return useAdvanced ? 'zenmux/z-ai/glm-5v-turbo' : 'zenmux/anthropic/claude-3.5-haiku' }, }) ```