Skip to content
Peritus
API reference · Account

Create key

POST/v1/account/keys

Creates an API key and returns it, once. Needs the account scope as an owner or admin.

scope
account
auth
Bearer key
operationId
CreateKey

Request body

application/json · KeyRequest · no other fields

Request body fields
FieldTypeRequiredLimitsHolds
scopesread · write_requests · account[]yes1 to 3 items
max_modestrict · standard · broadnoWhich items could be served. Each mode returns everything the one before it does.
namestringno1 to 100 charactersA name for the key, shown in the console.
presetstringno1 to 64 characters

Response

201 · NewKey. The key. It is shown only now.

Response fields
FieldType
keystring
infoKeyInfo

Problems

RFC 9457 application/problem+json. An abstention is not one of these: it is a 200.

Problems
HTTPCodeWhen
400INVALID_REQUESTMalformed JSON, unknown fields, bad filter, limit exceeded
401UNAUTHENTICATEDMissing, malformed, or revoked key
403FORBIDDEN_SCOPEThe key lacks the required scope
404NOT_FOUNDUnknown response, job, document, or reserved route
422UNPROCESSABLEWell-formed but semantically invalid
429RATE_LIMITEDRate limit or per-tenant model cap
500INTERNAL, POLICY_ASSERT_FAILED, RESPONSE_UNREPLAYABLEServer fault. The last two also alert
503STORE_UNAVAILABLE, LLM_UNAVAILABLE, LOG_UNAVAILABLEA dependency is down or a budget tripped