Get Decisions API usage details for the organization.

get/organization/usage/decisions

Request

  • Base URL
    https://api.openai.com/v1
  • URL
    https://api.openai.com/v1/organization/usage/decisions
  • Auth
    HTTP bearer

Query parameters

start_timeinteger required

Start time (Unix seconds) of the query time range, inclusive.

end_timeinteger nullable

End time (Unix seconds) of the query time range, exclusive.

bucket_width'1m' | '1h' | '1d'

Width of each time bucket in response. Currently 1m, 1h and 1d are supported, default to 1d.

limitinteger nullable

Specifies the number of buckets to return.

  • bucket_width=1d: default: 7, max: 31
  • bucket_width=1h: default: 24, max: 168
  • bucket_width=1m: default: 60, max: 1440
pagestring nullable

A cursor for use in pagination. Corresponding to the next_page field from the previous response.

project_idsstring[] nullable

Return only usage for these projects.

group_byDecisionsUsageGroupBy[] nullable

Group the usage data by the specified fields. Support fields include project_id, user_id, api_key_id, model, batch, service_tier, api_source or any combination of them. When grouped by api_source, results use agents_api for attributed Agents API activity and unlabeled for all other activity. Without source grouping, api_source is null.

user_idsstring[] nullable

Return only usage for these users.

api_key_idsstring[] nullable

Return only usage for these API keys.

modelsstring[] nullable

Return only usage for these models.

batchboolean nullable

If true, return batch jobs only. If false, return non-batch jobs only. By default, return both.

Response

Success

object'page' required
has_moreboolean required
next_pagestring nullable required

Changes