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

> ## Agent Instructions
> Orq.ai is the control plane for model and MCP traffic: one key reaches the workspace's enabled models, MCP servers, and resources. The setup depends on where the agent runs.
> Hosted assistant (ChatGPT, claude.ai, a hosted sandbox): install nothing. Tell the human to add https://my.orq.ai/v2/mcp as a remote MCP connector and finish the Orq.ai sign-in. With OAuth, send no Authorization header; otherwise send an API key as a bearer token.
> Local coding agent (Claude Code, Codex, Cursor, OpenCode): run `curl -fsSL https://cli.orq.ai/install.sh | sh`. It installs the CLI and runs `orq setup`, which signs in, writes a project-scoped key to `~/.orq/env`, and wires the detected agents through the AI Gateway. It can also add the Orq MCP server and Orq Skills, the workflows for agents, evaluations, and traces: https://docs.orq.ai/ai-studio/integrations/code-assistants/orq-skills.md. Verify with `orq status`.
> Headless or CI: read `ORQ_API_KEY` from the environment; a human creates the key at https://docs.orq.ai/ai-studio/organization/api-keys.md.
> Send model traffic to https://my.orq.ai/v3/router with `Authorization: Bearer $ORQ_API_KEY`; the Anthropic SDK uses https://my.orq.ai/v3/anthropic. New integrations go on `/v3/router`: `/v2/router` stays published for backward compatibility, and `orq.prompt` works only on `/v2/router/chat/completions`.
> Enable a model for the workspace and use its exact `provider/model` id. `POST /v2/workspace-models` enables a model, and a call fails while the workspace has neither credits nor a provider key.
> On `/chat/completions`, a reasoning model rejects `tools` with a `reasoning_effort` other than `none`; `/responses` keeps reasoning.
> On a failure, branch on `error.code` and follow `error.doc_url`; a budget rejection answers 429.

# Auto Models

> Call orq/auto or orq/frontier and let Orq.ai pick the model from the Pareto frontier of the models the workspace can call. No pool to configure.

**Orq.ai** provisions seven system-managed models under the `orq` provider in every workspace, enabled by default and needing no setup. The model ID names the policy: `auto*` routes each request by complexity across three seats, and `frontier*` always resolves to a single model.

They are listed in the **Model Garden** with the other models. A `frontier*` model shows the price and Intelligence Index of the model it resolves to in the workspace; an `auto*` model shows the highest price among its seated models and the Intelligence Index of its Hard band. Each request is billed at the price of the model it resolves to. The model's detail sheet lists the models it routes to in the workspace, with their band, price and Intelligence Index.

## Use Cases

* Start routing in one line without curating a [**Smart Router**](https://docs.orq.ai/ai-gateway/smart-router.md) pool.
* Keep the pool current as the catalog and the workspace's provider keys change, without editing a router.
* Stay on EU-hosted endpoints only with `orq/auto-eu`.
* Stay on open-weight models only with `orq/auto-open`.
* Always call the strongest open-weight or EU-hosted model with `orq/frontier-open` or `orq/frontier-eu`.
* Always call the strongest available model with `orq/frontier`, or the cheapest model in the top third of the catalog with `orq/frontier-cheapest`.

## Quick Start

Auto models work on the `/v3` router endpoints (chat completions, responses, and messages), on **Deployment** invokes over the API, and on **Agents** run through the responses endpoint: set the **Agent**'s model to `orq/auto` and call it with `"model": "agent/<agent_key>"`. The **Playground**, the Studio run button, the `/v2` proxy endpoints, **Workflows** and the `/v2` **Agents** runtime do not support them yet.

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST https://my.orq.ai/v3/router/responses \
  -H "Authorization: Bearer $ORQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "orq/auto",
    "input": "Summarize this support ticket in two sentences."
  }'
```

```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.ORQ_API_KEY,
  baseURL: "https://my.orq.ai/v3/router",
});

const response = await client.responses.create({
  model: "orq/auto",
  input: "Summarize this support ticket in two sentences.",
});

