Skip to content
Primary navigation

Admin

AdminOrganization

AdminOrganizationAudit Logs

List user actions and configuration changes within this organization.

List audit logs
GET/organization/audit_logs
ModelsExpand Collapse
AuditLogListResponse object { id, actor, effective_at, 49 more }

A log of a user action or configuration change within this organization.

id: string

The ID of this log.

actor: object { api_key, session, type }

The actor who performed the audit logged action.

api_key: optional object { id, service_account, type, user }

The API Key used to perform the audit logged action.

id: optional string

The tracking id of the API key.

service_account: optional object { id }

The service account that performed the audit logged action.

id: optional string

The service account id.

type: optional "user" or "service_account"

The type of API key. Can be either user or service_account.

One of the following:
"user"
"service_account"
user: optional object { id, email }

The user who performed the audit logged action.

id: optional string

The user id.

email: optional string

The user email.

session: optional object { ip_address, user }

The session in which the audit logged action was performed.

ip_address: optional string

The IP address from which the action was performed.

user: optional object { id, email }

The user who performed the audit logged action.

id: optional string

The user id.

email: optional string

The user email.

type: optional "session" or "api_key"

The type of actor. Is either session or api_key.

One of the following:
"session"
"api_key"
effective_at: number

The Unix timestamp (in seconds) of the event.

type: "api_key.created" or "api_key.updated" or "api_key.deleted" or 48 more

The event type.

One of the following:
"api_key.created"
"api_key.updated"
"api_key.deleted"
"certificate.created"
"certificate.updated"
"certificate.deleted"
"certificates.activated"
"certificates.deactivated"
"checkpoint.permission.created"
"checkpoint.permission.deleted"
"external_key.registered"
"external_key.removed"
"group.created"
"group.updated"
"group.deleted"
"invite.sent"
"invite.accepted"
"invite.deleted"
"ip_allowlist.created"
"ip_allowlist.updated"
"ip_allowlist.deleted"
"ip_allowlist.config.activated"
"ip_allowlist.config.deactivated"
"login.succeeded"
"login.failed"
"logout.succeeded"
"logout.failed"
"organization.updated"
"project.created"
"project.updated"
"project.archived"
"project.deleted"
"rate_limit.updated"
"rate_limit.deleted"
"resource.deleted"
"tunnel.created"
"tunnel.updated"
"tunnel.deleted"
"role.created"
"role.updated"
"role.deleted"
"role.assignment.created"
"role.assignment.deleted"
"scim.enabled"
"scim.disabled"
"service_account.created"
"service_account.updated"
"service_account.deleted"
"user.added"
"user.updated"
"user.deleted"
"api_key.created": optional object { id, data }

The details for events with this type.

id: optional string

The tracking ID of the API key.

data: optional object { scopes }

The payload used to create the API key.

scopes: optional array of string

A list of scopes allowed for the API key, e.g. ["api.model.request"]

"api_key.deleted": optional object { id }

The details for events with this type.

id: optional string

The tracking ID of the API key.

"api_key.updated": optional object { id, changes_requested }

The details for events with this type.

id: optional string

The tracking ID of the API key.

changes_requested: optional object { scopes }

The payload used to update the API key.

scopes: optional array of string

A list of scopes allowed for the API key, e.g. ["api.model.request"]

"certificate.created": optional object { id, name }

The details for events with this type.

id: optional string

The certificate ID.

name: optional string

The name of the certificate.

"certificate.deleted": optional object { id, certificate, name }

The details for events with this type.

id: optional string

The certificate ID.

certificate: optional string

The certificate content in PEM format.

name: optional string

The name of the certificate.

"certificate.updated": optional object { id, name }

The details for events with this type.

id: optional string

The certificate ID.

name: optional string

The name of the certificate.

"certificates.activated": optional object { certificates }

The details for events with this type.

certificates: optional array of object { id, name }
id: optional string

The certificate ID.

name: optional string

The name of the certificate.

"certificates.deactivated": optional object { certificates }

The details for events with this type.

certificates: optional array of object { id, name }
id: optional string

The certificate ID.

name: optional string

The name of the certificate.

"checkpoint.permission.created": optional object { id, data }

The project and fine-tuned model checkpoint that the checkpoint permission was created for.

id: optional string

The ID of the checkpoint permission.

data: optional object { fine_tuned_model_checkpoint, project_id }

The payload used to create the checkpoint permission.

fine_tuned_model_checkpoint: optional string

The ID of the fine-tuned model checkpoint.

project_id: optional string

The ID of the project that the checkpoint permission was created for.

"checkpoint.permission.deleted": optional object { id }

The details for events with this type.

id: optional string

The ID of the checkpoint permission.

"external_key.registered": optional object { id, data }

The details for events with this type.

id: optional string

The ID of the external key configuration.

data: optional unknown

The configuration for the external key.

"external_key.removed": optional object { id }

The details for events with this type.

id: optional string

The ID of the external key configuration.

"group.created": optional object { id, data }

The details for events with this type.

id: optional string

The ID of the group.

data: optional object { group_name }

Information about the created group.

group_name: optional string

The group name.

"group.deleted": optional object { id }

The details for events with this type.

id: optional string

The ID of the group.

"group.updated": optional object { id, changes_requested }

The details for events with this type.

id: optional string

The ID of the group.

changes_requested: optional object { group_name }

The payload used to update the group.

group_name: optional string

The updated group name.

"invite.accepted": optional object { id }

The details for events with this type.

id: optional string

The ID of the invite.

"invite.deleted": optional object { id }

The details for events with this type.

id: optional string

The ID of the invite.

"invite.sent": optional object { id, data }

The details for events with this type.

id: optional string

The ID of the invite.

data: optional object { email, role }

The payload used to create the invite.

email: optional string

The email invited to the organization.

role: optional string

The role the email was invited to be. Is either owner or member.

"ip_allowlist.config.activated": optional object { configs }

The details for events with this type.

configs: optional array of object { id, name }

The configurations that were activated.

id: optional string

The ID of the IP allowlist configuration.

name: optional string

The name of the IP allowlist configuration.

"ip_allowlist.config.deactivated": optional object { configs }

The details for events with this type.

configs: optional array of object { id, name }

The configurations that were deactivated.

id: optional string

The ID of the IP allowlist configuration.

name: optional string

The name of the IP allowlist configuration.

"ip_allowlist.created": optional object { id, allowed_ips, name }

The details for events with this type.

id: optional string

The ID of the IP allowlist configuration.

allowed_ips: optional array of string

The IP addresses or CIDR ranges included in the configuration.

name: optional string

The name of the IP allowlist configuration.

"ip_allowlist.deleted": optional object { id, allowed_ips, name }

