Limits
Requests and tokens per minute, and caps in credits, for the project, each key, each task and each person.
Who a limit applies to
| Scope | Example at La Espiga | Set in |
|---|---|---|
| Project | all of the project’s AI | ai.limits.project in sypnia.toml |
| Key | the key used by the morning job | ai keys create … --credits-per-day |
| Task | allergen-answer | the route’s limits |
| Use case | ask-about-a-product | ai.limits.cases in sypnia.toml |
| Person of your app | each customer who asks | the route’s limits.end_user |
What a limit counts
| Kind | Meaning | When it is reached |
|---|---|---|
requests_per_minute | calls started in a minute | 429 rate_limited, with retry-after |
tokens_per_minute | tokens read and written in a minute | 429 rate_limited, with retry-after |
requests_per_day | calls in a day (people of your app) | 429 end_user_limit |
credits_per_day, credits_per_month | credits spent | 402 budget_exceeded, naming the scope |
[ai.limits]
project = { credits_per_month = 20000 }
cases = { ask-about-a-product = { credits_per_day = 400 } }
[ai.tasks.allergen-answer]
limits = { requests_per_minute = 120, end_user = { requests_per_day = 40, credits_per_day = 10 } }The numbers are La Espiga’s own choices.
Notices
At 80 % and 100 % of every cap in credits, the project’s owners and admins get a notice in App and an e-mail. Days and months follow the calendar, in your organization’s time zone.
Limits above yours
- Your organization’s spending limits, set in App for the organization, a project or a product, also apply: past them,
402 spending_limit_reached. Cloud - Your plan sets how many requests and tokens per minute a project can reach; the values are published with the plans. Cloud