OpenAI API

List organization API keys

Retrieve a paginated list of organization admin API keys.

get
https://api.openai.com/v1/organization/admin_api_keys

Query Parameters

afterstring | null

Return keys with IDs that come after this ID in the pagination order.

orderstring

Order results by creation time, ascending or descending.

Allowed values:ascdesc

Default:asc

limitinteger

Maximum number of keys to return.

Default:20

Response

200 application/json

A list of organization API keys.

ApiKeyList

objectstring

Example:list

dataarray[object]
Show Child Parameters
has_moreboolean

Example:false

first_idstring

Example:key_abc

last_idstring

Example:key_xyz

get/organization/admin_api_keys
 
200 application/json

Create an organization admin API key

Create a new admin-level API key for the organization.

post
https://api.openai.com/v1/organization/admin_api_keys

Body

application/json
namestringrequired

Example:New Admin Key

Response

200 application/json

The newly created admin API key.

AdminApiKey

objectstring

Example:organization.admin_api_key

idstring

Example:key_abc

namestring

Example:Administration Key

redacted_valuestring

Example:sk-admin...def

valuestring

Example:sk-admin-1234abcd

created_atinteger(int64)

Example:1711471533

ownerobject
Show Child Parameters
post/organization/admin_api_keys

Body

{ "name": "New Admin Key" }
 
200 application/json

Retrieve a single organization API key

Get details for a specific organization API key by its ID.

get
https://api.openai.com/v1/organization/admin_api_keys/{key_id}

Path Parameters

key_idstringrequired

The ID of the API key.

Response

200 application/json

Details of the requested API key.

AdminApiKey

objectstring

Example:organization.admin_api_key

idstring

Example:key_abc

namestring

Example:Administration Key

redacted_valuestring

Example:sk-admin...def

valuestring

Example:sk-admin-1234abcd

created_atinteger(int64)

Example:1711471533

ownerobject
Show Child Parameters
get/organization/admin_api_keys/{key_id}
 
200 application/json

Delete an organization admin API key

Delete the specified admin API key.

delete
https://api.openai.com/v1/organization/admin_api_keys/{key_id}

Path Parameters

key_idstringrequired

The ID of the API key to be deleted.

Response

200 application/json

Confirmation that the API key was deleted.

idstring

Example:key_abc

objectstring

Example:organization.admin_api_key.deleted

deletedboolean

Example:true

delete/organization/admin_api_keys/{key_id}
 
200 application/json

Assistants

Build Assistants that can call models and use tools.