Create admin API key
POST/organization/admin_api_keys
Create an organization admin API key
Returns
Create admin API key
curl -X POST https://api.openai.com/v1/organization/admin_api_keys \
-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "New Admin Key"
}'
{
"object": "organization.admin_api_key",
"id": "key_xyz",
"name": "New Admin Key",
"redacted_value": "sk-admin...xyz",
"created_at": 1711471533,
"last_used_at": 1711471534,
"owner": {
"type": "user",
"object": "organization.user",
"id": "user_123",
"name": "John Doe",
"created_at": 1711471533,
"role": "owner"
},
"value": "sk-admin-1234abcd"
}
Returns Examples
{
"object": "organization.admin_api_key",
"id": "key_xyz",
"name": "New Admin Key",
"redacted_value": "sk-admin...xyz",
"created_at": 1711471533,
"last_used_at": 1711471534,
"owner": {
"type": "user",
"object": "organization.user",
"id": "user_123",
"name": "John Doe",
"created_at": 1711471533,
"role": "owner"
},
"value": "sk-admin-1234abcd"
}