Decisions
GET
/organization/usage/decisionsGet Decisions API usage details for the organization.
Query Parameters
batch: optional boolean or null
If true, return batch jobs only. If false, return non-batch jobs only. By default, return both.
limit: optional integer or null
Specifies the number of buckets to return.
bucket_width=1d: default: 7, max: 31bucket_width=1h: default: 24, max: 168bucket_width=1m: default: 60, max: 1440
Decisions
curl --get "https://api.openai.com/v1/organization/usage/decisions" \
-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
--data-urlencode "start_time=1790812800" \
--data-urlencode "end_time=1790899200" \
--data-urlencode "bucket_width=1d" \
--data-urlencode "group_by=project_id" \
--data-urlencode "group_by=model"
Response example
{
"object": "page",
"data": [
{
"object": "bucket",
"start_time": 1790812800,
"end_time": 1790899200,
"results": [
{
"object": "organization.usage.decisions.result",
"input_tokens": 1000,
"input_cached_tokens": 400,
"output_tokens": 0,
"num_model_requests": 5,
"project_id": "proj_example",
"model": "gpt-6-luna",
"user_id": null,
"api_key_id": null,
"batch": null,
"service_tier": null
}
]
}
],
"has_more": false,
"next_page": null
}
Returns Examples
Response example
{
"object": "page",
"data": [
{
"object": "bucket",
"start_time": 1790812800,
"end_time": 1790899200,
"results": [
{
"object": "organization.usage.decisions.result",
"input_tokens": 1000,
"input_cached_tokens": 400,
"output_tokens": 0,
"num_model_requests": 5,
"project_id": "proj_example",
"model": "gpt-6-luna",
"user_id": null,
"api_key_id": null,
"batch": null,
"service_tier": null
}
]
}
],
"has_more": false,
"next_page": null
}