1. The wellspring block (exact)
A vendor-extension object on the response body, sibling of usage:
- Exact post-request accounting, for streams and non-streams alike.
On streams it arrives as the final data frame before
data: [DONE]. request_pct— how much of the pool this request consumed. Only present when your plan surfaces it.- Best-effort: if receipt generation fails internally the block is omitted; the completion itself is never broken by it.
2. Response headers (estimate on streams)
On non-streaming requests these are exact. On streaming requests
they are reservation-time estimates (headers leave before the model has
generated anything) — read the
wellspring block for the real figures.
Percentages only, everywhere. Raw weighted-token numbers are never
exposed, so don’t try to reverse-engineer pool sizes from these values —
pace against
remaining_pct and resets_at instead.Browser caveat
These custom headers are not exposed to cross-origin browser JavaScript (noAccess-Control-Expose-Headers today). If your client
runs in a browser, use the wellspring body block — it’s in the response
body and always readable.
Two request IDs
Don’t confuse the two identifying headers:x-request-id— the request-log ID, tied to quota accounting (chat and embeddings responses).x-sq1-request-id— the correlation ID, present on every response of every endpoint. Use this one when reporting issues.