# ![Jiekou.AI logo](https://models.dev/logos/jiekou.svg)Jiekou.AI

Access 61 Jiekou.AI models through Mastra's model router. Authentication is handled automatically using the `JIEKOU_API_KEY` environment variable.

Learn more in the [Jiekou.AI documentation](https://docs.jiekou.ai/docs/support/quickstart?utm_source=github_models.dev).

```bash
JIEKOU_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: "jiekou/baidu/ernie-4.5-300b-a47b-paddle"
});

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

> **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Jiekou.AI documentation](https://docs.jiekou.ai/docs/support/quickstart?utm_source=github_models.dev) for details.

## Models

| Model                                          | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
| ---------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
| `jiekou/baidu/ernie-4.5-300b-a47b-paddle`      | 123K    |       |           |       |       |       | $0.28      | $1          |
| `jiekou/baidu/ernie-4.5-vl-424b-a47b`          | 123K    |       |           |       |       |       | $0.42      | $1          |
| `jiekou/claude-haiku-4-5-20251001`             | 20K     |       |           |       |       |       | $0.90      | $5          |
| `jiekou/claude-opus-4-1-20250805`              | 200K    |       |           |       |       |       | $14        | $68         |
| `jiekou/claude-opus-4-20250514`                | 200K    |       |           |       |       |       | $14        | $68         |
| `jiekou/claude-opus-4-5-20251101`              | 200K    |       |           |       |       |       | $5         | $23         |
| `jiekou/claude-opus-4-6`                       | 1.0M    |       |           |       |       |       | $5         | $25         |
| `jiekou/claude-sonnet-4-20250514`              | 200K    |       |           |       |       |       | $3         | $14         |
| `jiekou/claude-sonnet-4-5-20250929`            | 200K    |       |           |       |       |       | $3         | $14         |
| `jiekou/deepseek/deepseek-r1-0528`             | 164K    |       |           |       |       |       | $0.70      | $3          |
| `jiekou/deepseek/deepseek-v3-0324`             | 164K    |       |           |       |       |       | $0.28      | $1          |
| `jiekou/deepseek/deepseek-v3.1`                | 164K    |       |           |       |       |       | $0.27      | $1          |
| `jiekou/gemini-2.5-flash`                      | 1.0M    |       |           |       |       |       | $0.27      | $2          |
| `jiekou/gemini-2.5-flash-lite`                 | 1.0M    |       |           |       |       |       | $0.09      | $0.36       |
| `jiekou/gemini-2.5-flash-lite-preview-06-17`   | 1.0M    |       |           |       |       |       | $0.09      | $0.36       |
| `jiekou/gemini-2.5-flash-lite-preview-09-2025` | 1.0M    |       |           |       |       |       | $0.09      | $0.36       |
| `jiekou/gemini-2.5-flash-preview-05-20`        | 1.0M    |       |           |       |       |       | $0.14      | $3          |
| `jiekou/gemini-2.5-pro`                        | 1.0M    |       |           |       |       |       | $1         | $9          |
| `jiekou/gemini-2.5-pro-preview-06-05`          | 1.0M    |       |           |       |       |       | $1         | $9          |
| `jiekou/gemini-3-flash-preview`                | 1.0M    |       |           |       |       |       | $0.50      | $3          |
| `jiekou/gemini-3-pro-preview`                  | 1.0M    |       |           |       |       |       | $2         | $11         |
| `jiekou/gpt-5-chat-latest`                     | 400K    |       |           |       |       |       | $1         | $9          |
| `jiekou/gpt-5-codex`                           | 400K    |       |           |       |       |       | $1         | $9          |
| `jiekou/gpt-5-mini`                            | 400K    |       |           |       |       |       | $0.23      | $2          |
| `jiekou/gpt-5-nano`                            | 400K    |       |           |       |       |       | $0.04      | $0.36       |
| `jiekou/gpt-5-pro`                             | 400K    |       |           |       |       |       | $14        | $108        |
| `jiekou/gpt-5.1`                               | 400K    |       |           |       |       |       | $1         | $9          |
| `jiekou/gpt-5.1-codex`                         | 400K    |       |           |       |       |       | $1         | $9          |
| `jiekou/gpt-5.1-codex-max`                     | 400K    |       |           |       |       |       | $1         | $9          |
| `jiekou/gpt-5.1-codex-mini`                    | 400K    |       |           |       |       |       | $0.23      | $2          |
| `jiekou/gpt-5.2`                               | 400K    |       |           |       |       |       | $2         | $13         |
| `jiekou/gpt-5.2-codex`                         | 400K    |       |           |       |       |       | $2         | $14         |
| `jiekou/gpt-5.2-pro`                           | 400K    |       |           |       |       |       | $19        | $151        |
| `jiekou/grok-4-0709`                           | 256K    |       |           |       |       |       | $3         | $14         |
| `jiekou/grok-4-1-fast-non-reasoning`           | 2.0M    |       |           |       |       |       | $0.18      | $0.45       |
| `jiekou/grok-4-1-fast-reasoning`               | 2.0M    |       |           |       |       |       | $0.18      | $0.45       |
| `jiekou/grok-4-fast-non-reasoning`             | 2.0M    |       |           |       |       |       | $0.18      | $0.45       |
| `jiekou/grok-4-fast-reasoning`                 | 2.0M    |       |           |       |       |       | $0.18      | $0.45       |
| `jiekou/grok-code-fast-1`                      | 256K    |       |           |       |       |       | $0.18      | $1          |
| `jiekou/minimax/minimax-m2.1`                  | 205K    |       |           |       |       |       | $0.30      | $1          |
| `jiekou/minimaxai/minimax-m1-80k`              | 1.0M    |       |           |       |       |       | $0.55      | $2          |
| `jiekou/moonshotai/kimi-k2-0905`               | 262K    |       |           |       |       |       | $0.60      | $3          |
| `jiekou/moonshotai/kimi-k2-instruct`           | 131K    |       |           |       |       |       | $0.57      | $2          |
| `jiekou/moonshotai/kimi-k2.5`                  | 262K    |       |           |       |       |       | $0.60      | $3          |
| `jiekou/o3`                                    | 131K    |       |           |       |       |       | $10        | $40         |
| `jiekou/o3-mini`                               | 131K    |       |           |       |       |       | $1         | $4          |
| `jiekou/o4-mini`                               | 200K    |       |           |       |       |       | $1         | $4          |
| `jiekou/qwen/qwen3-235b-a22b-fp8`              | 41K     |       |           |       |       |       | $0.20      | $0.80       |
| `jiekou/qwen/qwen3-235b-a22b-instruct-2507`    | 131K    |       |           |       |       |       | $0.15      | $0.80       |
| `jiekou/qwen/qwen3-235b-a22b-thinking-2507`    | 131K    |       |           |       |       |       | $0.30      | $3          |
| `jiekou/qwen/qwen3-30b-a3b-fp8`                | 41K     |       |           |       |       |       | $0.09      | $0.45       |
| `jiekou/qwen/qwen3-32b-fp8`                    | 41K     |       |           |       |       |       | $0.10      | $0.45       |
| `jiekou/qwen/qwen3-coder-480b-a35b-instruct`   | 262K    |       |           |       |       |       | $0.29      | $1          |
| `jiekou/qwen/qwen3-coder-next`                 | 262K    |       |           |       |       |       | $0.20      | $2          |
| `jiekou/qwen/qwen3-next-80b-a3b-instruct`      | 66K     |       |           |       |       |       | $0.15      | $2          |
| `jiekou/qwen/qwen3-next-80b-a3b-thinking`      | 66K     |       |           |       |       |       | $0.15      | $2          |
| `jiekou/xiaomimimo/mimo-v2-flash`              | 262K    |       |           |       |       |       | —          | —           |
| `jiekou/zai-org/glm-4.5`                       | 131K    |       |           |       |       |       | $0.60      | $2          |
| `jiekou/zai-org/glm-4.5v`                      | 66K     |       |           |       |       |       | $0.60      | $2          |
| `jiekou/zai-org/glm-4.7`                       | 205K    |       |           |       |       |       | $0.60      | $2          |
| `jiekou/zai-org/glm-4.7-flash`                 | 200K    |       |           |       |       |       | $0.07      | $0.40       |

## Advanced configuration

### Custom headers

```typescript
const agent = new Agent({
  id: "custom-agent",
  name: "custom-agent",
  model: {
    url: "https://api.jiekou.ai/openai",
    id: "jiekou/baidu/ernie-4.5-300b-a47b-paddle",
    apiKey: process.env.JIEKOU_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
      ? "jiekou/zai-org/glm-4.7-flash"
      : "jiekou/baidu/ernie-4.5-300b-a47b-paddle";
  }
});
```