Sample - OpenAI API
GET/organization/projects/{project_id}/api_keys

List project API keys

Lists API keys associated with an organization project. Use owner_project_access to filter keys by the owner's effective project access, and use limit with after to paginate the results.

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

4 parameters
project_idstringrequired
The unique identifier of the project whose API keys to list.
limitintegeroptional
The maximum number of API key objects to return, from 1 to 100. Defaults to 20 when omitted.
Default:20
afterstringoptional
A cursor containing an API key object ID that marks the starting position for the next page.
owner_project_accessstringoptional
Filters keys by the owner's effective project access: `active`, `inactive`, or `any`.
Allowed:activeinactiveany

1 status code
200Returns a list object containing redacted project API key records, ownership and access information, the first and last key IDs, and a `has_more` value.
objectstringrequired
Allowed:list
dataarray<object>required
first_idstringoptional
last_idstringoptional
has_morebooleanrequired

Error handling

project_id must identify the project whose API keys you want to list. limit must be between 1 and 100 when provided, and owner_project_access must be active, inactive, or any; limit defaults to 20 when omitted.