InferenceHelp
Limits and usage
How credit usage is counted across three windows, where to see your remaining balance, and what to do when a limit is exhausted.
Usage is counted in credits and charged to the account of the key owner. Each plan has limits for three windows: session, week and month. The remaining balance for each window comes in the response headers, and when a limit is exhausted, the API responds with code 429 and says when the allowance resets.
Three windows
| Window | When it starts |
|---|---|
| A 5-hour session | With the first paid request. |
| Week | On the same day of the week and hour you signed up. |
| Month | On the day of the month you signed up, or, on a paid plan, from the moment you switched to it. |
The limits of each plan are listed on the Pricing page, and your current usage is in the console at console.yenisei.ru.
Response headers
| Header | What it holds |
|---|---|
X-RateLimit-Remaining-Session | Remaining credits in the session window. |
X-RateLimit-Remaining-Week | Remaining credits in the week window. |
X-RateLimit-Remaining-Month | Remaining credits in the month window. |
Retry-After | Number of seconds until the exhausted limit resets. Comes in a 429 response. |
X-RateLimit-Reset | The moment the limit resets, as a unix timestamp. Comes in a 429 response. |
The remaining balance is given in nanocredits: 1 credit equals 1,000,000,000 nanocredits.
What to do when a limit is exhausted
The API responds with code 429 and the code of the window:
session_limit_exceeded, week_limit_exceeded or month_limit_exceeded. The
right behavior for a program is to wait the number of seconds given in
Retry-After and then retry the request, rather than sending it again and
again.