NAME

OpenAPI::Client::OpenAI::Path::organization-admin_api_keys - Documentation for the /organization/admin_api_keys path.

DESCRIPTION

This document describes the API endpoint at /organization/admin_api_keys.

PATHS

GET /organization/admin_api_keys

List organization API keys

Retrieve a paginated list of organization admin API keys.

Operation ID

admin-api-keys-list

$client->admin-api-keys-list( ... );

Parameters

  • after (in query) (Optional) -

    Type: string

  • order (in query) (Optional) -

    Type: string

    Allowed values: asc, desc

    Default: asc

  • limit (in query) (Optional) -

    Type: integer

    Default: 20

Responses

Status Code: 200

A list of organization API keys.

Content Types:

  • application/json

    Example (See the OpenAI spec for more detail):

    {
       "data" : [
          {
             "created_at" : 1711471533,
             "id" : "key_abc",
             "name" : "Administration Key",
             "object" : "organization.admin_api_key",
             "owner" : {
                "created_at" : 1711471533,
                "id" : "sa_456",
                "name" : "My Service Account",
                "role" : "member",
                "type" : "service_account"
             },
             "redacted_value" : "sk-admin...def",
             "value" : "sk-admin-1234abcd"
          }
       ],
       "first_id" : "key_abc",
       "has_more" : false,
       "last_id" : "key_xyz",
       "object" : "list"
    }

POST /organization/admin_api_keys

Create an organization admin API key

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

Operation ID

admin-api-keys-create

$client->admin-api-keys-create( ... );

Parameters

Request Body

Content Type: application/json

Example:

{
   "name" : "New Admin Key"
}


         

Responses

Status Code: 200

The newly created admin API key.

Content Types:

  • application/json

    Example (See the OpenAI spec for more detail):

    {
       "created_at" : 1711471533,
       "id" : "key_abc",
       "name" : "Administration Key",
       "object" : "organization.admin_api_key",
       "owner" : {
          "created_at" : 1711471533,
          "id" : "sa_456",
          "name" : "My Service Account",
          "role" : "member",
          "type" : "service_account"
       },
       "redacted_value" : "sk-admin...def",
       "value" : "sk-admin-1234abcd"
    }

SEE ALSO

OpenAPI::Client::OpenAI::Path

COPYRIGHT AND LICENSE

Copyright (C) 2023-2025 by Nelson Ferraz

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.0 or, at your option, any later version of Perl 5 you may have available.