Skip to main content
PATCH
Rename an AI key (browser session)

Authorizations

ankra_session
string
cookie
required

Browser session. Mutations also require X-Ankra-CSRF.

Path Parameters

key_id
string<uuid>
required

Body

application/json
label
string
required

Surrounding spaces are trimmed; an empty label clears it.

Maximum string length: 100

Response

The renamed key

One AI provider key on your profile. The key itself is never returned.

id
string<uuid>
required
provider
enum<string>
required
Available options:
anthropic,
openrouter
label
string
required

Your name for the key; empty when you gave none.

Maximum string length: 100
key_preview
string
required

The key's provider prefix and last four characters, such as sk-ant-...1234.

position
integer
required

Where the key sits in the order your work tries keys, starting at 0.

Required range: x >= 0
status
enum<string>
required

active keys are used. out_of_credit keys ran out of balance and are tried again after retry_after. rejected keys were refused by their provider and stay unused until a test passes.

Available options:
active,
out_of_credit,
rejected
retry_after
string<date-time> | null
required

When an out_of_credit key is next tried; null otherwise.

last_used_at
string<date-time> | null
required

When the key last served a request, to the minute; null if never.

created_at
string<date-time>
required