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

# ![Ofox logo](https://models.dev/logos/ofox.svg)Ofox

Access 107 Ofox models through Mastra's model router. Authentication is handled automatically using the `OFOX_API_KEY` environment variable.

Learn more in the [Ofox documentation](https://ofox.ai/docs).

```bash
OFOX_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: "ofox/anthropic/claude-fable-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);
}
```

> **Note:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Ofox documentation](https://ofox.ai/docs) for details.

## Models

| Model                                      | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
| ------------------------------------------ | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
| `ofox/anthropic/claude-fable-5`            | 1.0M    |       |           |       |       |       | $10        | $50         |
| `ofox/anthropic/claude-haiku-4.5`          | 200K    |       |           |       |       |       | $1         | $5          |
| `ofox/anthropic/claude-opus-4.5`           | 200K    |       |           |       |       |       | $5         | $25         |
| `ofox/anthropic/claude-opus-4.6`           | 1.0M    |       |           |       |       |       | $5         | $25         |
| `ofox/anthropic/claude-opus-4.7`           | 1.0M    |       |           |       |       |       | $5         | $25         |
| `ofox/anthropic/claude-opus-4.8`           | 1.0M    |       |           |       |       |       | $5         | $25         |
| `ofox/anthropic/claude-opus-5`             | 1.0M    |       |           |       |       |       | $5         | $25         |
| `ofox/anthropic/claude-sonnet-4.5`         | 200K    |       |           |       |       |       | $3         | $15         |
| `ofox/anthropic/claude-sonnet-4.6`         | 1.0M    |       |           |       |       |       | $3         | $15         |
| `ofox/anthropic/claude-sonnet-5`           | 1.0M    |       |           |       |       |       | $2         | $10         |
| `ofox/bailian/qwen-flash`                  | 1.0M    |       |           |       |       |       | $0.02      | $0.22       |
| `ofox/bailian/qwen-max`                    | 33K     |       |           |       |       |       | $0.35      | $1          |
| `ofox/bailian/qwen-plus`                   | 1.0M    |       |           |       |       |       | $0.12      | $0.29       |
| `ofox/bailian/qwen-turbo`                  | 128K    |       |           |       |       |       | $0.05      | $0.09       |
| `ofox/bailian/qwen-vl-max`                 | 131K    |       |           |       |       |       | $0.23      | $0.58       |
| `ofox/bailian/qwen3-coder-flash`           | 1.0M    |       |           |       |       |       | $0.50      | $3          |
| `ofox/bailian/qwen3-coder-next`            | 262K    |       |           |       |       |       | $0.20      | $2          |
| `ofox/bailian/qwen3-coder-plus`            | 1.0M    |       |           |       |       |       | $2         | $9          |
| `ofox/bailian/qwen3-max`                   | 262K    |       |           |       |       |       | $0.36      | $1          |
| `ofox/bailian/qwen3.5-122b-a10b`           | 256K    |       |           |       |       |       | $0.29      | $2          |
| `ofox/bailian/qwen3.5-27b`                 | 262K    |       |           |       |       |       | $0.29      | $2          |
| `ofox/bailian/qwen3.5-35b-a3b`             | 262K    |       |           |       |       |       | $0.29      | $2          |
| `ofox/bailian/qwen3.5-397b-a17b`           | 256K    |       |           |       |       |       | $0.55      | $4          |
| `ofox/bailian/qwen3.5-flash`               | 1.0M    |       |           |       |       |       | $0.10      | $0.40       |
| `ofox/bailian/qwen3.5-plus`                | 1.0M    |       |           |       |       |       | $0.40      | $2          |
| `ofox/bailian/qwen3.6-27b`                 | 256K    |       |           |       |       |       | $0.60      | $4          |
| `ofox/bailian/qwen3.6-flash`               | 1.0M    |       |           |       |       |       | $0.25      | $2          |
| `ofox/bailian/qwen3.6-max-preview`         | 262K    |       |           |       |       |       | $2         | $12         |
| `ofox/bailian/qwen3.6-plus`                | 1.0M    |       |           |       |       |       | $0.50      | $3          |
| `ofox/bailian/qwen3.7-max`                 | 1.0M    |       |           |       |       |       | $3         | $8          |
| `ofox/bailian/qwen3.7-plus`                | 1.0M    |       |           |       |       |       | $0.40      | $2          |
| `ofox/bailian/qwen3.8-max`                 | 1.0M    |       |           |       |       |       | $2         | $6          |
| `ofox/deepseek/deepseek-v3.2`              | 128K    |       |           |       |       |       | $0.29      | $0.43       |
| `ofox/deepseek/deepseek-v4-flash`          | 1.0M    |       |           |       |       |       | $0.44      | $1          |
| `ofox/deepseek/deepseek-v4-pro`            | 1.0M    |       |           |       |       |       | $1         | $4          |
| `ofox/deepseek/deepseek-v4-pro-0813`       | 1.0M    |       |           |       |       |       | $1         | $4          |
| `ofox/google/gemini-2.5-flash`             | 1.0M    |       |           |       |       |       | $0.30      | $3          |
| `ofox/google/gemini-2.5-flash-lite`        | 1.0M    |       |           |       |       |       | $0.10      | $0.40       |
| `ofox/google/gemini-2.5-pro`               | 1.0M    |       |           |       |       |       | $1         | $10         |
| `ofox/google/gemini-3-flash-preview`       | 1.0M    |       |           |       |       |       | $0.50      | $3          |
| `ofox/google/gemini-3.1-flash-lite`        | 1.0M    |       |           |       |       |       | $0.25      | $2          |
| `ofox/google/gemini-3.1-pro-preview`       | 1.0M    |       |           |       |       |       | $2         | $12         |
| `ofox/google/gemini-3.5-flash`             | 1.0M    |       |           |       |       |       | $2         | $9          |
| `ofox/google/gemini-3.5-flash-lite`        | 1.0M    |       |           |       |       |       | $0.30      | $3          |
| `ofox/google/gemini-3.6-flash`             | 1.0M    |       |           |       |       |       | $2         | $8          |
| `ofox/google/gemini-3.7-flash`             | 1.0M    |       |           |       |       |       | $2         | $8          |
| `ofox/minimax/m2-her`                      | 200K    |       |           |       |       |       | $0.30      | $1          |
| `ofox/minimax/minimax-m2`                  | 197K    |       |           |       |       |       | $0.30      | $1          |
| `ofox/minimax/minimax-m2.1`                | 205K    |       |           |       |       |       | $0.30      | $1          |
| `ofox/minimax/minimax-m2.1-lightning`      | 205K    |       |           |       |       |       | $0.30      | $2          |
| `ofox/minimax/minimax-m2.5`                | 205K    |       |           |       |       |       | $0.30      | $1          |
| `ofox/minimax/minimax-m2.5-lightning`      | 205K    |       |           |       |       |       | $0.30      | $2          |
| `ofox/minimax/minimax-m2.7`                | 205K    |       |           |       |       |       | $0.30      | $1          |
| `ofox/minimax/minimax-m2.7-highspeed`      | 205K    |       |           |       |       |       | $0.60      | $2          |
| `ofox/minimax/minimax-m3`                  | 512K    |       |           |       |       |       | $0.60      | $2          |
| `ofox/moonshotai/kimi-k2.5`                | 262K    |       |           |       |       |       | $0.60      | $3          |
| `ofox/moonshotai/kimi-k2.6`                | 262K    |       |           |       |       |       | $0.95      | $4          |
| `ofox/moonshotai/kimi-k2.7-code`           | 262K    |       |           |       |       |       | $0.95      | $4          |
| `ofox/moonshotai/kimi-k2.7-code-highspeed` | 262K    |       |           |       |       |       | $2         | $8          |
| `ofox/moonshotai/kimi-k3`                  | 1.0M    |       |           |       |       |       | $3         | $15         |
| `ofox/openai/gpt-4.1`                      | 1.0M    |       |           |       |       |       | $2         | $8          |
| `ofox/openai/gpt-4.1-mini`                 | 1.0M    |       |           |       |       |       | $0.40      | $2          |
| `ofox/openai/gpt-4o`                       | 128K    |       |           |       |       |       | $3         | $10         |
| `ofox/openai/gpt-4o-mini`                  | 128K    |       |           |       |       |       | $0.15      | $0.60       |
| `ofox/openai/gpt-5`                        | 400K    |       |           |       |       |       | $1         | $10         |
| `ofox/openai/gpt-5-mini`                   | 256K    |       |           |       |       |       | $0.25      | $2          |
| `ofox/openai/gpt-5-nano`                   | 400K    |       |           |       |       |       | $0.05      | $0.40       |
| `ofox/openai/gpt-5.1`                      | 400K    |       |           |       |       |       | $1         | $10         |
| `ofox/openai/gpt-5.1-codex-max`            | 256K    |       |           |       |       |       | $1         | $10         |
| `ofox/openai/gpt-5.1-codex-mini`           | 256K    |       |           |       |       |       | $0.25      | $2          |
| `ofox/openai/gpt-5.2`                      | 400K    |       |           |       |       |       | $2         | $14         |
| `ofox/openai/gpt-5.2-codex`                | 400K    |       |           |       |       |       | $2         | $14         |
| `ofox/openai/gpt-5.3-codex`                | 400K    |       |           |       |       |       | $2         | $14         |
| `ofox/openai/gpt-5.4`                      | 1.1M    |       |           |       |       |       | $3         | $15         |
| `ofox/openai/gpt-5.4-mini`                 | 400K    |       |           |       |       |       | $0.75      | $5          |
| `ofox/openai/gpt-5.4-nano`                 | 400K    |       |           |       |       |       | $0.20      | $1          |
| `ofox/openai/gpt-5.4-pro`                  | 1.1M    |       |           |       |       |       | $30        | $180        |
| `ofox/openai/gpt-5.5`                      | 1.1M    |       |           |       |       |       | $5         | $30         |
| `ofox/openai/gpt-5.6-luna`                 | 1.1M    |       |           |       |       |       | $0.20      | $1          |
| `ofox/openai/gpt-5.6-sol`                  | 1.1M    |       |           |       |       |       | $5         | $30         |
| `ofox/openai/gpt-5.6-terra`                | 1.1M    |       |           |       |       |       | $2         | $12         |
| `ofox/volcengine/doubao-seed-1-6`          | 256K    |       |           |       |       |       | $0.12      | $0.29       |
| `ofox/volcengine/doubao-seed-1-6-flash`    | 256K    |       |           |       |       |       | $0.03      | $0.22       |
| `ofox/volcengine/doubao-seed-1-6-vision`   | 256K    |       |           |       |       |       | $0.12      | $1          |
| `ofox/volcengine/doubao-seed-1-8`          | 256K    |       |           |       |       |       | $0.12      | $0.29       |
| `ofox/volcengine/doubao-seed-2.0-code`     | 256K    |       |           |       |       |       | $0.67      | $3          |
| `ofox/volcengine/doubao-seed-2.0-lite`     | 256K    |       |           |       |       |       | $0.13      | $0.76       |
| `ofox/volcengine/doubao-seed-2.0-mini`     | 256K    |       |           |       |       |       | $0.06      | $0.56       |
| `ofox/volcengine/doubao-seed-2.0-pro`      | 256K    |       |           |       |       |       | $0.67      | $3          |
| `ofox/volcengine/doubao-seed-2.1-pro`      | 256K    |       |           |       |       |       | $0.88      | $4          |
| `ofox/volcengine/doubao-seed-2.1-turbo`    | 256K    |       |           |       |       |       | $0.44      | $2          |
| `ofox/volcengine/doubao-seed-character`    | 256K    |       |           |       |       |       | $0.18      | $0.88       |
| `ofox/volcengine/doubao-seed-evolving`     | 256K    |       |           |       |       |       | $0.88      | $4          |
| `ofox/x-ai/grok-4.1-fast`                  | 2.0M    |       |           |       |       |       | $0.20      | $0.50       |
| `ofox/x-ai/grok-4.20`                      | 2.0M    |       |           |       |       |       | $4         | $12         |
| `ofox/x-ai/grok-4.3`                       | 1.0M    |       |           |       |       |       | $1         | $3          |
| `ofox/x-ai/grok-4.5`                       | 500K    |       |           |       |       |       | $2         | $6          |
| `ofox/x-ai/grok-4.6`                       | 500K    |       |           |       |       |       | $2         | $6          |
| `ofox/z-ai/glm-4.6`                        | 205K    |       |           |       |       |       | $0.40      | $2          |
| `ofox/z-ai/glm-4.7`                        | 205K    |       |           |       |       |       | $0.40      | $2          |
| `ofox/z-ai/glm-4.7-flashx`                 | 200K    |       |           |       |       |       | $0.07      | $0.43       |
| `ofox/z-ai/glm-5`                          | 205K    |       |           |       |       |       | $1         | $3          |
| `ofox/z-ai/glm-5-turbo`                    | 200K    |       |           |       |       |       | $1         | $4          |
| `ofox/z-ai/glm-5.1`                        | 200K    |       |           |       |       |       | $1         | $4          |
| `ofox/z-ai/glm-5.2`                        | 1.0M    |       |           |       |       |       | $1         | $4          |
| `ofox/z-ai/glm-5.3`                        | 1.0M    |       |           |       |       |       | $1         | $4          |
| `ofox/z-ai/glm-5v-turbo`                   | 200K    |       |           |       |       |       | $1         | $4          |

## Advanced configuration

### Custom headers

```typescript
const agent = new Agent({
  id: "custom-agent",
  name: "custom-agent",
  model: {
    url: "https://api.ofox.ai/v1",
    id: "ofox/anthropic/claude-fable-5",
    apiKey: process.env.OFOX_API_KEY,
    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
      ? "ofox/z-ai/glm-5v-turbo"
      : "ofox/anthropic/claude-fable-5";
  }
});
```