Response metadata
Identify generation requests and read usage and billing details from x_outerlane.
Generation responses include a request ID, token counts, and cost. Use the response to record usage without making a separate API call.
Response headers
| Header | Description |
|---|---|
x-outerlane-request-id | Unique request ID (req_...). Use it to look up a request in Request logs or when contacting support. |
retry-after | Seconds until the 7-day cap resets on a 429 weekly_limit response |
x_outerlane field
{
"request_id": "req_a1b2c3d4e5f6a1b2c3d4e5f6",
"input": 120,
"cached": 80,
"output": 45,
"costUsd": 0.000349,
"chargedUsd": 0,
"model": "openai/gpt-6.1-sol",
"requested_model": "route/production-chat",
"cache_hit": false,
"route_attempts": [
{ "model": "openai/gpt-6.1-sol", "status": 200, "code": null, "durationMs": 421 }
],
"reasoning_effort": "medium"
}request_idstring
The same request ID as the
x-outerlane-request-id headerinputinteger
Number of input tokens excluding cache hits
cachedinteger
Number of cached input tokens, billed at the lower cache rate.
outputinteger
Number of output tokens, including reasoning tokens.
costUsdnumber
Request cost in USD at outerlane rates.
chargedUsdnumber
The portion of
costUsd deducted from prepaid credits, in USD. It is 0 for a request covered by the plan allowance or served from the exact response cache.modelstring
The catalog model that produced the response. This can differ from the requested route or fallback primary model.
requested_modelstring | null
The model or custom route ID sent by the client.
cache_hitboolean
Whether the response came from the exact response cache. Cache hits cost
0.route_attemptsarray | null
Ordered routing attempts with public model IDs, statuses, error codes (
cache_hit for a cache hit), and durations. Internal upstream provider details are not included.reasoning_effortstring | null
The reasoning effort applied to the request, or
null if unused. Omitted for image generation.Where to find it
| Endpoint | Where to find it |
|---|---|
| Chat Completions | Response body, or the final streaming chunk containing finish_reason |
| Responses | Response body, or response in the response.completed streaming event |
| Anthropic Messages | Response body. For streaming requests, see Request logs for cost. |
| Image generation | Response body |