API reference · Credits
The price lock offer, and this account's locks
GET/api/account/price-locksSigned in session
A price lock freezes one model's billed input and output rates for a number of days, with prepaid credit that only that model spends. A keyed request on the personal balance whose every model (fallbacks included) is the locked one is paid from the lock and billed, per rate, at the lower of the locked and today's rate, never more than without the lock. When the lock cannot hold the request's worst case, the balance pays at today's rates. At expiry the remainder returns to the balance; the premium is not refunded. Reading closes any lock that has run out.
Parameters
| Field | Type | What it is |
|---|---|---|
| model (query) | string | A model id, to quote a lock on it. |
Answer 200
The offer and the account's locks.
| Field | Type | What it is |
|---|---|---|
| enabledrequired | boolean | False unless the operator set ANTIMATTER_PRICE_LOCK_PREMIUM_BPS, ANTIMATTER_PRICE_LOCK_MAX_DAYS and both exposure caps; a cap left unset is zero and sells no lock. |
| premiumBps | integer | The premium, in basis points of the credit locked. |
| maxDays | integer | The longest lock, at most 365 days. |
| minMicros | integer | The smallest lock, 10000 micro dollars; amounts are whole cents. |
| model | object or null | With ?model=, what a lock on that model would freeze today. |
| model. | string | |
| model. | object or null | |
| model. | number | USD per 1M input tokens. |
| model. | number | USD per 1M output tokens. |
| model. | number or null | Null when none was published; cached input then bills at the input rate. |
| model. | number or null | |
| model. | string or null | Why it cannot be locked. |
| locksrequired | array of object | |
| locks[] | integer | |
| locks[] | string | |
| locks[] | object | The billed rates frozen on the day the lock was bought. |
| locks[] | number | USD per 1M input tokens. |
| locks[] | number | USD per 1M output tokens. |
| locks[] | number or null | Null when none was published; cached input then bills at the input rate. |
| locks[] | number or null | |
| locks[] | integer | The prepaid credit moved into the lock. |
| locks[] | integer | |
| locks[] | integer | Charged once at purchase as its own ledger line; never refunded. |
| locks[] | integer | |
| locks[] | string | One of "open", "expired". |
| locks[] | integer | |
| locks[] | integer | |
| locks[] | integer or null | |
| locks[] | integer or null | What went back to the balance at expiry. |
| locks[] | integer | What the lock can still spend, open holds taken off. |
| locks[] | integer | Held for requests in flight. |
| locks[] | integer | Spent by requests the lock paid for. |
| locks[] | object or null | The model's billed card today, for an open lock; null when it is not priced now. |
| locks[] | number | USD per 1M input tokens. |
| locks[] | number | USD per 1M output tokens. |
| locks[] | number or null | Null when none was published; cached input then bills at the input rate. |
| locks[] | number or null |
Errors
- 401OpenAI 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.