Core Concepts
Response Normalization
Every provider speaks a different dialect. One response shape comes back.
Providers disagree on response schemas — different field names, different token accounting, different error formats. Normalization maps them all onto one documented shape before anything reaches your code.
The normalized shape
{
"id": "chatcmpl_01J8R2aKq...",
"object": "chat.completion",
"created": 1758432000,
"model": "claude",
"provider": "anthropic",
"choices": [
{
"index": 0,
"message": { "role": "assistant", "content": "Here is the summary." },
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 41,
"completion_tokens": 23,
"total_tokens": 64
}
}Field mapping
| Providers call it | OpenLink calls it |
|---|---|
| content blocks / text array | choices[0].message.content (string) |
| output_tokens | usage.completion_tokens |
| input_tokens | usage.prompt_tokens |
| stop_reason | choices[0].finish_reason |
Where providers use arrays where we use strings, the first entry wins for content; the rest are dropped during normalization.
Cost is not in the response
Where cost lives
Token counts are returned, but per-request cost is reported in the dashboard and webhook events — not embedded in the response body.