Applied AI·The API layer
you read the usage block in the response rather than estimating, because that is the only honest number for what the call cost.
Completion / response object
Also calledresponse object
Draft summary, pending review
The JSON the API returns: generated content, a stop reason, token usage counts and metadata. Always read the usage block; it is your ground truth for cost.