Skip to main content

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

x-request-id and x-trace-id are also returned on error responses.
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.

Compatibility Headers

To get another gateway’s response headers, send x-concentrate-compat-headers with a comma-separated list of gateway names:
Names are case-insensitive, spaces around them are ignored, and unknown names are skipped. Without the header, none of these are sent.

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.

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 streams that queue before connecting.
Last modified on October 9, 2026