> Discover all available pages from the documentation index: https://mastra.zisheng.pro/llms.txt # ![DigitalOcean 标志](https://models.dev/logos/digitalocean.svg)DigitalOcean 通过 Mastra 的模型路由器访问 90 个 DigitalOcean 模型。系统会自动使用 `DIGITALOCEAN_ACCESS_TOKEN` 环境变量完成身份验证。 更多信息请参阅[DigitalOcean 文档](https://docs.digitalocean.com/products/gradient-ai-platform/details/models/)。 ```bash DIGITALOCEAN_ACCESS_TOKEN=your-api-token ``` ```typescript import { Agent } from '@mastra/core/agent' const agent = new Agent({ id: 'my-agent', name: 'My Agent', instructions: 'You are a helpful assistant', model: 'digitalocean/alibaba-qwen3-32b', }) // 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 特有功能可能不可用,详情请参阅[DigitalOcean 文档](https://docs.digitalocean.com/products/gradient-ai-platform/details/models/)。 ## 模型 | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M | | ---------------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- | | `digitalocean/alibaba-qwen3-32b` | 33K | | | | | | $0.25 | $0.55 | | `digitalocean/all-mini-lm-l6-v2` | 256 | | | | | | $0.01 | — | | `digitalocean/anthropic-claude-4.1-opus` | 200K | | | | | | $15 | $75 | | `digitalocean/anthropic-claude-4.5-haiku` | 200K | | | | | | $1 | $5 | | `digitalocean/anthropic-claude-4.5-sonnet` | 200K | | | | | | $3 | $15 | | `digitalocean/anthropic-claude-4.6-sonnet` | 200K | | | | | | $3 | $15 | | `digitalocean/anthropic-claude-5-sonnet` | 1.0M | | | | | | $2 | $10 | | `digitalocean/anthropic-claude-fable-5` | 1.0M | | | | | | $10 | $50 | | `digitalocean/anthropic-claude-haiku-4.5` | 200K | | | | | | $1 | $5 | | `digitalocean/anthropic-claude-opus-4` | 200K | | | | | | $15 | $75 | | `digitalocean/anthropic-claude-opus-4.5` | 200K | | | | | | $5 | $25 | | `digitalocean/anthropic-claude-opus-4.6` | 200K | | | | | | $5 | $25 | | `digitalocean/anthropic-claude-opus-4.7` | 200K | | | | | | $5 | $25 | | `digitalocean/anthropic-claude-opus-4.8` | 1.0M | | | | | | $5 | $25 | | `digitalocean/anthropic-claude-opus-5` | 1.0M | | | | | | $5 | $25 | | `digitalocean/anthropic-claude-sonnet-4` | 1.0M | | | | | | $3 | $15 | | `digitalocean/arcee-trinity-large-thinking` | 128K | | | | | | $0.25 | $0.90 | | `digitalocean/bge-m3` | 8K | | | | | | $0.02 | — | | `digitalocean/bge-reranker-v2-m3` | 8K | | | | | | $0.01 | — | | `digitalocean/deepseek-3.2` | 164K | | | | | | $0.25 | $0.80 | | `digitalocean/deepseek-4-flash` | 1.0M | | | | | | $0.08 | $0.17 | | `digitalocean/deepseek-r1-distill-llama-70b` | 33K | | | | | | $0.99 | $0.99 | | `digitalocean/deepseek-v3` | 164K | | | | | | — | — | | `digitalocean/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.13 | $0.25 | | `digitalocean/deepseek-v4-pro` | 1.0M | | | | | | $0.87 | $2 | | `digitalocean/e5-large-v2` | 512 | | | | | | $0.02 | — | | `digitalocean/fal-ai/elevenlabs/tts/multilingual-v2` | — | | | | | | — | — | | `digitalocean/fal-ai/fast-sdxl` | — | | | | | | — | — | | `digitalocean/fal-ai/flux/schnell` | — | | | | | | — | — | | `digitalocean/fal-ai/stable-audio-25/text-to-audio` | — | | | | | | — | — | | `digitalocean/gemma-4-31B-it` | 256K | | | | | | $0.18 | $0.50 | | `digitalocean/glm-5` | 64K | | | | | | $0.75 | $2 | | `digitalocean/glm-5.1` | 164K | | | | | | $0.97 | $4 | | `digitalocean/glm-5.2` | 262K | | | | | | $1 | $4 | | `digitalocean/gte-large-en-v1.5` | 8K | | | | | | $0.09 | — | | `digitalocean/kimi-k2.5` | 262K | | | | | | $0.38 | $2 | | `digitalocean/kimi-k2.6` | 262K | | | | | | $0.76 | $3 | | `digitalocean/kimi-k3` | 1.0M | | | | | | $3 | $14 | | `digitalocean/llama-4-maverick` | 128K | | | | | | $0.20 | $0.70 | | `digitalocean/llama3-8b-instruct` | 131K | | | | | | $0.20 | $0.20 | | `digitalocean/llama3.3-70b-instruct` | 128K | | | | | | $0.65 | $0.65 | | `digitalocean/mimo-v2.5-pro` | 262K | | | | | | $0.40 | $2 | | `digitalocean/minimax-m2.5` | 66K | | | | | | $0.23 | $0.90 | | `digitalocean/ministral-3-8b-instruct-2512` | 262K | | | | | | — | — | | `digitalocean/mistral-3-14B` | 262K | | | | | | $0.20 | $0.20 | | `digitalocean/mistral-7b-instruct-v0.3` | 33K | | | | | | — | — | | `digitalocean/multi-qa-mpnet-base-dot-v1` | 512 | | | | | | $0.01 | — | | `digitalocean/nemotron-3-nano-30b` | 262K | | | | | | — | — | | `digitalocean/nemotron-3-nano-omni` | 66K | | | | | | $0.50 | $0.90 | | `digitalocean/nemotron-3-ultra-550b` | 131K | | | | | | $0.90 | $2 | | `digitalocean/nemotron-nano-12b-v2-vl` | 128K | | | | | | $0.20 | $0.60 | | `digitalocean/nvidia-nemotron-3-super-120b` | 1.0M | | | | | | $0.17 | $0.36 | | `digitalocean/openai-gpt-4.1` | 1.0M | | | | | | $2 | $8 | | `digitalocean/openai-gpt-4o` | 128K | | | | | | $3 | $10 | | `digitalocean/openai-gpt-4o-mini` | 128K | | | | | | $0.15 | $0.60 | | `digitalocean/openai-gpt-5` | 400K | | | | | | $1 | $10 | | `digitalocean/openai-gpt-5-mini` | 400K | | | | | | $0.25 | $2 | | `digitalocean/openai-gpt-5-nano` | 400K | | | | | | $0.05 | $0.40 | | `digitalocean/openai-gpt-5.1-codex-max` | 400K | | | | | | $1 | $10 | | `digitalocean/openai-gpt-5.2` | 400K | | | | | | $2 | $14 | | `digitalocean/openai-gpt-5.2-pro` | 400K | | | | | | $21 | $168 | | `digitalocean/openai-gpt-5.3-codex` | 400K | | | | | | $2 | $14 | | `digitalocean/openai-gpt-5.4` | 400K | | | | | | $3 | $15 | | `digitalocean/openai-gpt-5.4-mini` | 400K | | | | | | $0.75 | $5 | | `digitalocean/openai-gpt-5.4-nano` | 400K | | | | | | $0.20 | $1 | | `digitalocean/openai-gpt-5.4-pro` | 1.1M | | | | | | $30 | $180 | | `digitalocean/openai-gpt-5.5` | 1.0M | | | | | | $5 | $30 | | `digitalocean/openai-gpt-5.6-luna` | 1.1M | | | | | | $0.20 | $1 | | `digitalocean/openai-gpt-5.6-sol` | 1.1M | | | | | | $5 | $30 | | `digitalocean/openai-gpt-5.6-terra` | 1.1M | | | | | | $2 | $12 | | `digitalocean/openai-gpt-image-1` | — | | | | | | $5 | $40 | | `digitalocean/openai-gpt-image-1.5` | — | | | | | | $5 | $10 | | `digitalocean/openai-gpt-image-2` | — | | | | | | $8 | $30 | | `digitalocean/openai-gpt-oss-120b` | 128K | | | | | | $0.06 | $0.39 | | `digitalocean/openai-gpt-oss-20b` | 128K | | | | | | $0.05 | $0.45 | | `digitalocean/openai-o1` | 200K | | | | | | $15 | $60 | | `digitalocean/openai-o3` | 200K | | | | | | $2 | $8 | | `digitalocean/openai-o3-mini` | 200K | | | | | | $1 | $4 | | `digitalocean/qwen-2.5-14b-instruct` | 131K | | | | | | — | — | | `digitalocean/qwen3-coder-flash` | 262K | | | | | | $0.45 | $2 | | `digitalocean/qwen3-embedding-0.6b` | 8K | | | | | | $0.04 | — | | `digitalocean/qwen3-tts-voicedesign` | 33K | | | | | | — | — | | `digitalocean/qwen3.5-397b-a17b` | 131K | | | | | | $0.30 | $2 | | `digitalocean/stable-diffusion-3.5-large` | 256 | | | | | | $0.08 | — | | `digitalocean/wan2-2-t2v-a14b` | 100 | | | | | | $0.60 | — | ## 高级配置 ### 自定义请求头 ```typescript const agent = new Agent({ id: 'custom-agent', name: 'custom-agent', model: { url: 'https://inference.do-ai.run/v1', id: 'digitalocean/alibaba-qwen3-32b', apiKey: process.env.DIGITALOCEAN_ACCESS_TOKEN, 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 ? 'digitalocean/wan2-2-t2v-a14b' : 'digitalocean/alibaba-qwen3-32b' }, }) ```