API Keys

Create an API key

Changed on

Creates an API key on the account and returns its secret this once. Requires a provisioning key.

post/v1/account/keys

Request

Request body

namestring required

A label for the key, between 1 and 255 characters.

credit_limitnumber double nullable

How many credits this key may spend before the gateway turns it away. Absent means no limit of its own.

expires_atstring nullable

When the key should stop working; a past instant draws a refusal. Both grammars count.

default_routing_strategy'reliability' | 'balanced' | 'latency' | 'throughput' | 'cache' nullable

The routing strategy for requests that name none. Absent lets NagaAI choose. An unknown name draws a 400.

Response

The freshly minted key, and the one answer carrying the secret itself.

idinteger required

The created key's id, which is the {key_id} the per-key routes take.

namestring required

The label the request asked for.

keystring required

The secret itself, in full, and the one answer carrying it.

created_atstring required

When the key was created: UTC to the second, without an offset.

expires_atstring nullable required

When the key stops working, or null when the request asked for none.

is_enabledboolean required

Whether the key works at all. Creation inserts it enabled.

credit_limitnumber double nullable required

The limit the request asked for, or null when it asked for none.

default_routing_strategy'reliability' | 'balanced' | 'latency' | 'throughput' | 'cache' nullable required

The default routing strategy the request asked for, or null when NagaAI chooses.

messagestring required

A fixed reminder that key above is shown once.

Changes

    • breaking

      request property list-of-types was narrowed by removing types null from media type application/json

    • breaking

      request property list-of-types was narrowed by removing types null from media type application/json

    • breaking

      the response's property type changed from object to no type for status

    • breaking

      the response's property type changed from object to no type for status

    • breaking

      the response's property type changed from object to no type for status

    • breaking

      the response's property type changed from object to no type for status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the success response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • info

      api operation id createApiKey removed and replaced with create_api_key

    • info

      added the new optional request property

    • info

      the request property became nullable

    • info

      the request property became nullable

    • info

      the request property's minLength was decreased from 1 to 0

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      added to the response property allOf list for the response status

    • info

      added to the response property allOf list for the response status

    • info

      added to the response property allOf list for the response status

    • info

      added to the response property allOf list for the response status

    • info

      added the success response with the status