Rate limits
Lantfly limits how fast you can call the API and how much work an account runs at once. A limit answers 429 Too Many Requests.
Request budget
Each caller has a budget of 600 requests a minute across /api/v3 and the MCP server. The budget is counted per
authenticated caller, not per token; unauthenticated requests share a budget per client address.
Some endpoints have a tighter limit of their own, counted separately for each endpoint. The API reference states them. Examples:
| Endpoint | Limit |
|---|---|
Bulk actions (…/bulk) | 20 a minute |
Webhook test (POST /webhooks/{id}/test) | 10 a minute |
Webhook redelivery (POST /webhooks/{id}/dispatches/{dispatch}/redeliver) | 30 a minute |
| Rotate a storage signing key | 20 a minute |
| Listening exports | 20 a minute |
| Import listening posts by URL | 10 a minute |
Headers
Answers carry the standard rate-limit headers:
| Header | Description |
|---|---|
X-RateLimit-Limit | Requests allowed in the window. |
X-RateLimit-Remaining | Requests left in the window. |
Retry-After | On a 429: seconds to wait before retrying. |
X-RateLimit-Reset | On a 429: when the window resets, as a Unix timestamp. |
{ "error": { "code": "rate_limited", "message": "…" } }
Concurrent and daily runs
Your plan sets how many runs can be waiting or running at once, and may set how many runs can start in 24 hours. Starting one more answers:
| Code | Status | What to do |
|---|---|---|
concurrent_runs_limit_exceeded | 429 | Wait for a run to finish, or upgrade the plan. |
daily_runs_limit_exceeded | 429 | Wait, or upgrade the plan. |
These aren't request limits: retrying immediately won't help. Poll the runs you have, or use a webhook to learn when one finishes.
Waiting requests
Requests that hold a connection open while they wait (an MCP tool call with wait_secs, and
Actor Standby) share a pool of 5 waiting requests per account. A sixth answers 429 rate_limit_exceeded with Retry-After: 5 on Standby, or a tool error on MCP. Ask for shorter waits, or call without
waiting and poll.
Handle 429
- Read
Retry-Afterand wait that many seconds. - Retry with backoff and some jitter. Keep the same
Idempotency-Keyfor writes (see Idempotency). - Spread bursts out: batch with bulk endpoints, page with larger
per_page, and use webhooks instead of polling.
import os
import random
import time
import requests
def get(url, **kwargs):
headers = {"Authorization": f"Bearer {os.environ['LANTFLY_TOKEN']}"}
for attempt in range(5):
res = requests.get(url, headers=headers, timeout=30, **kwargs)
if res.status_code != 429:
return res
wait = int(res.headers.get("Retry-After", 2 ** attempt))
time.sleep(wait + random.random())
res.raise_for_status()
return res