> ## Documentation Index
> Fetch the complete documentation index at: https://mixroute.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Smart Routing

<link rel="alternate" hrefLang="en" href="https://mixroute.ai/docs/api-reference/smart-routing" />

<link rel="alternate" hrefLang="zh-Hans" href="https://mixroute.ai/docs/zh-hans/smart-routing" />

<link rel="alternate" hrefLang="zh-Hant" href="https://mixroute.ai/docs/zh-hant/api-reference/smart-routing" />

<link rel="alternate" hrefLang="ja" href="https://mixroute.ai/docs/ja/api-reference/smart-routing" />

<link rel="alternate" hrefLang="x-default" href="https://mixroute.ai/docs/api-reference/smart-routing" />

## Introduction

Smart Routing automatically assigns each request to a model based on task complexity. The console presents three tiers — **Simple**, **Complex**, and **Ultra** — to reduce API costs while maintaining output quality. Ultra is the price benchmark.

<Note>
  In the System API, the console's Ultra tier maps to `smart_route_tiers.super`, and `smart_route_tiers` must be sent as a JSON-encoded string. See [Smart Routing API](/docs/api-reference/system-api/smart-routing) for the complete create, update, and statistics workflow.
</Note>

## Application Document

* [Hermes](/docs/integrations/Hermes)
* [Odysseus](/docs/integrations/odysseus)
* [Opencode](/docs/integrations/open-code)
* [OpenClaw](/docs/integrations/openclaw)
* [ClaudeCode](/docs/integrations/claude-code)
* [OpenWebUi](/docs/integrations/openwebui)

### Usage Constraints

**Cache Capability Constraints**

Prompt caches are generally scoped to a provider and model. If Smart Routing sends a later request to a different model, that request cannot reuse the previous model's cache entry. Requests routed to the same model may still use caching according to that provider's rules.

**Request Body Structure Constraints**

Smart Routing uses the `/v1/chat/completions` endpoint. When the routing target is a Claude series model, it can only work through OpenAI compatibility mode. For feature constraints after compatibility, please refer to the Anthropic official documentation [OpenAI SDK compatibility](https://platform.claude.com/docs/en/cli-sdks-libraries/libraries/openai-sdk).

### Usage Guide

1. Create a route

<Frame>
  <img src="https://mintcdn.com/personal-a5418d9f/35UMqVTCuMQi8uxs/images/smart-routing-1.png?fit=max&auto=format&n=35UMqVTCuMQi8uxs&q=85&s=52b85562775173efaa75de39aee75177" alt="Smart Routing 1" width="475" height="797" data-path="images/smart-routing-1.png" />
</Frame>

2. Create an API key for the route node

<Frame>
  <img src="https://mintcdn.com/personal-a5418d9f/35UMqVTCuMQi8uxs/images/smart-routing-2.png?fit=max&auto=format&n=35UMqVTCuMQi8uxs&q=85&s=8bd380bb4b1382da5a39d99bf61df627" alt="Smart Routing 2" width="2235" height="546" data-path="images/smart-routing-2.png" />
</Frame>

3. Select the Default group for the API key

<Frame>
  <img src="https://mintcdn.com/personal-a5418d9f/35UMqVTCuMQi8uxs/images/smart-routing-3.png?fit=max&auto=format&n=35UMqVTCuMQi8uxs&q=85&s=90a1f8639c569aad34c4dd0c7e860d5c" alt="Smart Routing 3" width="1620" height="1302" data-path="images/smart-routing-3.png" />
</Frame>

4. Set the corresponding models for the three levels: simple, complex, and ultra

<Frame>
  <img src="https://mintcdn.com/personal-a5418d9f/35UMqVTCuMQi8uxs/images/smart-routing-4.png?fit=max&auto=format&n=35UMqVTCuMQi8uxs&q=85&s=45eeff76775a4f9f8e24809e3fbe68f5" alt="Smart Routing 4" width="2234" height="1509" data-path="images/smart-routing-4.png" />
</Frame>

5. Configure and route through the smart gateway

* Communication endpoint: `https://api.mixroute.ai/v1/chat/completions`
* Model name: `auto`
* API Key: Use the route's API key

```bash theme={null}
curl https://api.mixroute.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ROUTING_KEY" \
  -d '{
    "model": "auto",
    "messages": [
      {"role": "user", "content": "Hello"}
    ]
  }'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.