Completions
GET
https://api.openai.com/v1/organization/usage/completions
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.openai.com/v1/organization/usage/completions?start_time=1730419200&limit=1' \
--header 'Authorization: Bearer $OPENAI_ADMIN_KEY' \
--header 'Content-Type: application/json' \
--data-raw ''
Response Response Example
{
"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="
}
Request
Query Params
start_time
stringΒ
required
Example:
1730419200
limit
stringΒ
required
Example:
1
Header Params
Authorization
stringΒ
required
Example:
Bearer $OPENAI_ADMIN_KEY
Content-Type
stringΒ
required
Example:
application/json
Responses
Modified atΒ 2024-12-12 07:23:35