# Request types

There is one model. Every call is classified into a request type by its shape, and each request type invokes the model best suited to it.

## How a call is classified

Classification is deterministic and local — it reads the request shape (input size, tools, schemas, code, images, documents, reasoning language) and combines it with the intent implied by your model id. Capability signals win over the model name: a PDF sent to a "mini" model is still a `document` request. Rules are evaluated top to bottom; the first match wins.

| # | When the request has… | Resolves to |
| --- | --- | --- |
| 1 | Document / PDF / file input | `document` |
| 2 | Image input | `vision` |
| 3 | Input estimated beyond the standard context window | `long` |
| 4 | Tool definitions or a forced tool choice | `code` |
| 5 | Code blocks, diffs, stack traces, or repo paths | `code` |
| 6 | A JSON / response schema, or extraction language | `json` |
| 7 | Multi-step reasoning language | `reason` |
| 8 | Simple summarize / classify / translate / rewrite | `flash (or pro at higher effort)` |
| 9 | General chat with no special signal | `the model-intent base type (pro or flash)` |

## The request types

These are the request types your traffic can land on. You see the request type in your own analytics; the model, candidate, and provider that serve it stay private.

| Request type | Triggered by |
| --- | --- |
| `vision` | Image content parts in the request<br />_Requests with image input._ |
| `document` | PDF / file input (e.g. Anthropic document blocks)<br />_Requests with PDF / file input._ |
| `long` | Estimated input beyond the standard context window<br />_Requests whose input exceeds the standard context window._ |
| `code` | Tool definitions, diffs, stack traces, or repo paths<br />_Code-shaped requests — diffs, stack traces, tool use._ |
| `json` | response_format / output JSON schema set<br />_Requests that set a JSON / response schema._ |
| `reason` | Multi-step reasoning language in the prompt<br />_Multi-step reasoning requests._ |
| `flash` _(default)_ | Simple request at low effort<br />_Simple, low-effort requests — served fast and cheap._ |
| `pro` _(default)_ | Everything else (default)<br />_General requests with no special signal._ |

## Examples

| Request | Resolves to |
| --- | --- |
| General text on a Claude / GPT id | `pro` |
| Code or tool calls on any id | `code` |
| Summarization on a small / mini id | `flash` |
| Any id with a PDF document block | `document` |
| Any id with image input | `vision` |
| Any id with a JSON response schema | `json` |

:::note[You never select a request type]
The request type is inferred from the call — there is no parameter to pick a type. The only lever you control is `effort`, which biases cost, latency, and quality within the chosen type without changing your code.
:::

:::tip[See the type your calls land on]
Each response returns its type in the `X-DI-Request-Type` header (see [Response headers](https://docs.directinference.com/headers/)), and the mix across all your traffic is broken down in [Usage & analytics](https://docs.directinference.com/usage/).
:::