Key Info

LiteLLM now exposes the exact cost of a Responses API call directly in the response body via the usage.cost field, so applications can read spend without parsing headers or querying logs.

Highlights

  • Send a non-streaming request to /v1/responses through LiteLLM.
  • Read usage.cost from the response body to get exact spend.
  • The value matches the x-litellm-response-cost header and spend logs.
  • Implemented in a merged PR; details available in the linked PR.