Rate limits
Check how many requests and tasks your plan allows, and use the error code to tell which limit you reached.
Limits by plan
To keep the API fast and available for everyone, Meshy limits each account in two ways:
- Requests per second: how many API requests you can send each second.
- Concurrent tasks: how many of your tasks can be
PENDINGorIN_PROGRESSat the same time.
The limits depend on your plan:
| Plan | Requests per second | Concurrent tasks | Priority |
|---|---|---|---|
| Pro | 20 | 10 | Default |
| Premium | 20 | 30 | Higher than Pro |
| Ultra | 20 | 100 | Highest |
| Studio | 20 | 60, or 20 on some earlier Studio plans | Higher than Pro |
| Enterprise | 100 | 100 by default, or a custom limit | Highest |
Priority isn't a limit. When the queue is busy, Meshy starts the tasks with a higher priority first.
API v1 and v2 share these limits, so requests and tasks on either version count toward them.
What counts toward each limit
Every API request counts toward requests per second, including requests to the Tasks routes. Requests from the Meshy web app don't count.
The concurrent tasks limit counts tasks, not requests. Every endpoint that creates a task checks this limit before it creates one. For example, Text to 3D, Image to 3D, Multi-Image to 3D, Retexture, Remesh, Rigging, Animation, Text to Image, and the 3D printing endpoints check it.
Requests that don't create a task don't count toward it. For example, Balance, Usage, and requests to the Tasks routes don't count.
Whose limits apply
The following table shows whose limits your API keys, the Playground, and the web app count toward:
| Where you work | Personal account | Team |
|---|---|---|
| API keys | Your limits | The team's limits, shared by every API key in the team |
| Playground | Your limits | Your own limits as the signed-in member |
| Web app | Your concurrent tasks | Your own concurrent tasks. Tasks the team owner starts also count toward the team's limits. |
When you reach a limit
When you go over a limit, the API returns 429 Too Many Requests with the type rate_limited. The error's code tells you which limit you reached:
code | Limit you reached | What to do |
|---|---|---|
rate_limit_exceeded | Requests per second | Wait the number of seconds in the Retry-After header, then retry. |
pending_task_limit_reached | Concurrent tasks | Wait for one of your tasks to finish, then create the next one. |
concurrent_task_limit_reached | The tasks that can run without credits, on an unlimited plan with no credits left | Wait for a task to finish, or top up. |
Only rate_limit_exceeded comes with a Retry-After header. Branch on code, not on message, because the wording can change. Meshy may add codes, so handle a code you don't recognize by its type. For every code, see Request error codes.
For example, a request over the per-second limit returns this body:
429 Too Many Requests
{
"type": "rate_limited",
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded",
"doc_url": "https://docs.meshy.ai/en/api/v2/rate-limits#how-limits-work"
}
Rate limit headers
API responses include these headers to help you pace your requests:
| Header | Description |
|---|---|
X-RateLimit-Limit | Requests allowed per second on your plan. |
X-RateLimit-Remaining | Requests left in the current second. |
X-RateLimit-Reset | Seconds until your budget is full again. |
Retry-After | Seconds to wait before your next request. Sent with a 429 whose code is rate_limit_exceeded. Also sent with the 202 that creates a task, and when you get a task, while the task is PENDING or IN_PROGRESS. On the 202, it's how long to wait before you first poll the task's Location. |
When Retry-After is present, wait that many seconds before you send the next request. For how to follow a task until it finishes, see How a task runs.