Core concepts
Rate limits
How many requests a minute the API accepts, the headers that report your limit, how to handle a 429, and the limit on agent runs in progress at once.
This edition is written for AI agents: complete, explicit and ready to paste. Give it to your agent, or point the agent at its address and it reads the page itself.
# Rate limits
> How many requests a minute the API accepts, the headers that report your limit, how to handle a 429, and the limit on agent runs in progress at once.
- Human-readable page: https://dashboard.sproutsdata.ai/docs/guides/rate-limits
- This document: https://dashboard.sproutsdata.ai/docs/agents/guides/rate-limits
- Index of every agent document: https://dashboard.sproutsdata.ai/llms.txt
- API base URL: https://api.sproutsdata.ai
## Summary
Per-minute request limits per workspace per endpoint, reported in response headers. Over the limit: 429 `quota.burst_exceeded` with `Retry-After`. Separate limits on agent runs and tool runs in progress at once.
## Rules
- Window: sliding 60 seconds. A refused request is not counted and not run, so never charged.
- Default: 60 requests a minute per workspace per endpoint (endpoint = method + path template, for example `POST /v1/search`).
- Polling endpoints default to 600 a minute: `GET /v1/agents/runs`, `GET /v1/agents/runs/{run_id}`, `GET /v1/agents/runs/{run_id}/results`, `GET /v1/agents/runs/{run_id}/events`, `GET /v1/enrichment/jobs`, `GET /v1/enrichment/jobs/{job_id}`, `GET /v1/enrichment/jobs/{job_id}/results`, `GET /tools/v1/runs`, `GET /tools/v1/runs/{run_id}`, `GET /tools/v1/runs/{run_id}/events`.
- All of a workspace's keys share the workspace limit. Sprouts Data may set other limits per workspace, per endpoint, or per API key; a request must fit every limit that applies.
- Read the real limit from headers, not from these defaults.
## Headers
Sent on every response where a limit was checked (success or 429). Both sets carry the same values.
| Header | Value |
| ---------------------------------------------- | ---------------------------------- |
| `X-RateLimit-Limit`, `RateLimit-Limit` | Requests allowed per window. |
| `X-RateLimit-Remaining`, `RateLimit-Remaining` | Requests left in the window. |
| `X-RateLimit-Reset`, `RateLimit-Reset` | Seconds until the window has room. |
| `Retry-After` (on 429 and 503) | Seconds to wait before retrying. |
## 429 handling
- Body `code`: `quota.burst_exceeded`. `extra`: `limit` (number), `window` (`minute`), `operation` (`METHOD /path`), `scope` (`workspace`, `api_key` or `user`), `retry_after` (seconds).
- Wait at least `Retry-After` seconds, add random jitter, then retry. Without the header, back off exponentially (1, 2, 4, 8 s). Cap attempts.
- Prevention: spread requests evenly; use larger pages (`limit` up to 100 on search-style routes); watch `RateLimit-Remaining`.
## Concurrency limits
- Agent runs: default 2 in progress at once per credential (API key). A third `POST /v1/agents/runs` answers 429 `quota.concurrency_exceeded` with `Retry-After` (30 s by default). The same code is returned when the research engine is at capacity. Wait for a run to finish.
- Tool runs: per workspace in-flight limit. `POST /tools/v1/runs` over it answers 429 `tools.too_many_runs` with `Retry-After`.
- Polling a run counts only toward the polling rate limit, not toward concurrency.
## Capacity
- 503 `service.overloaded`: the API is at capacity; not run. Retry after `Retry-After`.
## Example
```python
import os, random, time, requests
def post(url, body, attempts=5):
headers = {"X-API-Key": os.environ["SPROUTS_API_KEY"]}
for attempt in range(attempts):
response = requests.post(url, headers=headers, json=body)
if response.status_code != 429:
response.raise_for_status()
return response.json()
time.sleep(int(response.headers.get("Retry-After", 2**attempt)) + random.random())
raise RuntimeError("Still rate limited")
```
## See also
- `https://dashboard.sproutsdata.ai/docs/agents/guides/errors`
- `https://dashboard.sproutsdata.ai/docs/agents/guides/errors/codes`
- `https://dashboard.sproutsdata.ai/docs/agents/guides/agent-runs`