Create an organization admin API key

POST /organization/admin_api_keys

Create a new admin-level API key for the organization.

application/json

Body Required

  • name string Required

Responses

  • 200 application/json

    The newly created admin API key.

    Hide response attributes Show response attributes object
    • object string
    • id string
    • name string
    • redacted_value string
    • value string
    • created_at integer(int64)
    • owner object
      Hide owner attributes Show owner attributes object
      • type string
      • id string
      • name string
      • created_at integer(int64)
      • role string
POST /organization/admin_api_keys
curl \
 --request POST 'https://api.openai.com/v1/organization/admin_api_keys' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"name":"New Admin Key"}'
Request examples
{
  "name": "New Admin Key"
}
Response examples (200)
{
  "object": "organization.admin_api_key",
  "id": "key_abc",
  "name": "Administration Key",
  "redacted_value": "sk-admin...def",
  "value": "sk-admin-1234abcd",
  "created_at": 1711471533,
  "owner": {
    "type": "service_account",
    "id": "sa_456",
    "name": "My Service Account",
    "created_at": 1711471533,
    "role": "member"
  }
}