The details for events with this type.

id: optional string

The ID of the IP allowlist configuration.

allowed_ips: optional array of string

The IP addresses or CIDR ranges that were in the configuration.

name: optional string

The name of the IP allowlist configuration.

"ip_allowlist.updated": optional object { id, allowed_ips }

The details for events with this type.

id: optional string

The ID of the IP allowlist configuration.

allowed_ips: optional array of string

The updated set of IP addresses or CIDR ranges in the configuration.

"login.failed": optional object { error_code, error_message }

The details for events with this type.

error_code: optional string

The error code of the failure.

error_message: optional string

The error message of the failure.

"login.succeeded": optional unknown

This event has no additional fields beyond the standard audit log attributes.

"logout.failed": optional object { error_code, error_message }

The details for events with this type.

error_code: optional string

The error code of the failure.

error_message: optional string

The error message of the failure.

"logout.succeeded": optional unknown

This event has no additional fields beyond the standard audit log attributes.

"organization.updated": optional object { id, changes_requested }

The details for events with this type.

id: optional string

The organization ID.

changes_requested: optional object { api_call_logging, api_call_logging_project_ids, description, 4 more }

The payload used to update the organization settings.

api_call_logging: optional string

How your organization logs data from supported API calls. One of disabled, enabled_per_call, enabled_for_all_projects, or enabled_for_selected_projects

api_call_logging_project_ids: optional string

The list of project ids if api_call_logging is set to enabled_for_selected_projects

description: optional string

The organization description.

name: optional string

The organization name.

threads_ui_visibility: optional string

Visibility of the threads page which shows messages created with the Assistants API and Playground. One of ANY_ROLE, OWNERS, or NONE.

title: optional string

The organization title.

usage_dashboard_visibility: optional string

Visibility of the usage dashboard which shows activity and costs for your organization. One of ANY_ROLE or OWNERS.

project: optional object { id, name }

The project that the action was scoped to. Absent for actions not scoped to projects. Note that any admin actions taken via Admin API keys are associated with the default project.

id: optional string

The project ID.

name: optional string

The project title.

"project.archived": optional object { id }

The details for events with this type.

id: optional string

The project ID.

"project.created": optional object { id, data }

The details for events with this type.

id: optional string

The project ID.

data: optional object { name, title }

The payload used to create the project.

name: optional string

The project name.

title: optional string

The title of the project as seen on the dashboard.

"project.deleted": optional object { id }

The details for events with this type.

id: optional string

The project ID.

"project.updated": optional object { id, changes_requested }

The details for events with this type.

id: optional string

The project ID.

changes_requested: optional object { title }

The payload used to update the project.

title: optional string

The title of the project as seen on the dashboard.

"rate_limit.deleted": optional object { id }

The details for events with this type.

id: optional string

The rate limit ID

"rate_limit.updated": optional object { id, changes_requested }

The details for events with this type.

id: optional string

The rate limit ID

changes_requested: optional object { batch_1_day_max_input_tokens, max_audio_megabytes_per_1_minute, max_images_per_1_minute, 3 more }

The payload used to update the rate limits.

batch_1_day_max_input_tokens: optional number

The maximum batch input tokens per day. Only relevant for certain models.

max_audio_megabytes_per_1_minute: optional number

The maximum audio megabytes per minute. Only relevant for certain models.

max_images_per_1_minute: optional number

The maximum images per minute. Only relevant for certain models.

max_requests_per_1_day: optional number

The maximum requests per day. Only relevant for certain models.

max_requests_per_1_minute: optional number

The maximum requests per minute.

max_tokens_per_1_minute: optional number

The maximum tokens per minute.

"role.assignment.created": optional object { id, principal_id, principal_type, 2 more }

The details for events with this type.

id: optional string

The identifier of the role assignment.

principal_id: optional string

The principal (user or group) that received the role.

principal_type: optional string

The type of principal (user or group) that received the role.

resource_id: optional string

The resource the role assignment is scoped to.

resource_type: optional string

The type of resource the role assignment is scoped to.

"role.assignment.deleted": optional object { id, principal_id, principal_type, 2 more }

The details for events with this type.

id: optional string

The identifier of the role assignment.

principal_id: optional string

The principal (user or group) that had the role removed.

principal_type: optional string

The type of principal (user or group) that had the role removed.

resource_id: optional string

The resource the role assignment was scoped to.

resource_type: optional string

The type of resource the role assignment was scoped to.

"role.created": optional object { id, permissions, resource_id, 2 more }

The details for events with this type.

id: optional string

The role ID.

permissions: optional array of string

The permissions granted by the role.

resource_id: optional string

The resource the role is scoped to.

resource_type: optional string

The type of resource the role belongs to.

role_name: optional string

The name of the role.

"role.deleted": optional object { id }

The details for events with this type.

id: optional string

The role ID.

"role.updated": optional object { id, changes_requested }

The details for events with this type.

id: optional string

The role ID.

changes_requested: optional object { description, metadata, permissions_added, 4 more }

The payload used to update the role.

description: optional string

The updated role description, when provided.

metadata: optional unknown

Additional metadata stored on the role.

permissions_added: optional array of string

The permissions added to the role.

permissions_removed: optional array of string

The permissions removed from the role.

resource_id: optional string

The resource the role is scoped to.

resource_type: optional string

The type of resource the role belongs to.

role_name: optional string

The updated role name, when provided.

"scim.disabled": optional object { id }

The details for events with this type.

id: optional string

The ID of the SCIM was disabled for.

"scim.enabled": optional object { id }

The details for events with this type.

id: optional string

The ID of the SCIM was enabled for.

"service_account.created": optional object { id, data }

The details for events with this type.

id: optional string

The service account ID.

data: optional object { role }

The payload used to create the service account.

role: optional string

The role of the service account. Is either owner or member.

"service_account.deleted": optional object { id }

The details for events with this type.

id: optional string

The service account ID.

"service_account.updated": optional object { id, changes_requested }

The details for events with this type.

id: optional string

The service account ID.

changes_requested: optional object { role }

The payload used to updated the service account.

role: optional string

The role of the service account. Is either owner or member.

"user.added": optional object { id, data }

The details for events with this type.

id: optional string

The user ID.

data: optional object { role }

The payload used to add the user to the project.

role: optional string

The role of the user. Is either owner or member.

"user.deleted": optional object { id }

The details for events with this type.

id: optional string

The user ID.

"user.updated": optional object { id, changes_requested }

The details for events with this type.

id: optional string

The project ID.

changes_requested: optional object { role }

The payload used to update the user.

role: optional string

The role of the user. Is either owner or member.

AdminOrganizationAdmin API Keys

