API reference

API reference · Account

Set the account monthly spend cap

PATCH/api/account/settingsSigned in session

Micro USD. Zero or null clears it. A capped account over its limit gets a 429 with the spend_cap_exceeded type on every keyed request.

Request body

application/json, required

Request body fields
FieldTypeWhat it is
monthlyCapMicrosinteger or null

Example

{
  "monthlyCapMicros": 0
}

Answer 200

The stored cap.

Fields of the 200 answer
FieldTypeWhat it is
monthlyCapMicrosinteger or null

Errors

  • 400OpenAI shaped error.

Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.

Antimatter