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

# Response Headers

> Headers returned on every response, and compatibility headers for clients migrating from other gateways

## Overview

Every response from `/v1/responses`, `/v1/chat/completions`, and `/v1/messages` carries a request id, a trace id, and (where it's known) the request's cost. Clients migrating from another gateway can also ask for that gateway's own response headers, so existing logging and spend tracking keep working unchanged.

## Default Headers

| Header | Value | Streaming |
| - | - | - |
| `x-request-id` | Unique id for the request (UUID). Shown in your dashboard logs; include it when contacting support | Yes |
| `x-trace-id` | Trace id for the request (UUID) | Yes |
| `x-concentrate-cost` | Total cost of the request in USD, e.g. `0.000123`. Same value as `cost.total` in the response body | No |
| `request-id` | `/v1/messages` only. Same value as `x-request-id`, under Anthropic's header name | Yes |

`x-request-id` and `x-trace-id` are also returned on error responses.

<Note>
  **Why cost isn't on streams:** headers are sent before the first streamed event, when the cost isn't known yet. For streamed requests, read `cost` from the final event instead (on Chat Completions, set `stream_options.include_usage` to get it). The same applies to long-running non-streaming requests, where Concentrate sends keep-alive whitespace and so commits the headers early: read `cost.total` from the response body.
</Note>

## Compatibility Headers

To get another gateway's response headers, send `x-concentrate-compat-headers` with a comma-separated list of gateway names:

```bash theme={null}
curl https://api.concentrate.ai/v1/chat/completions \
  -H "Authorization: Bearer $CONCENTRATE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "x-concentrate-compat-headers: litellm,openrouter" \
  -d '{
    "model": "anthropic/claude-opus-4-6",
    "messages": [{"role": "user", "content": "Say hello in one word"}]
  }'
```

Names are case-insensitive, spaces around them are ignored, and unknown names are skipped. Without the header, none of these are sent.

| Name | Headers returned |
| - | - |
| `litellm` | `x-litellm-call-id`, `x-litellm-model-name`, `x-litellm-model-group`, `x-litellm-response-duration-ms`, `x-litellm-response-cost` |
| `openrouter` | `x-generation-id`, `x-provider-name` |
| `portkey` | `x-portkey-trace-id` |
| `helicone` | `helicone-id` |
| `bifrost` | `x-bifrost-trace-id`, `x-bifrost-original-model`, `x-bifrost-routing-info-provider`, `x-bifrost-routing-info-model` |
| `merge` | `x-merge-vendor`, `x-merge-model` |

### Header values

Values are Concentrate's, in each gateway's header name. Ids are Concentrate UUIDs, and providers and models are Concentrate slugs. For example, `x-generation-id` is a UUID rather than OpenRouter's `gen-...` id.

| Header | Value |
| - | - |
| `x-litellm-call-id`, `x-generation-id`, `helicone-id` | Same as `x-request-id` |
| `x-portkey-trace-id`, `x-bifrost-trace-id` | Same as `x-trace-id` |
| `x-litellm-model-name` | The `provider/model` that served the request, e.g. `anthropic/claude-opus-4-6` |
| `x-litellm-model-group`, `x-bifrost-original-model` | The `model` you sent, e.g. `auto` |
| `x-provider-name`, `x-bifrost-routing-info-provider`, `x-merge-vendor` | The provider that served the request, e.g. `anthropic` |
| `x-bifrost-routing-info-model`, `x-merge-model` | The model that served the request, without the provider, e.g. `claude-opus-4-6` |
| `x-litellm-response-duration-ms` | Milliseconds from receiving the request until the provider responded |
| `x-litellm-response-cost` | Same as `x-concentrate-cost`. Non-streaming only, like LiteLLM |

### When compatibility headers are sent

They are only added once a provider serves the request, so they aren't sent on error responses. They are also missing on responses whose headers were sent while Concentrate was still waiting on the provider: long-running non-streaming requests (see the note above) and [flex](/docs/api-reference/endpoint/service-tiers) streams that queue before connecting.
