Back to Mastra

Jiekou.AI | Models

docs/src/content/en/models/providers/jiekou.mdx

2025-12-1818.2 KB
Original Source

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.

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 for details.

:::

Models

<ProviderModelsTable models={[ { "model": "jiekou/baidu/ernie-4.5-300b-a47b-paddle", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 123000, "maxOutput": 12000, "inputCost": 0.28, "outputCost": 1.1 }, { "model": "jiekou/baidu/ernie-4.5-vl-424b-a47b", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 123000, "maxOutput": 16000, "inputCost": 0.42, "outputCost": 1.25 }, { "model": "jiekou/claude-haiku-4-5-20251001", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 20000, "maxOutput": 64000, "inputCost": 0.9, "outputCost": 4.5 }, { "model": "jiekou/claude-opus-4-1-20250805", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 200000, "maxOutput": 32000, "inputCost": 13.5, "outputCost": 67.5 }, { "model": "jiekou/claude-opus-4-20250514", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 200000, "maxOutput": 32000, "inputCost": 13.5, "outputCost": 67.5 }, { "model": "jiekou/claude-opus-4-5-20251101", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 200000, "maxOutput": 65536, "inputCost": 4.5, "outputCost": 22.5 }, { "model": "jiekou/claude-opus-4-6", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 1000000, "maxOutput": 128000, "inputCost": 5, "outputCost": 25 }, { "model": "jiekou/claude-sonnet-4-20250514", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 200000, "maxOutput": 64000, "inputCost": 2.7, "outputCost": 13.5 }, { "model": "jiekou/claude-sonnet-4-5-20250929", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 200000, "maxOutput": 64000, "inputCost": 2.7, "outputCost": 13.5 }, { "model": "jiekou/deepseek/deepseek-r1-0528", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 163840, "maxOutput": 32768, "inputCost": 0.7, "outputCost": 2.5 }, { "model": "jiekou/deepseek/deepseek-v3-0324", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 163840, "maxOutput": 163840, "inputCost": 0.28, "outputCost": 1.14 }, { "model": "jiekou/deepseek/deepseek-v3.1", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 163840, "maxOutput": 32768, "inputCost": 0.27, "outputCost": 1 }, { "model": "jiekou/gemini-2.5-flash", "imageInput": true, "audioInput": true, "videoInput": true, "toolUsage": true, "reasoning": false, "contextWindow": 1048576, "maxOutput": 65535, "inputCost": 0.27, "outputCost": 2.25 }, { "model": "jiekou/gemini-2.5-flash-lite", "imageInput": true, "audioInput": true, "videoInput": true, "toolUsage": true, "reasoning": false, "contextWindow": 1048576, "maxOutput": 65535, "inputCost": 0.09, "outputCost": 0.36 }, { "model": "jiekou/gemini-2.5-flash-lite-preview-06-17", "imageInput": true, "audioInput": true, "videoInput": true, "toolUsage": true, "reasoning": false, "contextWindow": 1048576, "maxOutput": 65535, "inputCost": 0.09, "outputCost": 0.36 }, { "model": "jiekou/gemini-2.5-flash-lite-preview-09-2025", "imageInput": true, "audioInput": true, "videoInput": true, "toolUsage": true, "reasoning": true, "contextWindow": 1048576, "maxOutput": 65536, "inputCost": 0.09, "outputCost": 0.36 }, { "model": "jiekou/gemini-2.5-flash-preview-05-20", "imageInput": true, "audioInput": true, "videoInput": true, "toolUsage": true, "reasoning": false, "contextWindow": 1048576, "maxOutput": 200000, "inputCost": 0.135, "outputCost": 3.15 }, { "model": "jiekou/gemini-2.5-pro", "imageInput": true, "audioInput": true, "videoInput": true, "toolUsage": true, "reasoning": false, "contextWindow": 1048576, "maxOutput": 65535, "inputCost": 1.125, "outputCost": 9 }, { "model": "jiekou/gemini-2.5-pro-preview-06-05", "imageInput": true, "audioInput": true, "videoInput": true, "toolUsage": true, "reasoning": false, "contextWindow": 1048576, "maxOutput": 200000, "inputCost": 1.125, "outputCost": 9 }, { "model": "jiekou/gemini-3-flash-preview", "imageInput": true, "audioInput": true, "videoInput": true, "toolUsage": true, "reasoning": false, "contextWindow": 1048576, "maxOutput": 65536, "inputCost": 0.5, "outputCost": 3 }, { "model": "jiekou/gemini-3-pro-preview", "imageInput": true, "audioInput": true, "videoInput": true, "toolUsage": true, "reasoning": false, "contextWindow": 1048576, "maxOutput": 65536, "inputCost": 1.8, "outputCost": 10.8 }, { "model": "jiekou/gpt-5-chat-latest", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 400000, "maxOutput": 128000, "inputCost": 1.125, "outputCost": 9 }, { "model": "jiekou/gpt-5-codex", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 400000, "maxOutput": 128000, "inputCost": 1.125, "outputCost": 9 }, { "model": "jiekou/gpt-5-mini", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 400000, "maxOutput": 128000, "inputCost": 0.225, "outputCost": 1.8 }, { "model": "jiekou/gpt-5-nano", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 400000, "maxOutput": 128000, "inputCost": 0.045, "outputCost": 0.36 }, { "model": "jiekou/gpt-5-pro", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 400000, "maxOutput": 272000, "inputCost": 13.5, "outputCost": 108 }, { "model": "jiekou/gpt-5.1", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 400000, "maxOutput": 128000, "inputCost": 1.125, "outputCost": 9 }, { "model": "jiekou/gpt-5.1-codex", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 400000, "maxOutput": 128000, "inputCost": 1.125, "outputCost": 9 }, { "model": "jiekou/gpt-5.1-codex-max", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 400000, "maxOutput": 128000, "inputCost": 1.125, "outputCost": 9 }, { "model": "jiekou/gpt-5.1-codex-mini", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 400000, "maxOutput": 128000, "inputCost": 0.225, "outputCost": 1.8 }, { "model": "jiekou/gpt-5.2", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 400000, "maxOutput": 128000, "inputCost": 1.575, "outputCost": 12.6 }, { "model": "jiekou/gpt-5.2-codex", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 400000, "maxOutput": 128000, "inputCost": 1.75, "outputCost": 14 }, { "model": "jiekou/gpt-5.2-pro", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 400000, "maxOutput": 128000, "inputCost": 18.9, "outputCost": 151.2 }, { "model": "jiekou/grok-4-0709", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 256000, "maxOutput": 8192, "inputCost": 2.7, "outputCost": 13.5 }, { "model": "jiekou/grok-4-1-fast-non-reasoning", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 2000000, "maxOutput": 2000000, "inputCost": 0.18, "outputCost": 0.45 }, { "model": "jiekou/grok-4-1-fast-reasoning", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 2000000, "maxOutput": 2000000, "inputCost": 0.18, "outputCost": 0.45 }, { "model": "jiekou/grok-4-fast-non-reasoning", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 2000000, "maxOutput": 2000000, "inputCost": 0.18, "outputCost": 0.45 }, { "model": "jiekou/grok-4-fast-reasoning", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 2000000, "maxOutput": 2000000, "inputCost": 0.18, "outputCost": 0.45 }, { "model": "jiekou/grok-code-fast-1", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 256000, "maxOutput": 256000, "inputCost": 0.18, "outputCost": 1.35 }, { "model": "jiekou/minimax/minimax-m2.1", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 204800, "maxOutput": 131072, "inputCost": 0.3, "outputCost": 1.2 }, { "model": "jiekou/minimaxai/minimax-m1-80k", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 1000000, "maxOutput": 40000, "inputCost": 0.55, "outputCost": 2.2 }, { "model": "jiekou/moonshotai/kimi-k2-0905", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 262144, "maxOutput": 262144, "inputCost": 0.6, "outputCost": 2.5 }, { "model": "jiekou/moonshotai/kimi-k2-instruct", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 131072, "maxOutput": 131072, "inputCost": 0.57, "outputCost": 2.3 }, { "model": "jiekou/moonshotai/kimi-k2.5", "imageInput": true, "audioInput": false, "videoInput": true, "toolUsage": true, "reasoning": true, "contextWindow": 262144, "maxOutput": 262144, "inputCost": 0.6, "outputCost": 3 }, { "model": "jiekou/o3", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 131072, "maxOutput": 131072, "inputCost": 10, "outputCost": 40 }, { "model": "jiekou/o3-mini", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 131072, "maxOutput": 131072, "inputCost": 1.1, "outputCost": 4.4 }, { "model": "jiekou/o4-mini", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 200000, "maxOutput": 100000, "inputCost": 1.1, "outputCost": 4.4 }, { "model": "jiekou/qwen/qwen3-235b-a22b-fp8", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": false, "reasoning": true, "contextWindow": 40960, "maxOutput": 20000, "inputCost": 0.2, "outputCost": 0.8 }, { "model": "jiekou/qwen/qwen3-235b-a22b-instruct-2507", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 131072, "maxOutput": 16384, "inputCost": 0.15, "outputCost": 0.8 }, { "model": "jiekou/qwen/qwen3-235b-a22b-thinking-2507", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 131072, "maxOutput": 131072, "inputCost": 0.3, "outputCost": 3 }, { "model": "jiekou/qwen/qwen3-30b-a3b-fp8", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": false, "reasoning": true, "contextWindow": 40960, "maxOutput": 20000, "inputCost": 0.09, "outputCost": 0.45 }, { "model": "jiekou/qwen/qwen3-32b-fp8", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": false, "reasoning": true, "contextWindow": 40960, "maxOutput": 20000, "inputCost": 0.1, "outputCost": 0.45 }, { "model": "jiekou/qwen/qwen3-coder-480b-a35b-instruct", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 262144, "maxOutput": 65536, "inputCost": 0.29, "outputCost": 1.2 }, { "model": "jiekou/qwen/qwen3-coder-next", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 262144, "maxOutput": 65536, "inputCost": 0.2, "outputCost": 1.5 }, { "model": "jiekou/qwen/qwen3-next-80b-a3b-instruct", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 65536, "maxOutput": 65536, "inputCost": 0.15, "outputCost": 1.5 }, { "model": "jiekou/qwen/qwen3-next-80b-a3b-thinking", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 65536, "maxOutput": 65536, "inputCost": 0.15, "outputCost": 1.5 }, { "model": "jiekou/xiaomimimo/mimo-v2-flash", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 262144, "maxOutput": 131072, "inputCost": null, "outputCost": null }, { "model": "jiekou/zai-org/glm-4.5", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 131072, "maxOutput": 98304, "inputCost": 0.6, "outputCost": 2.2 }, { "model": "jiekou/zai-org/glm-4.5v", "imageInput": true, "audioInput": false, "videoInput": true, "toolUsage": true, "reasoning": true, "contextWindow": 65536, "maxOutput": 16384, "inputCost": 0.6, "outputCost": 1.8 }, { "model": "jiekou/zai-org/glm-4.7", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 204800, "maxOutput": 131072, "inputCost": 0.6, "outputCost": 2.2 }, { "model": "jiekou/zai-org/glm-4.7-flash", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 200000, "maxOutput": 128000, "inputCost": 0.07, "outputCost": 0.4 } ]} />

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