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

# Response headers

> Headers the AI Gateway adds to every reply: the request reference, the trace, and which provider and model answered.

| Header | What it holds |
| - | - |
| `x-request-id` | The request's reference. It is on every reply, errors included. Quote it to [support](/support). |
| `x-alt-trace-id` | The trace the request belongs to, for [OpenTelemetry](/ai-gateway/opentelemetry). |
| `x-alt-provider` | The provider that answered, such as `openai`. |
| `x-alt-resolved-model` | The model that answered. |
| `x-alt-fallback-index` | Present only when a fallback answered: `1` for the first model in `fallbacks`, `2` for the second. |

A streamed reply carries the same headers, sent before the first event.

## Read them in code

<CodeGroup>
  ```python Python theme={null}
  import os
  from openai import OpenAI

  client = OpenAI(base_url="https://api.altrum.ai/v1", api_key=os.environ["ALTRUM_VIRTUAL_KEY"])

  raw = client.chat.completions.with_raw_response.create(
      model="openai/gpt-4o-mini",
      messages=[{"role": "user", "content": "Say hello."}],
  )
  print(raw.headers["x-request-id"], raw.headers["x-alt-resolved-model"])
  completion = raw.parse()
  ```

  ```typescript TypeScript theme={null}
  import OpenAI from "openai";

  const client = new OpenAI({ baseURL: "https://api.altrum.ai/v1", apiKey: process.env.ALTRUM_VIRTUAL_KEY });

  const { data, response } = await client.chat.completions
    .create({ model: "openai/gpt-4o-mini", messages: [{ role: "user", content: "Say hello." }] })
    .withResponse();
  console.log(response.headers.get("x-request-id"), response.headers.get("x-alt-resolved-model"));
  ```
</CodeGroup>


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