Completions usage object
The aggregated completions usage details of the specific time bucket.
The aggregated number of input tokens used. For customers subscribe to scale tier, this includes scale tier tokens.
The aggregated number of input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens.
The aggregated number of output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.
When group_by=project_id
, this field provides the project ID of the grouped usage result.
When group_by=user_id
, this field provides the user ID of the grouped usage result.
When group_by=api_key_id
, this field provides the API key ID of the grouped usage result.
When group_by=model
, this field provides the model name of the grouped usage result.
1
2
3
4
5
6
7
8
9
10
11
12
{
"object": "organization.usage.completions.result",
"input_tokens": 5000,
"output_tokens": 1000,
"input_cached_tokens": 4000,
"num_model_requests": 5,
"project_id": "proj_abc",
"user_id": "user-abc",
"api_key_id": "key_abc",
"model": "gpt-4o-mini-2024-07-18",
"batch": false
}