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

# Headers

> The request headers Manifest reads and the X-Manifest-* response headers it returns, with what each one does.

Manifest reads a few request headers, and returns a set of `X-Manifest-*` response headers so clients can see what happened without parsing the response body.

## Request headers

| Header                  | Value                | Effect                                                                                                                                               |
| ----------------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Authorization`         | `Bearer mnfst_<key>` | **Required.** Authenticates the agent.                                                                                                               |
| `Content-Type`          | `application/json`   | **Required.**                                                                                                                                        |
| `anthropic-version`     | `2023-06-01`         | **Required for `/v1/messages`.** Forwarded to the upstream.                                                                                          |
| Your custom tier header | your value           | Routes the request to a [custom tier](/routing#custom). You set the key and value when you create the tier, so the exact header name is up to you.   |
| `x-session-key`         | any string           | Groups requests into a session. Manifest keeps a session on the same upstream where the provider supports it, for sticky routing and prompt caching. |

The custom tier header is the only one that changes routing: send the header you configured on a tier and the request goes to that tier's model. See [Routing → Custom](/routing#custom).

## Response headers (every request)

| Header                       | Description                                                                     | Example             |
| ---------------------------- | ------------------------------------------------------------------------------- | ------------------- |
| `X-Manifest-Tier`            | The tier that handled the request: `default`, a custom tier's name, or `direct` | `default`           |
| `X-Manifest-Model`           | Model that actually served the response                                         | `claude-sonnet-4-6` |
| `X-Manifest-Provider`        | Upstream provider                                                               | `anthropic`         |
| `X-Manifest-Reason`          | Why that route was picked: `default`, `header-match`, or `direct`               | `header-match`      |
| `X-Manifest-Output-Modality` | Output modality of the response                                                 | `text`              |
| `X-Manifest-Response-Mode`   | Whether the response was streamed or `buffered`                                 | `buffered`          |

## Response headers (fallback only)

When the primary model fails and Manifest succeeds on a fallback, two extra headers are added:

| Header                      | Description                                         | Example |
| --------------------------- | --------------------------------------------------- | ------- |
| `X-Manifest-Fallback-From`  | The primary model that was attempted first          | `gpt-5` |
| `X-Manifest-Fallback-Index` | Position in the fallback chain (0 = first fallback) | `0`     |

When **every** model in the chain fails:

| Header                          | Description                              |
| ------------------------------- | ---------------------------------------- |
| `X-Manifest-Fallback-Exhausted` | Set to `true`. Response status is `424`. |

## Reading headers in code

```javascript theme={"theme":{"light":"github-light","dark":"github-dark"}}
const response = await fetch("http://localhost:2099/v1/chat/completions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MANIFEST_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "auto",
    messages: [{ role: "user", content: "Hello" }],
  }),
});

console.log(response.headers.get("x-manifest-tier")); // → "default"
console.log(response.headers.get("x-manifest-model")); // → "gpt-5-mini"
console.log(response.headers.get("x-manifest-provider")); // → "openai"
```

<Tip>
  Header names are case-insensitive in HTTP, but most browser `fetch`
  implementations lowercase them when reading. The proxy emits them as
  `X-Manifest-*`.
</Tip>
