OpenAI API

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.

Returns a list of assistants.

get
https://api.openai.com/v1/assistants

Query Parameters

limitinteger

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.

Default:20

orderstring

Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.

Allowed values:ascdesc

Default:desc

afterstring

A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.

beforestring

A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.

Response

200 application/json

OK

ListAssistantsResponse

objectstringrequired

Example:list

dataarray[object]required

Represents an assistant that can call the model and use tools.

Show Child Parameters
first_idstringrequired

Example:asst_abc123

last_idstringrequired

Example:asst_abc456

has_morebooleanrequired

Example:false

get/assistants
 
200 application/json