List all organization and project API keys.
GET/organization/admin_api_keys
Create admin API key
POST/organization/admin_api_keys
Retrieve admin API key
GET/organization/admin_api_keys/{key_id}
Delete admin API key
DELETE/organization/admin_api_keys/{key_id}
ModelsExpand Collapse
AdminAPIKey object { id, created_at, last_used_at, 5 more }

Represents an individual Admin API key in an org.

id: string

The identifier, which can be referenced in API endpoints

created_at: number

The Unix timestamp (in seconds) of when the API key was created

formatint64
last_used_at: number

The Unix timestamp (in seconds) of when the API key was last used

formatint64
name: string

The name of the API key

object: string

The object type, which is always organization.admin_api_key

owner: object { id, created_at, name, 3 more }
id: optional string

The identifier, which can be referenced in API endpoints

created_at: optional number

The Unix timestamp (in seconds) of when the user was created

formatint64
name: optional string

The name of the user

object: optional string

The object type, which is always organization.user

role: optional string

Always owner

type: optional string

Always user

redacted_value: string

The redacted value of the API key

value: optional string

The value of the API key. Only shown on create.

AdminAPIKeyDeleteResponse object { id, deleted, object }
id: optional string
deleted: optional boolean
object: optional string

AdminOrganizationUsage

Audio speeches
GET/organization/usage/audio_speeches
Audio transcriptions
GET/organization/usage/audio_transcriptions
Code interpreter sessions
GET/organization/usage/code_interpreter_sessions
Completions
GET/organization/usage/completions
Embeddings
GET/organization/usage/embeddings
Images
GET/organization/usage/images
Moderations
GET/organization/usage/moderations
Vector stores
GET/organization/usage/vector_stores
Costs
GET/organization/costs
ModelsExpand Collapse
UsageAudioSpeechesResponse object { data, has_more, next_page, object }
data: array of object { end_time, object, result, start_time }
end_time: number
object: "bucket"
result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more
One of the following:
UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: number

The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.completions.result"
output_tokens: number

The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.

api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

batch: optional boolean

When group_by=batch, this field tells whether the grouped usage result is batch or not.

input_audio_tokens: optional number

The aggregated number of audio input tokens used, including cached tokens.

input_cached_tokens: optional number

The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

output_audio_tokens: optional number

The aggregated number of audio output tokens used.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

service_tier: optional string

When group_by=service_tier, this field provides the service tier of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.embeddings.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.moderations.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageImagesResult object { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: number

The number of images processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.images.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

size: optional string

When group_by=size, this field provides the image size of the grouped usage result.

source: optional string

When group_by=source, this field provides the source of the grouped usage result, possible values are image.generation, image.edit, image.variation.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }

The aggregated audio speeches usage details of the specific time bucket.

characters: number

The number of characters processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_speeches.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }

The aggregated audio transcriptions usage details of the specific time bucket.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_transcriptions.result"
seconds: number

The number of seconds processed.

api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageVectorStoresResult object { object, usage_bytes, project_id }

The aggregated vector stores usage details of the specific time bucket.

object: "organization.usage.vector_stores.result"
usage_bytes: number

The vector stores usage in bytes.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }

The aggregated code interpreter sessions usage details of the specific time bucket.

object: "organization.usage.code_interpreter_sessions.result"
num_sessions: optional number

The number of code interpreter sessions.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

CostsResult object { object, amount, line_item, project_id }

The aggregated costs details of the specific time bucket.

object: "organization.costs.result"
amount: optional object { currency, value }

The monetary value in its associated currency.

currency: optional string

Lowercase ISO-4217 currency e.g. “usd”

value: optional number

The numeric value of the cost.

line_item: optional string

When group_by=line_item, this field provides the line item of the grouped costs result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped costs result.

start_time: number
has_more: boolean
next_page: string
object: "page"
UsageAudioTranscriptionsResponse object { data, has_more, next_page, object }
data: array of object { end_time, object, result, start_time }
end_time: number
object: "bucket"
result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more
One of the following:
UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: number

The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.completions.result"
output_tokens: number

The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.

api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

batch: optional boolean

When group_by=batch, this field tells whether the grouped usage result is batch or not.

input_audio_tokens: optional number

The aggregated number of audio input tokens used, including cached tokens.

input_cached_tokens: optional number

The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

output_audio_tokens: optional number

The aggregated number of audio output tokens used.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

service_tier: optional string

When group_by=service_tier, this field provides the service tier of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.embeddings.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.moderations.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageImagesResult object { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: number

The number of images processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.images.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

size: optional string

When group_by=size, this field provides the image size of the grouped usage result.

source: optional string

When group_by=source, this field provides the source of the grouped usage result, possible values are image.generation, image.edit, image.variation.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }

The aggregated audio speeches usage details of the specific time bucket.

characters: number

The number of characters processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_speeches.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }

The aggregated audio transcriptions usage details of the specific time bucket.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_transcriptions.result"
seconds: number

The number of seconds processed.

api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageVectorStoresResult object { object, usage_bytes, project_id }

The aggregated vector stores usage details of the specific time bucket.

object: "organization.usage.vector_stores.result"
usage_bytes: number

The vector stores usage in bytes.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }

The aggregated code interpreter sessions usage details of the specific time bucket.

object: "organization.usage.code_interpreter_sessions.result"
num_sessions: optional number

The number of code interpreter sessions.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

CostsResult object { object, amount, line_item, project_id }

The aggregated costs details of the specific time bucket.

object: "organization.costs.result"
amount: optional object { currency, value }

The monetary value in its associated currency.

currency: optional string

Lowercase ISO-4217 currency e.g. “usd”

value: optional number

The numeric value of the cost.

line_item: optional string

When group_by=line_item, this field provides the line item of the grouped costs result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped costs result.

start_time: number
has_more: boolean
next_page: string
object: "page"
UsageCodeInterpreterSessionsResponse object { data, has_more, next_page, object }
data: array of object { end_time, object, result, start_time }
end_time: number
object: "bucket"
result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more
One of the following:
UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: number

The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.completions.result"
output_tokens: number

The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.

api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

batch: optional boolean

When group_by=batch, this field tells whether the grouped usage result is batch or not.

input_audio_tokens: optional number

The aggregated number of audio input tokens used, including cached tokens.

input_cached_tokens: optional number

The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

output_audio_tokens: optional number

The aggregated number of audio output tokens used.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

service_tier: optional string

When group_by=service_tier, this field provides the service tier of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.embeddings.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.moderations.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageImagesResult object { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: number

The number of images processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.images.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

size: optional string

When group_by=size, this field provides the image size of the grouped usage result.

source: optional string

When group_by=source, this field provides the source of the grouped usage result, possible values are image.generation, image.edit, image.variation.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }

