As of version 2026-04, Glob.AI OS Chat API usage payload has evolved from a simple total-cost summary into a richer billing and token accounting format where:
- Usage Cost Version 1 (V1) returns you the overall request cost.
- Usage Cost Version 2 (V2) additionally also explains you the cost breakdown where detailed token categories are available.
V2 preserves the existing top-level cost fields for backward compatibility, while adding optional detail fields that show which token categories contribute to the final cost.
- Backward-compatible core fields remain:
- prompt_cost
- completion_cost
- total_cost
- Detailed cost data is now available under token_cost_details.
- Model family now determines response shape conventions:
- GPT models return an OpenAI-style usage shape.
- Claude models return an Anthropic-style usage model normalized into the same OpenAI-compatible response format.
- Token detail fields may include category-level data, such as cached token counts and cached token cost.
In V1, pricing configuration and usage responses focus only on general token categories, making easy to answer, for example:
"How much does this request cost?"
but not:
"Why did it cost that amount?"
Previously, model costs were configured using only basic token keys.
{
"key": "prompt_tokens",
"value": number
},
{
"key": "completion_tokens",
"value": number
},
{
"key": "total_tokens",
"value": number
}
The response exposed token counts and overall costs but did not provide category-level billing details.
{
"usage": {
"prompt_tokens": number,
"completion_tokens": integer,
"total_tokens": integer,
"currency": "string",
"prompt_cost": number,
"completion_cost": number,
"total_cost": number
}
}
V1 does not expose details such as:
- cache read cost
- cache creation cost
- cached token cost
V2 keeps the familiar top-level usage and cost fields, then adds optional nested structures for more detailed token accounting.
- completion_tokens_details can expose completion-side details such as reasoning_tokens.
- prompt_tokens_details can expose prompt-side details such as cached_tokens.
- token_cost_details contains cost-related details for specific token categories, such as cached_tokens_cost.
Implementation guidance: Treat the new detail objects as optional. You should continue to rely on top-level totals as the canonical backward-compatible fields, and only read nested detail fields when present.
GPT-family models return the OpenAI-style usage structure with added detail fields.
{
"usage": {
"completion_tokens": integer,
"prompt_tokens": integer,
"total_tokens": integer,
"currency": string,
"completion_cost": number,
"prompt_cost": number,
"total_cost": number,
"completion_tokens_details": {
"reasoning_tokens": integer
},
"prompt_tokens_details": {
"cached_tokens": integer
},
"token_cost_details": {
"cached_tokens_cost": number,
"cached_tokens": integer
}
}
}
Claude-family models preserve Anthropic-style detail semantics, but the response is normalized into the same OpenAI-compatible outer shape. This makes downstream handling more consistent across model providers.
{
"usage": {
"completion_tokens": integer,
"prompt_tokens": integer,
"total_tokens": integer,
"currency": string,
"completion_cost": number,
"prompt_cost": number,
"total_cost": number,
"completion_tokens_details": {
"reasoning_tokens": integer
},
"prompt_tokens_details": {
"cached_tokens": integer
},
"token_cost_details": {
"cached_tokens_cost": number,
"cached_tokens": integer
}
}
}
| Field |
Meaning |
Notes |
| prompt_tokens |
Total prompt-side tokens counted for the request |
Present in both V1 and V2 |
| completion_tokens |
Total output tokens generated |
Present in both V1 and V2 |
| total_tokens |
Combined prompt and completion tokens |
Present in both V1 and V2 |
| prompt_cost |
Total billed prompt-side cost |
Backward-compatible top-level field |
| completion_cost |
Total billed completion-side cost |
Backward-compatible top-level field |
| total_cost |
Total billed request cost |
Main field for billing summaries |
| completion_tokens_details.reasoning_tokens |
Subset of completion tokens used for reasoning |
Optional detail field |
| prompt_tokens_details.cached_tokens |
Subset of prompt tokens served from cache |
Optional detail field |
| token_cost_details.cached_tokens_cost |
Cost attributed to cached tokens |
Optional detailed billing field |
| token_cost_details.cached_tokens |
Detailed token count tied to the billed cached category |
Useful for audits and billing analysis |
{
"prompt_cost": number,
"completion_cost": number,
"total_cost": number
}
{
"prompt_cost": number,
"completion_cost": number,
"total_cost": number,
"token_cost_details": {
"cached_tokens_cost": number,
"cached_tokens": integer
}
}
Since version 2026-04