Conclusões
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 '{
"model": "text-davinci-edit-001",
"input": "What day of the wek is it?",
"instruction": "Fix the spelling mistakes"
}'
Response Response Example
{
"object": "edit",
"created": 1670702460,
"choices": [
{
"text": "What day of the week is it?\n",
"index": 0
}
],
"usage": {
"prompt_tokens": 25,
"completion_tokens": 28,
"total_tokens": 53
}
}
Request
Query Params
start_time
string
optional
Example:
1730419200
limit
string
optional
Example:
1
Header Params
Authorization
string
optional
Example:
Bearer $OPENAI_ADMIN_KEY
Content-Type
string
optional
Example:
application/json
Body Params application/json
Responses
Modified at 2025-01-26 06:30:20