API overview
Authentication, idempotency, rate limits, pagination, variables and error semantics for the Automotion /v1 API.
The Automotion API is a small REST surface under a single base URL:
Requests and responses are JSON (camelCase fields, ISO-8601 dates, explicit
nulls). The full surface is described by an OpenAPI 3.1 document generated
from the same schemas the server validates with — the endpoint pages
(Renders, Templates,
Assets, Usage) are generated from it,
so they cannot drift from behavior.
Authentication
Every request carries an API key as a bearer token:
- Keys look like
am_live_…oram_test_…(40 random characters) and are created in the dashboard. The secret is shown once; only a hash is stored. - Any authentication failure — missing header, malformed, unknown or revoked
key — answers the identical
UNAUTHORIZEDenvelope. Responses never reveal whether a key exists. - Rolling a key creates the replacement before revoking the old one, so a failed roll never leaves you keyless.
Idempotency
Render-creating endpoints (POST /renders, POST /templates/{id}/renders)
accept an Idempotency-Key header:
- Same key + same body within 24 h → the original render is returned with
200(no new render is created). - Same key + different body →
IDEMPOTENCY_KEY_REUSED(409). - A request that fails stores nothing — retrying with the same key is safe.
Use a deterministic key per logical unit of work (order-1234-v1) and retries
— network blips, worker restarts, replayed queue messages — can never
double-render.
Rate limits
Requests are rate-limited per API key over a sliding window:
| Plan | Requests / minute |
|---|---|
| Trial | 60 |
| Starter | 300 |
| Pro | 600 |
| Studio | 1200 |
Every authenticated response carries the current window state:
X-RateLimit-Reset is epoch seconds. Exceeding the limit answers 429
RATE_LIMITED; back off until the reset time.
Separate from request rates, your credit balance funds all consumption
(10 credits per render minute, 1 credit per AI image generation) and is
enforced at render creation together with the concurrency cap — see
INSUFFICIENT_CREDITS and
CONCURRENCY_LIMIT, and check
GET /v1/usage for your live balance.
Pagination
List endpoints (GET /renders, GET /templates) take page (1-based) and
page_size (≤ 100, default 20) and answer a uniform envelope:
Ordering is newest-first and stable (createdAt desc, id desc). GET /renders additionally filters by status, created_after and
created_before (inclusive ISO-8601 bounds).
Variables
Movie documents may declare typed {{variables}} and reference them in any
string value; renders resolve them from the request's variables object,
falling back to declared defaults. The rules (declaration, lossless coercion,
escaping literal braces with {{{{name}}}}) are covered in the
data-driven guide and the
movie settings reference.
Errors
Every non-2xx response is the same envelope:
codeis stable and machine-matchable — every code is documented in the error catalog, anddocsUrllinks straight there.path(present when applicable) is the exact JSON path of the offending field, e.g.scenes[2].elements[0].src.requestIdalso arrives as theX-Request-Idresponse header — include it in support requests.- Document validation returns everything at once: an additional
errorsarray lists ALL findings (erroris alwayserrors[0]), so one request surfaces every problem in the document.
The HTTP status is determined by the code (400 validation, 401 auth, 402
credits, 404 not found, 409 idempotency conflict, 422 asset problems, 429 rate
limiting, 5xx platform faults). A failed render carries the same error shape
in its error field.
Drafts, watermarks and retention
"draft": truein the movie renders fast, low-res, watermarked, at half the credit cost — iterate on drafts, finalize without.- Trial renders are always watermarked.
- Outputs expire (
expiresAton the render): 30 days on Trial, 90 days on Starter and Pro, 365 days on Studio. Copy the MP4 to your own storage if you need it longer.
OpenAPI document
The machine-readable OpenAPI 3.1 description (the source of these reference
pages and of the TypeScript SDK) ships with the schema package as
@automotion/schema/openapi.json.