Skip to main content

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:

EndpointLimit
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 key20 a minute
Listening exports20 a minute
Import listening posts by URL10 a minute

Headers​

Answers carry the standard rate-limit headers:

HeaderDescription
X-RateLimit-LimitRequests allowed in the window.
X-RateLimit-RemainingRequests left in the window.
Retry-AfterOn a 429: seconds to wait before retrying.
X-RateLimit-ResetOn a 429: when the window resets, as a Unix timestamp.
429 rate_limited
{ "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:

CodeStatusWhat to do
concurrent_runs_limit_exceeded429Wait for a run to finish, or upgrade the plan.
daily_runs_limit_exceeded429Wait, 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​

  1. Read Retry-After and wait that many seconds.
  2. Retry with backoff and some jitter. Keep the same Idempotency-Key for writes (see Idempotency).
  3. Spread bursts out: batch with bulk endpoints, page with larger per_page, and use webhooks instead of polling.
Retry on 429
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