The aggregated audio speeches usage details of the specific time bucket.

characters: number

The number of characters processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_speeches.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }

The aggregated audio transcriptions usage details of the specific time bucket.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_transcriptions.result"
seconds: number

The number of seconds processed.

api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageVectorStoresResult object { object, usage_bytes, project_id }

The aggregated vector stores usage details of the specific time bucket.

object: "organization.usage.vector_stores.result"
usage_bytes: number

The vector stores usage in bytes.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }

The aggregated code interpreter sessions usage details of the specific time bucket.

object: "organization.usage.code_interpreter_sessions.result"
num_sessions: optional number

The number of code interpreter sessions.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

CostsResult object { object, amount, line_item, project_id }

The aggregated costs details of the specific time bucket.

object: "organization.costs.result"
amount: optional object { currency, value }

The monetary value in its associated currency.

currency: optional string

Lowercase ISO-4217 currency e.g. “usd”

value: optional number

The numeric value of the cost.

line_item: optional string

When group_by=line_item, this field provides the line item of the grouped costs result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped costs result.

start_time: number
has_more: boolean
next_page: string
object: "page"
UsageCompletionsResponse object { data, has_more, next_page, object }
data: array of object { end_time, object, result, start_time }
end_time: number
object: "bucket"
result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more
One of the following:
UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: number

The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.completions.result"
output_tokens: number

The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.

api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

batch: optional boolean

When group_by=batch, this field tells whether the grouped usage result is batch or not.

input_audio_tokens: optional number

The aggregated number of audio input tokens used, including cached tokens.

input_cached_tokens: optional number

The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

output_audio_tokens: optional number

The aggregated number of audio output tokens used.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

service_tier: optional string

When group_by=service_tier, this field provides the service tier of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.embeddings.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.moderations.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageImagesResult object { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: number

The number of images processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.images.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

size: optional string

When group_by=size, this field provides the image size of the grouped usage result.

source: optional string

When group_by=source, this field provides the source of the grouped usage result, possible values are image.generation, image.edit, image.variation.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }

The aggregated audio speeches usage details of the specific time bucket.

characters: number

The number of characters processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_speeches.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }

The aggregated audio transcriptions usage details of the specific time bucket.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_transcriptions.result"
seconds: number

The number of seconds processed.

api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageVectorStoresResult object { object, usage_bytes, project_id }

The aggregated vector stores usage details of the specific time bucket.

object: "organization.usage.vector_stores.result"
usage_bytes: number

The vector stores usage in bytes.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }

The aggregated code interpreter sessions usage details of the specific time bucket.

object: "organization.usage.code_interpreter_sessions.result"
num_sessions: optional number

The number of code interpreter sessions.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

CostsResult object { object, amount, line_item, project_id }

The aggregated costs details of the specific time bucket.

object: "organization.costs.result"
amount: optional object { currency, value }

The monetary value in its associated currency.

currency: optional string

Lowercase ISO-4217 currency e.g. “usd”

value: optional number

The numeric value of the cost.

line_item: optional string

When group_by=line_item, this field provides the line item of the grouped costs result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped costs result.

start_time: number
has_more: boolean
next_page: string
object: "page"
UsageEmbeddingsResponse object { data, has_more, next_page, object }
data: array of object { end_time, object, result, start_time }
end_time: number
object: "bucket"
result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more
One of the following:
UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: number

The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.completions.result"
output_tokens: number

The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.

api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

batch: optional boolean

When group_by=batch, this field tells whether the grouped usage result is batch or not.

input_audio_tokens: optional number

The aggregated number of audio input tokens used, including cached tokens.

input_cached_tokens: optional number

The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

output_audio_tokens: optional number

The aggregated number of audio output tokens used.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

service_tier: optional string

When group_by=service_tier, this field provides the service tier of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.embeddings.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.moderations.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageImagesResult object { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: number

The number of images processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.images.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

size: optional string

When group_by=size, this field provides the image size of the grouped usage result.

source: optional string

When group_by=source, this field provides the source of the grouped usage result, possible values are image.generation, image.edit, image.variation.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }

The aggregated audio speeches usage details of the specific time bucket.

characters: number

The number of characters processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_speeches.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }

The aggregated audio transcriptions usage details of the specific time bucket.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_transcriptions.result"
seconds: number

The number of seconds processed.

api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageVectorStoresResult object { object, usage_bytes, project_id }

The aggregated vector stores usage details of the specific time bucket.

object: "organization.usage.vector_stores.result"
usage_bytes: number

The vector stores usage in bytes.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }

The aggregated code interpreter sessions usage details of the specific time bucket.

object: "organization.usage.code_interpreter_sessions.result"
num_sessions: optional number

The number of code interpreter sessions.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

CostsResult object { object, amount, line_item, project_id }

The aggregated costs details of the specific time bucket.

object: "organization.costs.result"
amount: optional object { currency, value }

The monetary value in its associated currency.

currency: optional string

Lowercase ISO-4217 currency e.g. “usd”

value: optional number

The numeric value of the cost.

line_item: optional string

When group_by=line_item, this field provides the line item of the grouped costs result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped costs result.

start_time: number
has_more: boolean
next_page: string
object: "page"
UsageImagesResponse object { data, has_more, next_page, object }
data: array of object { end_time, object, result, start_time }
end_time: number
object: "bucket"
result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more
One of the following:
UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: number

The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.completions.result"
output_tokens: number

The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.

api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

batch: optional boolean

When group_by=batch, this field tells whether the grouped usage result is batch or not.

input_audio_tokens: optional number

The aggregated number of audio input tokens used, including cached tokens.

input_cached_tokens: optional number

The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

output_audio_tokens: optional number

The aggregated number of audio output tokens used.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

service_tier: optional string

When group_by=service_tier, this field provides the service tier of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.embeddings.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.moderations.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageImagesResult object { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: number

The number of images processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.images.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

size: optional string

When group_by=size, this field provides the image size of the grouped usage result.

source: optional string

When group_by=source, this field provides the source of the grouped usage result, possible values are image.generation, image.edit, image.variation.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }

The aggregated audio speeches usage details of the specific time bucket.

characters: number

The number of characters processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_speeches.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }

The aggregated audio transcriptions usage details of the specific time bucket.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_transcriptions.result"
seconds: number

The number of seconds processed.

api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageVectorStoresResult object { object, usage_bytes, project_id }

The aggregated vector stores usage details of the specific time bucket.

object: "organization.usage.vector_stores.result"
usage_bytes: number

The vector stores usage in bytes.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }

The aggregated code interpreter sessions usage details of the specific time bucket.