console.log(response.output_text);
```

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from openai import OpenAI
import os

client = OpenAI(
    api_key=os.environ.get("ORQ_API_KEY"),
    base_url="https://my.orq.ai/v3/router",
)

response = client.responses.create(
    model="orq/auto",
    input="Summarize this support ticket in two sentences.",
)

print(response.output_text)
```

## Models

| Model | Behavior |
| - | - |
| `orq/auto` | Routes each request by complexity across three price-tiered models from the workspace's Pareto frontier |
| `orq/auto-open` | Same as `orq/auto`, restricted to open-weight models |
| `orq/auto-eu` | Same as `orq/auto`, restricted to EU-hosted endpoints |
| `orq/frontier` | Always resolves to the strongest model the workspace can call |
| `orq/frontier-open` | Same as `orq/frontier`, restricted to open-weight models |
| `orq/frontier-eu` | Same as `orq/frontier`, restricted to EU-hosted endpoints |
| `orq/frontier-cheapest` | Resolves to the cheapest model in the top third of the catalog by Intelligence Index |

`orq/frontier` is the strongest callable model; `orq/frontier-open` and `orq/frontier-eu` are the strongest callable open-weight and EU-hosted models. `orq/frontier-cheapest` is the cheapest frontier model at or above the top third of the catalog by Intelligence Index; the bar is a percentile over the catalog, so it keeps its meaning when the index is rescaled or models are added. When no callable model reaches the bar, it resolves to the strongest callable model instead.

## How the Pool Is Derived

Each request to an auto model derives its pool from the models callable in the workspace at that moment:

* **Source set**: when the workspace enforces an allowlist, only enabled models are callable. Otherwise, any active catalog model is callable if the workspace holds a provider key for it, or the workspace may use **Orq.ai**'s own provider keys, plus the workspace's private models.
* **Quality floor**: models below an Intelligence Index of 15 are excluded, as are models without Artificial Analysis metadata, which have no Intelligence Index or blended price to compare. Endpoints with a zero price and endpoints on a data-contribution tier (model IDs ending in `-contributor`, whose prompts may be used for training) are never seated. This rule runs per endpoint before models are deduplicated by identity, so the cheaper remaining endpoint of each model is kept.
* **Pareto frontier**: the remaining models are reduced to the Pareto frontier of Intelligence Index versus price, dropping any model dominated by a cheaper, equally or more intelligent alternative.
* **Ranking**: each model is compared on its Intelligence Index at its default reasoning effort. The reasoning effort a request sends does not change the ranking.
* **Seats** for `auto*` models: three frontier models, one per band (Easy, Medium, Hard).
  * Target: at least a 2.75x price gap between neighbouring bands.
  * No trio clears it: the trio with the widest spread is seated.
* **Bar** for `frontier*` models: a percentile over the catalog's Intelligence Index.
  * `orq/frontier-cheapest`: the cheapest model at or above the top third.
  * `orq/frontier-open` and `orq/frontier-eu`: the bar is computed over the open-weight or EU-hosted part of the catalog only.

`orq/auto`, `orq/frontier`, and `orq/frontier-cheapest` skip an EU-pinned endpoint only when a non-EU endpoint of the same model is callable.

## Degradation

`orq/auto`, `orq/auto-open`, and `orq/auto-eu` degrade with the size of the frontier: two frontier models serve as two bands instead of three, and a single frontier model serves every request directly. The `frontier*` models always resolve to a single model, so they degrade only when none is callable. With no callable model, the request fails with HTTP `400`; on the `/v3` router endpoints the error has `type: "invalid_request_error"`.

## Concrete Model Attribution

