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
| Field | Type | What it is |
|---|---|---|
| monthlyCapMicros | integer or null |
Example
{
"monthlyCapMicros": 0
}Answer 200
The stored cap.
| Field | Type | What it is |
|---|---|---|
| monthlyCapMicros | integer 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.