object: "organization.usage.code_interpreter_sessions.result"
num_sessions: optional number

The number of code interpreter sessions.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

CostsResult object { object, amount, line_item, project_id }

The aggregated costs details of the specific time bucket.

object: "organization.costs.result"
amount: optional object { currency, value }

The monetary value in its associated currency.

currency: optional string

Lowercase ISO-4217 currency e.g. “usd”

value: optional number

The numeric value of the cost.

line_item: optional string

When group_by=line_item, this field provides the line item of the grouped costs result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped costs result.

start_time: number
has_more: boolean
next_page: string
object: "page"
UsageModerationsResponse object { data, has_more, next_page, object }
data: array of object { end_time, object, result, start_time }
end_time: number
object: "bucket"
result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more
One of the following:
UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: number

The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.completions.result"
output_tokens: number

The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.

api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

batch: optional boolean

When group_by=batch, this field tells whether the grouped usage result is batch or not.

input_audio_tokens: optional number

The aggregated number of audio input tokens used, including cached tokens.

input_cached_tokens: optional number

The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

output_audio_tokens: optional number

The aggregated number of audio output tokens used.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

service_tier: optional string

When group_by=service_tier, this field provides the service tier of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.embeddings.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.moderations.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageImagesResult object { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: number

The number of images processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.images.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

size: optional string

When group_by=size, this field provides the image size of the grouped usage result.

source: optional string

When group_by=source, this field provides the source of the grouped usage result, possible values are image.generation, image.edit, image.variation.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }

The aggregated audio speeches usage details of the specific time bucket.

characters: number

The number of characters processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_speeches.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }

The aggregated audio transcriptions usage details of the specific time bucket.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_transcriptions.result"
seconds: number

The number of seconds processed.

api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageVectorStoresResult object { object, usage_bytes, project_id }

The aggregated vector stores usage details of the specific time bucket.

object: "organization.usage.vector_stores.result"
usage_bytes: number

The vector stores usage in bytes.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }

The aggregated code interpreter sessions usage details of the specific time bucket.

object: "organization.usage.code_interpreter_sessions.result"
num_sessions: optional number

The number of code interpreter sessions.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

CostsResult object { object, amount, line_item, project_id }

The aggregated costs details of the specific time bucket.

object: "organization.costs.result"
amount: optional object { currency, value }

The monetary value in its associated currency.

currency: optional string

Lowercase ISO-4217 currency e.g. “usd”

value: optional number

The numeric value of the cost.

line_item: optional string

When group_by=line_item, this field provides the line item of the grouped costs result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped costs result.

start_time: number
has_more: boolean
next_page: string
object: "page"
UsageVectorStoresResponse object { data, has_more, next_page, object }
data: array of object { end_time, object, result, start_time }
end_time: number
object: "bucket"
result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more
One of the following:
UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: number

The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.completions.result"
output_tokens: number

The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.

api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

batch: optional boolean

When group_by=batch, this field tells whether the grouped usage result is batch or not.

input_audio_tokens: optional number

The aggregated number of audio input tokens used, including cached tokens.

input_cached_tokens: optional number

The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

output_audio_tokens: optional number

The aggregated number of audio output tokens used.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

service_tier: optional string

When group_by=service_tier, this field provides the service tier of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.embeddings.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.moderations.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageImagesResult object { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: number

The number of images processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.images.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

size: optional string

When group_by=size, this field provides the image size of the grouped usage result.

source: optional string

When group_by=source, this field provides the source of the grouped usage result, possible values are image.generation, image.edit, image.variation.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }

The aggregated audio speeches usage details of the specific time bucket.

characters: number

The number of characters processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_speeches.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }

The aggregated audio transcriptions usage details of the specific time bucket.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_transcriptions.result"
seconds: number

The number of seconds processed.

api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageVectorStoresResult object { object, usage_bytes, project_id }

The aggregated vector stores usage details of the specific time bucket.

object: "organization.usage.vector_stores.result"
usage_bytes: number

The vector stores usage in bytes.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }

The aggregated code interpreter sessions usage details of the specific time bucket.

object: "organization.usage.code_interpreter_sessions.result"
num_sessions: optional number

The number of code interpreter sessions.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

CostsResult object { object, amount, line_item, project_id }

The aggregated costs details of the specific time bucket.

object: "organization.costs.result"
amount: optional object { currency, value }

The monetary value in its associated currency.

currency: optional string

Lowercase ISO-4217 currency e.g. “usd”

value: optional number

The numeric value of the cost.

line_item: optional string

When group_by=line_item, this field provides the line item of the grouped costs result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped costs result.

start_time: number
has_more: boolean
next_page: string
object: "page"
UsageCostsResponse object { data, has_more, next_page, object }
data: array of object { end_time, object, result, start_time }
end_time: number
object: "bucket"
result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more
One of the following:
UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: number

The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.completions.result"
output_tokens: number

The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.

api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

batch: optional boolean

When group_by=batch, this field tells whether the grouped usage result is batch or not.

input_audio_tokens: optional number

The aggregated number of audio input tokens used, including cached tokens.

input_cached_tokens: optional number

The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

output_audio_tokens: optional number

The aggregated number of audio output tokens used.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

service_tier: optional string

When group_by=service_tier, this field provides the service tier of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.embeddings.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.moderations.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageImagesResult object { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: number

The number of images processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.images.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

size: optional string

When group_by=size, this field provides the image size of the grouped usage result.

source: optional string

When group_by=source, this field provides the source of the grouped usage result, possible values are image.generation, image.edit, image.variation.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }

The aggregated audio speeches usage details of the specific time bucket.

characters: number

The number of characters processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_speeches.result"
api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }

The aggregated audio transcriptions usage details of the specific time bucket.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_transcriptions.result"
seconds: number

The number of seconds processed.

api_key_id: optional string

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

model: optional string

When group_by=model, this field provides the model name of the grouped usage result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_id: optional string

When group_by=user_id, this field provides the user ID of the grouped usage result.

UsageVectorStoresResult object { object, usage_bytes, project_id }

The aggregated vector stores usage details of the specific time bucket.

object: "organization.usage.vector_stores.result"
usage_bytes: number

The vector stores usage in bytes.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }

The aggregated code interpreter sessions usage details of the specific time bucket.

object: "organization.usage.code_interpreter_sessions.result"
num_sessions: optional number

The number of code interpreter sessions.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped usage result.

CostsResult object { object, amount, line_item, project_id }

The aggregated costs details of the specific time bucket.

object: "organization.costs.result"
amount: optional object { currency, value }

The monetary value in its associated currency.

currency: optional string

Lowercase ISO-4217 currency e.g. “usd”

value: optional number

The numeric value of the cost.

