API Key Management

POST https://api.aimlapi.com/v1/keys

GET https://api.aimlapi.com/v1/keys

GET https://api.aimlapi.com/v1/key

PATCH https://api.aimlapi.com/v1/keys/{prefix}

DELETE https://api.aimlapi.com/v1/keys/{prefix}

circle-exclamation

Create a new API key

Copy the created key and store it in a secure location. If the key is lost, create a new one.

post
Body
namestringOptional

Optional human-readable name of the API key.

Example: 20260202-key-for-llms
Responses
chevron-right
200

API key creation result

application/json
post
/keys
200

API key creation result


List API keys

Returns all API keys for your account, including each key’s settings and metadata.

get
Responses
chevron-right
200

List of API keys, ordered from oldest to newest

application/json
get
/keys
200

List of API keys, ordered from oldest to newest


Get the API key

Retrieve parameters of the AIMLAPI key used in the request.

get
Responses
chevron-right
200

Parameters of the latest API key

application/json
get
/key
200

Parameters of the latest API key


Update an API key

patch
Path parameters
prefixstringRequired

Prefix of the API key to update. Passed in the URL path. This is the first 8 characters of your API key, visible in the dashboard. You can also obtain this value via the GET method (see the prefix field in its response).

Example: b747e891
Body
namestringOptional

Optional human-readable name of the API key.

Example: 20260202-key-for-llms
disabledbooleanOptional

Enable or disable the API key.

Example: false
Responses
chevron-right
200

Updated API key parameters

application/json
patch
/keys/{prefix}
200

Updated API key parameters


Delete an API key

delete
Path parameters
prefixstringRequired

Prefix of the API key to delete. Passed in the URL path. This is the first 8 characters of the API key you want to delete. Passed in the URL path. This is the first 8 characters of your API key, visible in the dashboard. You can also obtain this value via the GET method (see the prefix field in its response).

Example: b747e891
Responses
chevron-right
200

Key deletion result

application/json
delete
/keys/{prefix}
200

Key deletion result

Last updated

Was this helpful?