Create admin API key
POSThttps:/api.openai.com/v1/organization/admin_api_keys
Create a new admin-level API key for the organization.
Request body
name
string
Required
Response
The created AdminApiKey object.
Example request
1 curl -X POST https://api.openai.com/v1/organization/admin_api_keys \2 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \3 -H "Content-Type: application/json" \4 -d '{5 "name": "New Admin Key"6 }'
Example response
1 {2 "object": "organization.admin_api_key",3 "id": "key_xyz",4 "name": "New Admin Key",5 "redacted_value": "sk-admin...xyz",6 "created_at": 1711471533,7 "last_used_at": 1711471534,8 "owner": {9 "type": "user",10 "object": "organization.user",11 "id": "user_123",12 "name": "John Doe",13 "created_at": 1711471533,14 "role": "owner"15 },16 "value": "sk-admin-1234abcd"17 }
Built with