line_item: optional string

When group_by=line_item, this field provides the line item of the grouped costs result.

project_id: optional string

When group_by=project_id, this field provides the project ID of the grouped costs result.

start_time: number
has_more: boolean
next_page: string
object: "page"

AdminOrganizationInvites

List invites
GET/organization/invites
Create invite
POST/organization/invites
Retrieve invite
GET/organization/invites/{invite_id}
Delete invite
DELETE/organization/invites/{invite_id}
ModelsExpand Collapse
Invite object { id, email, expires_at, 6 more }

Represents an individual invite to the organization.

id: string

The identifier, which can be referenced in API endpoints

email: string

The email address of the individual to whom the invite was sent

expires_at: number

The Unix timestamp (in seconds) of when the invite expires.

invited_at: number

The Unix timestamp (in seconds) of when the invite was sent.

object: "organization.invite"

The object type, which is always organization.invite

role: "owner" or "reader"

owner or reader

One of the following:
"owner"
"reader"
status: "accepted" or "expired" or "pending"

accepted,expired, or pending

One of the following:
"accepted"
"expired"
"pending"
accepted_at: optional number

The Unix timestamp (in seconds) of when the invite was accepted.

projects: optional array of object { id, role }

The projects that were granted membership upon acceptance of the invite.

id: optional string

Project’s public ID

role: optional "member" or "owner"

Project membership role

One of the following:
"member"
"owner"
InviteDeleteResponse object { id, deleted, object }
id: string
deleted: boolean
object: "organization.invite.deleted"

The object type, which is always organization.invite.deleted

AdminOrganizationUsers

List users
GET/organization/users
Retrieve user
GET/organization/users/{user_id}
Modify user
POST/organization/users/{user_id}
Delete user
DELETE/organization/users/{user_id}
ModelsExpand Collapse
OrganizationUser object { id, added_at, email, 3 more }

Represents an individual user within an organization.

id: string

The identifier, which can be referenced in API endpoints

added_at: number

The Unix timestamp (in seconds) of when the user was added.

email: string

The email address of the user

name: string

The name of the user

object: "organization.user"

The object type, which is always organization.user

role: "owner" or "reader"

owner or reader

One of the following:
"owner"
"reader"
UserDeleteResponse object { id, deleted, object }
id: string
deleted: boolean
object: "organization.user.deleted"

AdminOrganizationUsersRoles

List user organization role assignments
GET/organization/users/{user_id}/roles
Assign organization role to user
POST/organization/users/{user_id}/roles
Unassign organization role from user
DELETE/organization/users/{user_id}/roles/{role_id}
ModelsExpand Collapse
RoleListResponse object { id, created_at, created_by, 8 more }

Detailed information about a role assignment entry returned when listing assignments.

id: string

Identifier for the role.

created_at: number

When the role was created.

formatint64
created_by: string

Identifier of the actor who created the role.

created_by_user_obj: map[unknown]

User details for the actor that created the role, when available.

description: string

Description of the role.

metadata: map[unknown]

Arbitrary metadata stored on the role.

name: string

Name of the role.

permissions: array of string

Permissions associated with the role.

predefined_role: boolean

Whether the role is predefined by OpenAI.

resource_type: string

Resource type the role applies to.

updated_at: number

When the role was last updated.

formatint64
RoleCreateResponse object { object, role, user }

Role assignment linking a user to a role.

object: "user.role"

Always user.role.

role: Role { id, description, name, 4 more }

Details about a role that can be assigned through the public Roles API.

user: OrganizationUser { id, added_at, email, 3 more }

Represents an individual user within an organization.

RoleDeleteResponse object { deleted, object }

Confirmation payload returned after unassigning a role.

deleted: boolean

Whether the assignment was removed.

object: string

Identifier for the deleted assignment, such as group.role.deleted or user.role.deleted.

AdminOrganizationGroups

List groups
GET/organization/groups
Create group
POST/organization/groups
Update group
POST/organization/groups/{group_id}
Delete group
DELETE/organization/groups/{group_id}
ModelsExpand Collapse
Group object { id, created_at, is_scim_managed, name }

Details about an organization group.

id: string

Identifier for the group.

created_at: number

Unix timestamp (in seconds) when the group was created.

formatint64
is_scim_managed: boolean

Whether the group is managed through SCIM and controlled by your identity provider.

name: string

Display name of the group.

GroupUpdateResponse object { id, created_at, is_scim_managed, name }

Response returned after updating a group.

id: string

Identifier for the group.

created_at: number

Unix timestamp (in seconds) when the group was created.

formatint64
is_scim_managed: boolean

Whether the group is managed through SCIM and controlled by your identity provider.

name: string

Updated display name for the group.

GroupDeleteResponse object { id, deleted, object }

Confirmation payload returned after deleting a group.

id: string

Identifier of the deleted group.

deleted: boolean

Whether the group was deleted.

object: "group.deleted"

Always group.deleted.

AdminOrganizationGroupsUsers

List group users
GET/organization/groups/{group_id}/users
Add group user
POST/organization/groups/{group_id}/users
Remove group user
DELETE/organization/groups/{group_id}/users/{user_id}
ModelsExpand Collapse
UserCreateResponse object { group_id, object, user_id }

Confirmation payload returned after adding a user to a group.

group_id: string

Identifier of the group the user was added to.

object: "group.user"

Always group.user.

user_id: string

Identifier of the user that was added.

UserDeleteResponse object { deleted, object }

Confirmation payload returned after removing a user from a group.

deleted: boolean

Whether the group membership was removed.

object: "group.user.deleted"

Always group.user.deleted.

AdminOrganizationGroupsRoles

List group organization role assignments
GET/organization/groups/{group_id}/roles
Assign organization role to group
POST/organization/groups/{group_id}/roles
Unassign organization role from group
DELETE/organization/groups/{group_id}/roles/{role_id}
ModelsExpand Collapse
RoleListResponse object { id, created_at, created_by, 8 more }

Detailed information about a role assignment entry returned when listing assignments.

id: string

Identifier for the role.

created_at: number

When the role was created.

formatint64
created_by: string

Identifier of the actor who created the role.

created_by_user_obj: map[unknown]

User details for the actor that created the role, when available.

description: string

Description of the role.

metadata: map[unknown]

Arbitrary metadata stored on the role.

name: string

Name of the role.

permissions: array of string

Permissions associated with the role.

predefined_role: boolean

Whether the role is predefined by OpenAI.

resource_type: string

Resource type the role applies to.

updated_at: number

When the role was last updated.

formatint64
RoleCreateResponse object { group, object, role }

Role assignment linking a group to a role.

group: object { id, created_at, name, 2 more }

Summary information about a group returned in role assignment responses.

