curl --location --request GET 'https://api.openai.com/v1/organization/usage/completions?start_time=&limit=&api_key_ids&batch&bucket_width=1d&end_time&group_by&models&page&project_ids&user_ids' \
--header 'Authorization: Bearer <token>'
{
"object": "page",
"data": [
{
"object": "bucket",
"start_time": 1730419200,
"end_time": 1730505600,
"results": [
{
"object": "organization.usage.completions.result",
"input_tokens": 1000,
"output_tokens": 500,
"input_cached_tokens": 800,
"num_model_requests": 5,
"project_id": null,
"user_id": null,
"api_key_id": null,
"model": null,
"batch": null
}
]
}
],
"has_more": true,
"next_page": "AAAAAGdGxdEiJdKOAAAAAGcqsYA="
}