The `model` field in the response, [Traces](https://docs.orq.ai/ai-studio/observability/traces.md), and billing always name the concrete model a request resolved to, never the auto model reference itself. Spans additionally carry the `orq.auto_router.preset` attribute, naming the auto model that made the routing decision.

> [!NOTE]
>
> The pool for an auto model is derived per request, not cached. It changes as the catalog changes or as the workspace's provider keys change.

## Preview the Pool

Inspect the pool an auto model would derive right now with the `PreviewSystemRouterPool` Connect RPC. It requires the `smart-router.view` permission, and it is not part of the SDKs or the public API reference yet.

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST https://my.orq.ai/v3/rpc/platform/orq.platform.v1.SmartRoutersService/PreviewSystemRouterPool \
  -H "Authorization: Bearer $ORQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "modelId": "orq/auto" }'
```

The response shows the status and the seated models. For `frontier*` models, `selectedModel` is the model a request resolves to.

> [accordion] All response fields
>
> | Field | Meaning |
> | - | - |
> | `preset` | The auto model that was previewed, for example `auto` |
> | `policy` | `SYSTEM_ROUTER_POLICY_COMPLEXITY` for `auto*` models, `SYSTEM_ROUTER_POLICY_FRONTIER` for `frontier*` models |
> | `profile` | The routing mode, always Balanced for `auto*` models |
> | `bands` | The seated models per band, Hard to Easy, each with `model`, `intelligenceIndex`, and `price`; empty bands are omitted, and a `SINGLE` pool has none (`auto*` only) |
> | `poolStatus` | `SYSTEM_ROUTER_POOL_STATUS_FULL`, `TWO_BAND`, `SINGLE`, or `EMPTY` |
> | `relaxedTierRule` | `true` when no trio cleared the 2.75x price gap and the widest available spread was seated |
> | `sourceSet` | `SYSTEM_ROUTER_SOURCE_SET_ENABLED` when the workspace allowlist applied, otherwise `SYSTEM_ROUTER_SOURCE_SET_ALL_CALLABLE` |
> | `seatableCount` | Callable models that passed the quality floor and seating rules, deduplicated by identity |
> | `dominatedCount` | Seatable models dropped by the Pareto frontier |
> | `belowFloorCount` | Callable endpoints with Artificial Analysis metadata that failed the quality floor or the seating rules; `0` when `poolStatus` is `EMPTY` |
> | `missingForFull` | Frontier models still needed to fill three bands (`auto*` only) |
> | `frontier` | The full Pareto frontier, strongest first |
> | `selectedModel` | The model the request resolves to (`frontier*` only) |
> | `fallbacks` | The next two frontier models at or above the bar, cheapest first; when `barUnmet` is `true`, the next two frontier models regardless of bar; informational only, requests do not fall back to them (`frontier*` only) |
> | `resolvedBar` | The Intelligence Index the bar resolved to (`frontier*` only) |
> | `barUnmet` | `true` when no callable model reached the bar, so `selectedModel` is the strongest callable (`frontier*` only) |

## Limitations

| Limitation | Impact | Workaround |
| - | - | - |
| `/v3` router endpoints and Deployment invokes only | The **Playground**, the Studio run button, the `/v2` proxy endpoints, **Workflows** and the `/v2` **Agents** runtime do not support auto models | Call the `/v3` chat completions, responses, or messages endpoints, or invoke a **Deployment** |
| Cannot be disabled | Disabling an auto model returns HTTP `409`; the **Model Garden** keeps the switch on and shows the error | Leave it enabled; requests only resolve to it when it is named explicitly |
| Reserved **Smart Router** names | Creating a **Smart Router** named `auto`, `auto-*`, `frontier`, or `frontier-*` returns HTTP `409` | Pick a different name |
| No fallback for `frontier*` models | A `frontier*` request resolves to one model; a provider outage on that model fails the request | Add `fallbacks` to the request |
| Small `max_tokens` with reasoning models | A reasoning model can spend the whole budget thinking and return an empty reply | Allow enough output tokens, for example 256 or more |
| Fixed routing mode | `auto*` models always route in **Balanced** mode | Create a [**Smart Router**](https://docs.orq.ai/ai-gateway/smart-router.md) to use **Cost** or **Quality** |
| No per-workspace opt-out | Auto models are present in every workspace | Restrict callable models with the workspace allowlist; the pool follows it |
| Pool derived per request | The seated models can change between requests as the catalog or provider keys change | Use the preview RPC to inspect the pool, or a **Smart Router** for a fixed pool |


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