id: string

Identifier for the group.

created_at: number

Unix timestamp (in seconds) when the group was created.

formatint64
name: string

Display name of the group.

object: "group"

Always group.

scim_managed: boolean

Whether the group is managed through SCIM.

object: "group.role"

Always group.role.

role: Role { id, description, name, 4 more }

Details about a role that can be assigned through the public Roles API.

RoleDeleteResponse object { deleted, object }

Confirmation payload returned after unassigning a role.

deleted: boolean

Whether the assignment was removed.

object: string

Identifier for the deleted assignment, such as group.role.deleted or user.role.deleted.

AdminOrganizationRoles

List organization roles
GET/organization/roles
Create organization role
POST/organization/roles
Update organization role
POST/organization/roles/{role_id}
Delete organization role
DELETE/organization/roles/{role_id}
ModelsExpand Collapse
Role object { id, description, name, 4 more }

Details about a role that can be assigned through the public Roles API.

id: string

Identifier for the role.

description: string

Optional description of the role.

name: string

Unique name for the role.

object: "role"

Always role.

permissions: array of string

Permissions granted by the role.

predefined_role: boolean

Whether the role is predefined and managed by OpenAI.

resource_type: string

Resource type the role is bound to (for example api.organization or api.project).

RoleDeleteResponse object { id, deleted, object }

Confirmation payload returned after deleting a role.

id: string

Identifier of the deleted role.

deleted: boolean

Whether the role was deleted.

object: "role.deleted"

Always role.deleted.

AdminOrganizationCertificates

List organization certificates
GET/organization/certificates
Upload certificate
POST/organization/certificates
Get certificate
GET/organization/certificates/{certificate_id}
Modify certificate
POST/organization/certificates/{certificate_id}
Delete certificate
DELETE/organization/certificates/{certificate_id}
Activate certificates for organization
POST/organization/certificates/activate
Deactivate certificates for organization
POST/organization/certificates/deactivate
ModelsExpand Collapse
Certificate object { id, certificate_details, created_at, 3 more }

Represents an individual certificate uploaded to the organization.

id: string

The identifier, which can be referenced in API endpoints

certificate_details: object { content, expires_at, valid_at }
content: optional string

The content of the certificate in PEM format.

expires_at: optional number

The Unix timestamp (in seconds) of when the certificate expires.

valid_at: optional number

The Unix timestamp (in seconds) of when the certificate becomes valid.

created_at: number

The Unix timestamp (in seconds) of when the certificate was uploaded.

name: string

The name of the certificate.

object: "certificate" or "organization.certificate" or "organization.project.certificate"

The object type.

  • If creating, updating, or getting a specific certificate, the object type is certificate.
  • If listing, activating, or deactivating certificates for the organization, the object type is organization.certificate.
  • If listing, activating, or deactivating certificates for a project, the object type is organization.project.certificate.
One of the following:
"certificate"
"organization.certificate"
"organization.project.certificate"
active: optional boolean

Whether the certificate is currently active at the specified scope. Not returned when getting details for a specific certificate.

CertificateDeleteResponse object { id, object }
id: string

The ID of the certificate that was deleted.

object: "certificate.deleted"

The object type, must be certificate.deleted.

AdminOrganizationProjects

List projects
GET/organization/projects
Create project
POST/organization/projects
Retrieve project
GET/organization/projects/{project_id}
Modify project
POST/organization/projects/{project_id}
Archive project
POST/organization/projects/{project_id}/archive
ModelsExpand Collapse
Project object { id, created_at, name, 3 more }

Represents an individual project.

id: string

The identifier, which can be referenced in API endpoints

created_at: number

The Unix timestamp (in seconds) of when the project was created.

name: string

The name of the project. This appears in reporting.

object: "organization.project"

The object type, which is always organization.project

status: "active" or "archived"

active or archived

One of the following:
"active"
"archived"
archived_at: optional number

The Unix timestamp (in seconds) of when the project was archived or null.

AdminOrganizationProjectsUsers

List project users
GET/organization/projects/{project_id}/users
Create project user
POST/organization/projects/{project_id}/users
Retrieve project user
GET/organization/projects/{project_id}/users/{user_id}
Modify project user
POST/organization/projects/{project_id}/users/{user_id}
Delete project user
DELETE/organization/projects/{project_id}/users/{user_id}
ModelsExpand Collapse
ProjectUser object { id, added_at, email, 3 more }

Represents an individual user in a project.

id: string

The identifier, which can be referenced in API endpoints

added_at: number

The Unix timestamp (in seconds) of when the project was added.

email: string

The email address of the user

name: string

The name of the user

object: "organization.project.user"

The object type, which is always organization.project.user

role: "owner" or "member"

owner or member

One of the following:
"owner"
"member"
UserDeleteResponse object { id, deleted, object }
id: string
deleted: boolean
object: "organization.project.user.deleted"

AdminOrganizationProjectsUsersRoles

List project user role assignments
GET/projects/{project_id}/users/{user_id}/roles
Assign project role to user
POST/projects/{project_id}/users/{user_id}/roles
Unassign project role from user
DELETE/projects/{project_id}/users/{user_id}/roles/{role_id}
ModelsExpand Collapse
RoleListResponse object { id, created_at, created_by, 8 more }

Detailed information about a role assignment entry returned when listing assignments.

id: string

Identifier for the role.

created_at: number

When the role was created.

formatint64
created_by: string

Identifier of the actor who created the role.

created_by_user_obj: map[unknown]

User details for the actor that created the role, when available.

description: string

Description of the role.

metadata: map[unknown]

Arbitrary metadata stored on the role.

name: string

Name of the role.

permissions: array of string

Permissions associated with the role.

predefined_role: boolean

Whether the role is predefined by OpenAI.

resource_type: string

Resource type the role applies to.

updated_at: number

When the role was last updated.

formatint64
RoleCreateResponse object { object, role, user }

Role assignment linking a user to a role.

object: "user.role"

Always user.role.

role: Role { id, description, name, 4 more }

Details about a role that can be assigned through the public Roles API.

user: OrganizationUser { id, added_at, email, 3 more }

Represents an individual user within an organization.

RoleDeleteResponse object { deleted, object }

Confirmation payload returned after unassigning a role.

deleted: boolean

Whether the assignment was removed.

object: string

Identifier for the deleted assignment, such as group.role.deleted or user.role.deleted.

AdminOrganizationProjectsService Accounts

List project service accounts
GET/organization/projects/{project_id}/service_accounts
Create project service account
POST/organization/projects/{project_id}/service_accounts
Retrieve project service account
GET/organization/projects/{project_id}/service_accounts/{service_account_id}
Delete project service account
DELETE/organization/projects/{project_id}/service_accounts/{service_account_id}
ModelsExpand Collapse
ProjectServiceAccount object { id, created_at, name, 2 more }

