Transparency headers

The five X-Flux-* response headers that tell you which model served your request, whether it was routed, the request id, and the cost in USD.

Every FluxRouter response carries X-Flux-* headers so you can see exactly what happened: which model answered, whether the router changed your requested model, a request id for support, and what the request cost. This page documents all five and how to read them.

What headers does FluxRouter return?

HeaderExample valueMeaning
X-Flux-Modelclaude-haikuThe model that actually served the request
X-Flux-Original-Modelflux-autoThe model id you requested
X-Flux-Routedtrue / falseWhether the router changed the model from what you requested
X-Flux-Request-Ida unique idIdentifier to quote when contacting support
X-Flux-Cost-Usd0.000412What this request cost, in USD (non-streaming responses only)

How do I read the headers?

Use curl with -i to print the response headers alongside the body:

bash
curl -i https://api.fluxrouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $FLUX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "flux-auto",
    "messages": [{ "role": "user", "content": "ping" }]
  }'
# Response headers include:
# X-Flux-Model: ...
# X-Flux-Original-Model: flux-auto
# X-Flux-Routed: true
# X-Flux-Request-Id: ...
# X-Flux-Cost-Usd: 0.000412

In an SDK, read them from the response's headers object. With the OpenAI Python SDK, for example, use response.with_raw_response or the raw response's .headers to inspect them.

What does X-Flux-Routed tell me?

X-Flux-Routed is true when Flux served a different model than the id you sent (for example, you sent flux-auto and Flux picked a concrete model). It is false when the model you requested is the one that served the request, which is what you expect when you pin a flux-pinned-* id. It is a quick way to confirm that pinning is doing what you want. See flux-auto vs pinning a model.

Why is X-Flux-Cost-Usd missing on streaming responses?

X-Flux-Cost-Usd is the cost of the request in USD. It is present on non-streaming responses. On streaming responses, the final cost is only known after the headers have already been flushed to you, so it cannot be placed in a header. For streaming requests, the cost is reported on your bill instead. The other four headers are present on streaming and non-streaming responses alike.

What should I do with the request id?

Keep X-Flux-Request-Id in your logs. When something looks wrong with a request, quoting this id lets support look up exactly what happened. It is the fastest path to a useful answer.