Read the response
Find the model’s answer in a response, see which model and provider served it, and read what the request cost.
A chat completion returns a JSON object. Top-level fields identify the request and what served it, choices holds the model’s reply, and usage reports token counts and cost. choices is always an array, even though a request returns one reply, so read the reply from choices[0].
The fields you’ll use most as you wire this into your code:
choices[0].finish_reason:stopmeans the model finished on its own;lengthmeans it hit a token limit (max_tokens) and the reply was cut off. The finish reason docs list every value, includingtool_calls,content_filter, anderror.modelandprovider: Even when you request a router or alias likeopenrouter/free, the response names the exact model slug (google/gemma-4-31b-it:free) and provider that served it.usage.cost: The amount charged in OpenRouter credits (0for free models).id: Keep this in your logs so you can look up the request on your activity page or share it with support.
Check your understanding
Question 1 of 2A customer asks for the return policy and the reply stops mid-sentence. The status is 200. Which field tells you what happened?
Apply it
You asked for one model, and the response’s model field shows exactly that model, but the provider field changes from one request to the next. Is something wrong?
Probably not. Many models are offered by several providers, and OpenRouter routes each request to one of them, falling back to another if one is unavailable. The model is the same; the company running it can differ. If you need to control which providers serve your requests, the provider selection docs explain how.
Takeaway
The answer is in choices[0].message.content, why it stopped is in finish_reason, what ran is in model and provider, and what it cost is in usage.cost. Log the id.
Try it live
OptionalSend a message in OpenRouter chat and open the message details. You’ll see the same model, provider, and cost fields.