> Discover all available pages from the documentation index: https://mastra.ai/llms.txt

# ![DigitalOcean logo](https://models.dev/logos/digitalocean.svg)DigitalOcean

Access 92 DigitalOcean models through Mastra's model router. Authentication is handled automatically using the `DIGITALOCEAN_ACCESS_TOKEN` environment variable.

Learn more in the [DigitalOcean documentation](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);
}
```

> **Note:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [DigitalOcean documentation](https://docs.digitalocean.com/products/gradient-ai-platform/details/models/) for 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.07      | $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.08      | $0.25       |
| `digitalocean/deepseek-v4-pro`                       | 1.0M    |       |           |       |       |       | $0.87      | $2          |
| `digitalocean/deepseek-v4-pro-0813`                  | 1.0M    |       |           |       |       |       | $1         | $4          |
| `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     |       |           |       |       |       | $1         | $3          |
| `digitalocean/glm-5.1`                               | 164K    |       |           |       |       |       | $1         | $4          |
| `digitalocean/glm-5.2`                               | 262K    |       |           |       |       |       | $0.70      | $2          |
| `digitalocean/gte-large-en-v1.5`                     | 8K      |       |           |       |       |       | $0.09      | —           |
| `digitalocean/kimi-k2.5`                             | 262K    |       |           |       |       |       | $0.50      | $3          |
| `digitalocean/kimi-k2.6`                             | 262K    |       |           |       |       |       | $0.95      | $4          |
| `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.30      | $1          |
| `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.30      | $0.65       |
| `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.55      | $4          |
| `digitalocean/qwen3.8-max`                           | 1.0M    |       |           |       |       |       | $2         | $6          |
| `digitalocean/stable-diffusion-3.5-large`            | 256     |       |           |       |       |       | $0.08      | —           |
| `digitalocean/wan2-2-t2v-a14b`                       | 100     |       |           |       |       |       | $0.60      | —           |

## Advanced configuration

### Custom headers

```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"
    }
  }
});
```

### Dynamic model selection

```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";
  }
});
```