Rate limits

Every key has its own request budget, and the public routes have a smaller one per address. This page covers what counts, what the headers say and how to back off. The short version is on the authentication page.

For AI agents: the docs index is at /llms.txt, and every page is also served as markdown at its URL plus .md.

#The limit on each key

Authenticated routes allow 200 requests per 10 seconds for each API key. The counter is a bucket that holds up to 200 requests and refills steadily, so a burst of 200 is allowed when the bucket is full, and after that you can keep going at the refill pace.

The bucket belongs to the key, not the account. Two keys on one account have separate buckets, and a request with a missing or invalid key is refused with 401 unauthorized before it reaches the limiter.

Every call counts as one request, reads and writes alike. A call to the MCP endpoint (POST /v1/mcp) counts as one request on the key; the tool calls it runs for you are not counted a second time.

#Headers on authenticated responses

Authenticated responses, including refusals, carry the state of the key's bucket after the request.

HeaderMeaning
X-RateLimit-LimitThe size of the bucket: the most requests you can send at once.
X-RateLimit-RemainingWhole requests left right now, after this one.
X-RateLimit-ResetUnix time in seconds when the bucket is full again.
Retry-AfterOnly on a refused request: whole seconds to wait before you try again.
A successful response
HTTP/1.1 200 OK
X-Request-Id: req_...
X-RateLimit-Limit: 200
X-RateLimit-Remaining: 199
X-RateLimit-Reset: 1767225610

Read X-RateLimit-Remaining to slow down before you hit the limit. You never need to compute a wait yourself; Retry-After gives it to you.

#Limits on public routes

Routes that need no key are limited per client address instead: 60 requests per 60 seconds. An IPv6 address is counted as its /64 block, so rotating inside one block does not give you a fresh budget. The same headers come back, and a refusal is the same 429 rate_limited with Retry-After.

This applies to the pointer at /, /openapi.json, /llms.txt, /docs/{name} and the two mailbox sign-in callbacks.

Four routes are never refused for load: GET /health, GET /unsubscribe/{token}, POST /unsubscribe/{token} and POST /v1/billing/webhook. An unsubscribe click and a payment event must always get through.

#What a 429 looks like

Over the limit the API answers 429 rate_limited. The request did nothing and charged nothing, so it is safe to send again unchanged.

A refused request
HTTP/1.1 429 Too Many Requests
Retry-After: 3
X-RateLimit-Limit: 200
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1767225613

{
  "error": {
    "code": "rate_limited",
    "message": "Too many requests for this API key.",
    "fix": "Wait the number of seconds in the Retry-After header, then retry. Spread requests out to stay under the X-RateLimit-Limit value.",
    "docs_url": "/docs/errors#rate_limited",
    "retryable": true,
    "request_id": "req_..."
  }
}
  • message: Too many requests for this API key.
  • fix: Wait the number of seconds in the Retry-After header, then retry. Spread requests out to stay under the X-RateLimit-Limit value.
  • retryable is true: a 429 always clears by waiting.

The full list of error codes is on the errors page.

#Backing off in code

On a 429, sleep for the Retry-After value, then send the same request again. Add a little random jitter so many workers that were refused together do not all return at the same moment. Give up after a handful of attempts and surface the error.

Node
const base = 'https://api.coldagentai.com';
const headers = { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}` };

async function call(path, init = {}, attempts = 5) {
  for (let attempt = 1; ; attempt += 1) {
    const res = await fetch(base + path, { ...init, headers: { ...headers, ...init.headers } });
    if (res.status !== 429 || attempt === attempts) return res;
    // Retry-After is whole seconds. Add a little jitter so parallel workers do not wake together.
    const wait = Number(res.headers.get('retry-after') ?? '1') + Math.random();
    await new Promise((r) => setTimeout(r, wait * 1000));
  }
}

const res = await call('/v1/campaigns');
if (!res.ok) throw new Error(`${res.status}`);
console.log(await res.json());
Python
import os
import random
import time

import requests

base = "https://api.coldagentai.com"
headers = {"Authorization": f"Bearer {os.environ['COLDAGENTAI_API_KEY']}"}


def call(method, path, attempts=5, **kwargs):
    for attempt in range(1, attempts + 1):
        res = requests.request(method, base + path, headers=headers, timeout=30, **kwargs)
        if res.status_code != 429 or attempt == attempts:
            return res
        # Retry-After is whole seconds. Add a little jitter so parallel workers do not wake together.
        time.sleep(float(res.headers.get("Retry-After", "1")) + random.random())


res = call("GET", "/v1/campaigns")
res.raise_for_status()
print(res.json())

#Autopilot runs and daily caps

Creating autopilot runs has a limit of its own: at most 5 runs can be created in any rolling 24 hours. Past the cap, POST /v1/autopilot/runs returns 429 rate_limited and tells you to wait for the 24 hour window to move on. Creating a run while another still waits for approval returns 400 invalid_input; approve or cancel the first.

This refusal comes from the run count, not from the key's bucket. Retrying within seconds will not help. See Autopilot for how a run moves from plan to approval.

Two other routes have a daily cap per account that resets at midnight UTC: GET /v1/tools/email-pattern and POST /v1/replies/{id}/draft. Each answers 429 rate_limited with Retry-After.

#Guidance for agents

  • Give each agent its own key. Buckets are per key, so one busy agent cannot starve the others, and a key can be revoked on its own.
  • Honor Retry-After. Do not substitute a shorter fixed sleep.
  • Never retry in a tight loop. Every retry after a 429 still counts against the bucket.
  • Page with the largest page size a list allows, so one call does the work of many. See pagination.
  • Check X-RateLimit-Remaining on batch jobs and pause when it nears zero instead of running into the wall.
  • Retry only what is marked retryable on the error body, and only for a bounded number of attempts.
Rate limits