Skip to main content
PATCH
curl

Authorizations

Authorization
string
header
required

An account provisioning key. Send it as Authorization: Bearer <key>. Provisioning keys manage the account and cannot reach a model.

Path Parameters

key_id
integer<int64>
required

The key's id, as the listing reports it.

Body

application/json

The body of PATCH /v1/account/keys/{key_id}; an absent field stays.

default_routing_strategy
enum<string> | null

A new default routing strategy, or null to let NagaAI choose. An unknown name draws a 400.

Available options:
reliability,
balanced,
latency,
throughput,
cache
name
string

A replacement label, between 1 and 255 characters. An explicit null draws a 400.

is_enabled
boolean

Whether the key works at all. A disabled key draws a 401 disabled_api_key.

credit_limit
number<double> | null

A replacement spending limit in credits, or null to clear it.

expires_at
string | null

A later expiry, or null to clear it.

Response

The key as it stands after the change, without its secret.

One API key of the account, without its secret.

id
integer<int64>
required

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

name
string
required

The label the key carries.

created_at
string
required

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

expires_at
string | null
required

When the key stops working, or null for one that never expires.

is_enabled
boolean
required

Whether the key works at all.

credit_limit
number<double> | null
required

The key's own spending limit in credits, or null for none.

default_routing_strategy
enum<string> | null
required

The key's default routing strategy, or null when NagaAI chooses.

Available options:
reliability,
balanced,
latency,
throughput,
cache