LlmGatewayKeys

create llm_gateway_key

Changed on

Creates a key for an organization. The secret token is returned in this response only and cannot be retrieved afterwards.

post/llm_gateway_keys

Request

  • Base URL
    https://api.aptible.com
  • Auth
    API key in header Authorization

Query parameters

no_embedboolean

When true, omits embedded resources from the response. Also triggered when the Prefer: no_sensitive_extras=true header is present.

Headers

Prefer'no_sensitive_extras=true'

When set to no_sensitive_extras=true, omits sensitive fields and embedded resources from the response.

Request body

handlestring required

Handle for the key, unique within the organization

notestring

Note about the key, up to 256 characters

spend_limitnumber

Spend limit in USD for this key. Must not exceed the organization's spend_limit. Omit it, or send null, for a key with no limit of its own.

organization_idstring

The organization to create the key in. Required unless the caller belongs to exactly one organization, in which case it is inferred from the token.

Response

created

idinteger required

Database ID of the LLM Gateway Key

_typestring required
handlestring required

User-provided handle for the key (unique within the organization)

notestring required

User-provided note

spend_limitstring required

Spend limit in USD for this key (decimal, serialized as string). Null means the key has no limit of its own. Never exceeds the organization's spend_limit: lowering that lowers any key that was above it.

organization_idstring required

The organization this key belongs to

created_atstring dateTime required
updated_atstring dateTime required
gateway_urlstring required

Customer-facing LLM Gateway endpoint URL

token_prefixstring required

The first characters of the key's token, safe to display and enough to tell keys apart

created_byobject required

User who created the key

revoked_atstring dateTime required

Timestamp when the key was revoked

revoked_byobject required

User who revoked the key

statusstring required

Key status (ACTIVE or REVOKED)

tokenstring

Secret API key value (only present on creation)

Changes