The API enforces rate limits at two levels: a per-key burst limit and a per-account daily quota.
Burst limits
Endpoints that are rate limited send X-RateLimit-* headers on every response,
including successful ones:
| Request group | Limit |
| ------------- | ----- |
| Poster generation (POST /posters/generate) | 10 requests per minute per key |
| Async job polling (GET /posters/{id}) | 120 requests per minute per key |
| Map creation (POST /maps) | 20 requests per minute per key |
| Comments (create/update/delete) | 5 requests per minute per key |
| Votes | 10 requests per minute per key |
| Public sandbox key (all endpoints) | 60 requests per minute |
Only endpoints wrapped by the rate limiter send the X-RateLimit-* headers —
the write endpoints above and the async poll endpoint. Most read-only endpoints
(GET /maps, GET /styles, GET /geocode, GET /random-location,
GET /virtual-users, and the social reads) are not rate-limited per minute and
therefore do not send X-RateLimit-*.
POST /posters/generate also reports the daily quota once it has resolved it
(X-Quota-Limit, X-Quota-Remaining, X-Quota-Reset in Unix epoch seconds;
X-Quota-Remaining is the allowance left after this request). It is sent on
synchronous success/image responses, on 202 async accepts and on dry runs. A
daily-quota 429 also reports limit, used and tier in the body.
Daily quotas
Poster generations are metered per account over a rolling 24-hour window. A key's allowance follows the key owner's subscription:
| Plan | Poster generations per 24 hours | | ---- | ------------------------------- | | Explorer (free) | 10 | | Carto Plus | 500 | | Public sandbox key | 100 |
Usage is counted against the user making the request (including virtual users), while the allowance comes from the account that owns the key. Upgrading to Carto Plus raises the allowance immediately; cancelling drops it back to the free allowance once the subscription stops being active.
An asynchronous job is charged one unit when it is accepted (the 202) and the
unit is refunded when the job fails for a system reason. A dry_run is not
charged at all; polling a job does not consume quota. Dry runs and rejected
requests still consume their per-minute rate-limit slot.
Headers
These headers are sent only by the rate-limited endpoints listed above:
| Header | Meaning |
| ------ | ------- |
| X-RateLimit-Limit | Allowed requests in the current window |
| X-RateLimit-Remaining | Slots left after this request (0 on a 429) |
| X-RateLimit-Reset | Unix epoch seconds at which the window frees a slot |
| Retry-After | Seconds to wait before retrying: sent on 429, on the async 202, and on an in-flight job poll (mirroring poll_after_seconds; the poll body is authoritative) |
The rate-limit check itself is backed by the database. If that lookup fails, the
request returns 503 { "error": "Service Unavailable", "message": "Rate limit check unavailable" } instead of running the handler — retry shortly.
Authenticated /api/v1 responses are also sent Cache-Control: private, no-store.
Errors
HTTP-status-specific JSON bodies:
400 — validation failed (details.fieldErrors names the offending fields):
{
"error": "Invalid request",
"details": { "fieldErrors": { "camera": ["Too big: expected number to be <=20"] } }
}
Some validations use a stable top-level error code instead of details:
invalid_bounds, missing_location, fit_markers_requires_markers (framing),
invalid_track, track_too_large (with limits.max_points / limits.max_bytes),
transparent_requires_png (with supported: ["png"]),
transparent_requires_map_only, map_only_incompatible, Unknown style (with
valid_styles / valid_palettes, also used for an unknown top-level palette)
and Conflicting style and palette. An empty or over-long Idempotency-Key
header (must be 1-255 characters) is also a 400.
403 — Carto Plus feature: the request uses something the key's plan does not
include, for example custom markers, fit: "markers" or inline track routes on a
plan where those need Carto Plus:
{ "error": "Forbidden", "code": "custom_markers_require_plus", "message": "..." }
413 — request body too large: the raw body is capped at 2 000 000 bytes (large inline tracks can approach it):
{
"error": "payload_too_large",
"message": "Request body exceeds 2000000 bytes.",
"limits": { "max_bytes": 2000000 }
}
429 — rate limit or daily quota:
{
"error": "Too Many Requests",
"message": "Rate limit exceeded for generate. Limit: 10 requests per 60 seconds.",
"retry_after_seconds": 60
}
A daily-quota 429 adds limit, used and tier. The asynchronous per-key
concurrency cap uses the same status with code: "concurrency_limit", limit,
active, retry_after_seconds and a Retry-After: 10 header.
422 — the requested render cannot finish in time:
{
"error": "render_too_large",
"message": "flat maps finish ... up to a 3600 px long edge at pixelRatio 1. The requested output is 4800x7200 ... Retry at 2400x3600 or smaller.",
"retryable": false,
"max_dimensions": { "width": 2400, "height": 3600 },
"max_pixel_ratio": 1,
"request_id": "req_abc123"
}
504 — the render overran its deadline:
{
"error": "render_timeout",
"message": "The poster render did not finish within the function time limit.",
"retryable": true,
"hint": "Retry with a smaller output ...",
"request_id": "req_abc123"
}
500 — render or storage failure (renderer internals are never exposed):
{
"error": "render_failed",
"message": "The poster render failed.",
"retryable": true,
"request_id": "req_abc123"
}
On the asynchronous path, failures are data on the job, not an HTTP error:
GET /posters/{id} returns 200 with status: "failed" and
error: { code, message, retryable, request_id } using the same codes as the
synchronous errors (render_timeout, render_failed, storage_failed) plus
queue_timeout (accepted but never started) and job_expired (retention). A
failed submission also returns 500 when the job could not be enqueued, charged
or recorded — the job is rolled back, so an accepted render is never unmetered.
request_id is required when contacting support — it lets us trace the exact
request across the stack. Error responses never contain a MapLibre stack trace.
Recommended retry strategy
- Honor
Retry-Afterexactly. - Apply exponential backoff with full jitter on
5xx/429errors. - Stop retrying after 5 attempts and surface the error to the user.
- Do not blind-retry
400/403/413/422: change the request first. POST /posters/generatesupportsIdempotency-Key(header, 1-255 characters; honoured on the asynchronous path only): a repeat returns the original job withIdempotent-Replay: trueinstead of rendering and charging again, so a timed-out submission can be retried safely with the same key. Synchronous renders are not idempotent — poll an async job instead of resubmitting a synchronous request.- When an async render is still
queued/rendering, wait forpoll_after_secondsand pollGET /posters/{id}again rather than submitting a duplicate job.