Back to Mastra

IO Intelligence | Models | Mastra

docs/src/content/en/models/providers/io-intelligence.mdx

2025-12-186.8 KB
Original Source

IO Intelligence

Access 17 IO Intelligence models through Mastra's model router. Authentication is handled automatically using the IOINTELLIGENCE_API_KEY environment variable.

Learn more in the IO Intelligence documentation.

bash
IOINTELLIGENCE_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: "io-intelligence/deepseek-ai-deepseek-r1-0528"
});

// 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 IO Intelligence documentation for details.

:::

Models

<ProviderModelsTable models={[ { "model": "io-intelligence/deepseek-ai-deepseek-r1-0528", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 128000, "maxOutput": 4096, "inputCost": 2, "outputCost": 8.75 }, { "model": "io-intelligence/intel-qwen3-coder-480b-a35b-instruct-int4-mixed-ar", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 106000, "maxOutput": 4096, "inputCost": 0.22, "outputCost": 0.95 }, { "model": "io-intelligence/meta-llama-llama-3-2-90b-vision-instruct", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 16000, "maxOutput": 4096, "inputCost": 0.35, "outputCost": 0.4 }, { "model": "io-intelligence/meta-llama-llama-3-3-70b-instruct", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 128000, "maxOutput": 4096, "inputCost": 0.13, "outputCost": 0.38 }, { "model": "io-intelligence/meta-llama-llama-4-maverick-17b-128e-instruct-fp8", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 430000, "maxOutput": 4096, "inputCost": 0.15, "outputCost": 0.6 }, { "model": "io-intelligence/mistralai-devstral-small-2505", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 128000, "maxOutput": 4096, "inputCost": 0.05, "outputCost": 0.22 }, { "model": "io-intelligence/mistralai-magistral-small-2506", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 128000, "maxOutput": 4096, "inputCost": 0.5, "outputCost": 1.5 }, { "model": "io-intelligence/mistralai-mistral-large-instruct-2411", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 128000, "maxOutput": 4096, "inputCost": 2, "outputCost": 6 }, { "model": "io-intelligence/mistralai-mistral-nemo-instruct-2407", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 128000, "maxOutput": 4096, "inputCost": 0.02, "outputCost": 0.04 }, { "model": "io-intelligence/moonshotai-kimi-k2-instruct-0905", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 32768, "maxOutput": 4096, "inputCost": 0.39, "outputCost": 1.9 }, { "model": "io-intelligence/moonshotai-kimi-k2-thinking", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 32768, "maxOutput": 4096, "inputCost": 0.55, "outputCost": 2.25 }, { "model": "io-intelligence/openai-gpt-oss-120b", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 131072, "maxOutput": 4096, "inputCost": 0.04, "outputCost": 0.4 }, { "model": "io-intelligence/openai-gpt-oss-20b", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 64000, "maxOutput": 4096, "inputCost": 0.03, "outputCost": 0.14 }, { "model": "io-intelligence/qwen-qwen2-5-vl-32b-instruct", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 32000, "maxOutput": 4096, "inputCost": 0.05, "outputCost": 0.22 }, { "model": "io-intelligence/qwen-qwen3-235b-a22b-thinking-2507", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 262144, "maxOutput": 4096, "inputCost": 0.11, "outputCost": 0.6 }, { "model": "io-intelligence/qwen-qwen3-next-80b-a3b-instruct", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 262144, "maxOutput": 4096, "inputCost": 0.1, "outputCost": 0.8 }, { "model": "io-intelligence/zai-org-glm-4-6", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 200000, "maxOutput": 4096, "inputCost": 0.4, "outputCost": 1.75 } ]} />

Advanced Configuration

Custom Headers

typescript
const agent = new Agent({
  id: "custom-agent",
  name: "custom-agent",
  model: {
    url: "https://api.intelligence.io.solutions/api/v1",
    id: "io-intelligence/deepseek-ai-deepseek-r1-0528",
    apiKey: process.env.IOINTELLIGENCE_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
      ? "io-intelligence/zai-org-glm-4-6"
      : "io-intelligence/deepseek-ai-deepseek-r1-0528";
  }
});