Retrieve project API key
GEThttps:/api.openai.com/v1/organization/projects/{project_id}/api_keys/{key_id}
Retrieves an API key in the project.
Path parameters
project_id
string
Required
The ID of the project.key_id
string
Required
The ID of the API key.
Response
The ProjectApiKey object matching the specified ID.
Example request
1 curl https://api.openai.com/v1/organization/projects/proj_abc/api_keys/key_abc \2 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \3 -H "Content-Type: application/json"
Example response
1 {2 "object": "organization.project.api_key",3 "redacted_value": "sk-abc...def",4 "name": "My API Key",5 "created_at": 1711471533,6 "last_used_at": 1711471534,7 "id": "key_abc",8 "owner": {9 "type": "user",10 "user": {11 "object": "organization.project.user",12 "id": "user_abc",13 "name": "First Last",14 "email": "user@example.com",15 "role": "owner",16 "added_at": 171147153317 }18 }19 }
Built with