Represents an individual service account in a project.

id: string

The identifier, which can be referenced in API endpoints

created_at: number

The Unix timestamp (in seconds) of when the service account was created

name: string

The name of the service account

object: "organization.project.service_account"

The object type, which is always organization.project.service_account

role: "owner" or "member"

owner or member

One of the following:
"owner"
"member"
ServiceAccountCreateResponse object { id, api_key, created_at, 3 more }
id: string
api_key: object { id, created_at, name, 2 more }
id: string
created_at: number
name: string
object: "organization.project.service_account.api_key"

The object type, which is always organization.project.service_account.api_key

value: string
created_at: number
name: string
object: "organization.project.service_account"
role: "member"

Service accounts can only have one role of type member

ServiceAccountDeleteResponse object { id, deleted, object }
id: string
deleted: boolean
object: "organization.project.service_account.deleted"

AdminOrganizationProjectsAPI Keys

List project API keys
GET/organization/projects/{project_id}/api_keys
Retrieve project API key
GET/organization/projects/{project_id}/api_keys/{key_id}
Delete project API key
DELETE/organization/projects/{project_id}/api_keys/{key_id}
ModelsExpand Collapse
ProjectAPIKey object { id, created_at, last_used_at, 4 more }

Represents an individual API key in a project.

id: string

The identifier, which can be referenced in API endpoints

created_at: number

The Unix timestamp (in seconds) of when the API key was created

last_used_at: number

The Unix timestamp (in seconds) of when the API key was last used.

name: string

The name of the API key

object: "organization.project.api_key"

The object type, which is always organization.project.api_key

owner: object { service_account, type, user }
service_account: optional ProjectServiceAccount { id, created_at, name, 2 more }

Represents an individual service account in a project.

type: optional "user" or "service_account"

user or service_account

One of the following:
"user"
"service_account"
user: optional ProjectUser { id, added_at, email, 3 more }

Represents an individual user in a project.

redacted_value: string

The redacted value of the API key

APIKeyDeleteResponse object { id, deleted, object }
id: string
deleted: boolean
object: "organization.project.api_key.deleted"

AdminOrganizationProjectsRate Limits

List project rate limits
GET/organization/projects/{project_id}/rate_limits
Modify project rate limit
POST/organization/projects/{project_id}/rate_limits/{rate_limit_id}
ModelsExpand Collapse
ProjectRateLimit object { id, max_requests_per_1_minute, max_tokens_per_1_minute, 6 more }

Represents a project rate limit config.

id: string

The identifier, which can be referenced in API endpoints.

max_requests_per_1_minute: number

The maximum requests per minute.

max_tokens_per_1_minute: number

The maximum tokens per minute.

model: string

The model this rate limit applies to.

object: "project.rate_limit"

The object type, which is always project.rate_limit

batch_1_day_max_input_tokens: optional number

The maximum batch input tokens per day. Only present for relevant models.

max_audio_megabytes_per_1_minute: optional number

The maximum audio megabytes per minute. Only present for relevant models.

max_images_per_1_minute: optional number

The maximum images per minute. Only present for relevant models.

max_requests_per_1_day: optional number

The maximum requests per day. Only present for relevant models.

AdminOrganizationProjectsGroups

List project groups
GET/organization/projects/{project_id}/groups
Add project group
POST/organization/projects/{project_id}/groups
Remove project group
DELETE/organization/projects/{project_id}/groups/{group_id}
ModelsExpand Collapse
ProjectGroup object { created_at, group_id, group_name, 2 more }

Details about a group’s membership in a project.

created_at: number

Unix timestamp (in seconds) when the group was granted project access.

formatint64
group_id: string

Identifier of the group that has access to the project.

group_name: string

Display name of the group.

object: "project.group"

Always project.group.

project_id: string

Identifier of the project.

GroupDeleteResponse object { deleted, object }

Confirmation payload returned after removing a group from a project.

deleted: boolean

Whether the group membership in the project was removed.

object: "project.group.deleted"

Always project.group.deleted.

AdminOrganizationProjectsGroupsRoles

List project group role assignments
GET/projects/{project_id}/groups/{group_id}/roles
Assign project role to group
POST/projects/{project_id}/groups/{group_id}/roles
Unassign project role from group
DELETE/projects/{project_id}/groups/{group_id}/roles/{role_id}
ModelsExpand Collapse
RoleListResponse object { id, created_at, created_by, 8 more }

Detailed information about a role assignment entry returned when listing assignments.

id: string

Identifier for the role.

created_at: number

When the role was created.

formatint64
created_by: string

Identifier of the actor who created the role.

created_by_user_obj: map[unknown]

User details for the actor that created the role, when available.

description: string

Description of the role.

metadata: map[unknown]

Arbitrary metadata stored on the role.

name: string

Name of the role.

permissions: array of string

Permissions associated with the role.

predefined_role: boolean

Whether the role is predefined by OpenAI.

resource_type: string

Resource type the role applies to.

updated_at: number

When the role was last updated.

formatint64
RoleCreateResponse object { group, object, role }

Role assignment linking a group to a role.

group: object { id, created_at, name, 2 more }

Summary information about a group returned in role assignment responses.

id: string

Identifier for the group.

created_at: number

Unix timestamp (in seconds) when the group was created.

formatint64
name: string

Display name of the group.

object: "group"

Always group.

scim_managed: boolean

Whether the group is managed through SCIM.

object: "group.role"

Always group.role.

role: Role { id, description, name, 4 more }

Details about a role that can be assigned through the public Roles API.

RoleDeleteResponse object { deleted, object }

Confirmation payload returned after unassigning a role.

deleted: boolean

Whether the assignment was removed.

object: string

Identifier for the deleted assignment, such as group.role.deleted or user.role.deleted.

AdminOrganizationProjectsRoles

List project roles
GET/projects/{project_id}/roles
Create project role
POST/projects/{project_id}/roles
Update project role
POST/projects/{project_id}/roles/{role_id}
Delete project role
DELETE/projects/{project_id}/roles/{role_id}
ModelsExpand Collapse
RoleDeleteResponse object { id, deleted, object }

Confirmation payload returned after deleting a role.

id: string

Identifier of the deleted role.

deleted: boolean

Whether the role was deleted.

object: "role.deleted"

Always role.deleted.

AdminOrganizationProjectsCertificates

List project certificates
GET/organization/projects/{project_id}/certificates
Activate certificates for project
POST/organization/projects/{project_id}/certificates/activate
Deactivate certificates for project
POST/organization/projects/{project_id}/certificates/deactivate