gpt-5-codex not reported by api.openai.com/v1/organization/usage/completions

Resolved 💬 3 comments Opened Sep 29, 2025 by rmilkowski Closed Oct 6, 2025

What version of Codex is running?

latest

Which model were you using?

gpt-5-codex

What platform is your computer?

_No response_

What steps can reproduce the bug?

The REST API https://api.openai.com/v1/organization/usage/completions does not return any usage information when API key is used and model is gpt-5-codex. It does work with the standard gpt-5 model, but not with the codex variant.

Similar issue with https://platform.openai.com/usage/chat-completions - gpt-5 is reported, but not gpt-5-codex.

The gpt-5-codex is included in https://platform.openai.com/usage -> Spend categories, but this endpoint doesn't allow for per-user or per-key breakdown.

Looks like gpt-5-codex reporting is broken both in the REST API and the BUI dashboard.

What is the expected behavior?

_No response_

What do you see instead?

_No response_

Additional information

_No response_

View original on GitHub ↗

3 Comments

gh640 · 11 months ago

GPT-5-Codex is available only in the Responses API.

<img width="1170" height="1071" alt="Image" src="https://github.com/user-attachments/assets/2ad2f5ff-65f9-4651-bb3f-eb85f083e8ea" />

rmilkowski · 11 months ago

How can I get similar usage data to https://api.openai.com/v1/organization/usage/completions for gpt-5-codex then?
There doesn't seem to be https://api.openai.com/v1/organization/usage/responses endpoint.

The https://api.openai.com/v1/organization/usage/completions returns:
...
{
"object": "organization.usage.completions.result",
"project_id": "XXX",
"num_model_requests": 76,
"user_id": "XXX",
"api_key_id": "XXX",
"model": "gpt-5-2025-08-07",
"batch": false,
"service_tier": null,
"input_tokens": 2634523,
"output_tokens": 30742,
"input_cached_tokens": 2402432,
"input_uncached_tokens": 232091,
"input_text_tokens": 232091,
"output_text_tokens": 30742,
"input_cached_text_tokens": 2402432,
"input_audio_tokens": 0,
"input_cached_audio_tokens": 0,
"output_audio_tokens": 0,
"input_image_tokens": 0,
"input_cached_image_tokens": 0,
"output_image_tokens": 0
},
...

rmilkowski · 10 months ago

The endpoint now returns gpt-5-codex usage as well. This issue can be closed.