Sample - OpenAI API
GET/organization/admin_api_keys

List organization and project API keys

Lists all organization and project API keys available to the authenticated user. Use after to continue from a previous page, order to control creation-time ordering, and limit to set the maximum number of keys returned.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

3 parameters
afterstringoptional
A cursor containing the API key ID after which to continue the paginated results.
orderstringoptional
Sort order by creation time: `asc` or `desc`. Defaults to `asc` when omitted.
Allowed:ascdescDefault:asc
limitintegeroptional
Maximum number of API keys to return. Defaults to 20 when omitted.
Default:20

1 status code
200Returns a list object containing API key records, pagination metadata, and a `has_more` flag indicating whether additional keys are available.
objectstringrequired
Allowed:list
dataarray<object>required
has_morebooleanrequired
first_idstringoptional
last_idstringoptional

Error handling

order must be asc or desc, and defaults to asc when omitted. limit defaults to 20 when omitted, while after must contain an API key ID from the pagination order when supplied.