Developers
API quickstart
Create an AutoReel API key, make your first request, run a model generation, upload a file and build and export a reel from your own code.
On this page
From zero to your first generation with the AutoReel API. You need a workspace on the Pro or Agency plan and the admin or owner role.
1. Create an API key
- In your workspace, open Settings → API keys and click to create a key.
- Name it, choose its scopes (for example
generations:writeandgenerations:read) and, if you like, when it expires. - Copy the key. It starts with
ar_live_and is shown only once; we keep only a hash of it.
Store it as an environment variable, never in client-side code:
export AUTOREEL_API_KEY="ar_live_…"
2. Make your first request
Check that the key works by reading your credit balance:
curl https://autoreel.app/api/v1/credits \
-H "Authorization: Bearer $AUTOREEL_API_KEY"
The response shows your balance, split into plan and purchased credits.
3. Pick a model
List the models you can run, optionally by category:
curl "https://autoreel.app/api/v1/models?category=text_to_video" \
-H "Authorization: Bearer $AUTOREEL_API_KEY"
Each model has an id (use it as model), its inputSchema (the parameters it takes) and its defaults. available is false for premium models your plan doesn't include.
4. Run a generation
curl https://autoreel.app/api/v1/generations \
-H "Authorization: Bearer $AUTOREEL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 6d0f3c52-first-clip" \
-d '{
"model": "MODEL_ID_FROM_STEP_3",
"params": { "prompt": "A barista pours latte art in slow motion, warm morning light" }
}'
The response is the generation: its id, status (queued at first), estimatedCredits and, once finished, outputs with download links.
Idempotency. Send a unique Idempotency-Key with every create request. If the network drops and you retry with the same key, you get the first response back instead of a second (billed) generation.
5. Wait for the result
Either poll the generation:
curl https://autoreel.app/api/v1/generations/GENERATION_ID \
-H "Authorization: Bearer $AUTOREEL_API_KEY"
until status is completed (or failed, canceled, timed_out, in which case nothing is charged), or better, subscribe a webhook to generation.completed and generation.failed. Output download links are valid for an hour; fetch the generation again for fresh ones.
6. Use your own files
Media parameters never take URLs. Upload the file first:
POST /v1/fileswith thefilename,contentTypeandsizeBytes. You get the file'sid, arefand anuploadUrl.PUTthe bytes touploadUrl.POST /v1/files/{id}/complete.- Pass the
ref(asset:followed by the file id) as the media parameter, for example as a model'simage.
7. Build and export a reel
POST /v1/reels takes the same build settings as the Studio's UGC, slideshow and hook + demo pages, and an optional template id. Follow the build with GET /v1/reels/{id} (or the reel.ready webhook), then export it with POST /v1/reels/{id}/export and a resolution of 720p or 1080p. The reel also has an editorUrl, so a person can fine-tune it in AutoReel.
Errors to handle
| Status | Code | What to do |
|---|---|---|
| 401 | UNAUTHENTICATED | Check the key and the Authorization header |
| 402 | INSUFFICIENT_CREDITS | Top up or turn on auto-refill |
| 403 | FORBIDDEN, ENTITLEMENT_REQUIRED | The key lacks a scope, or the plan doesn't include the feature or model |
| 422 | VALIDATION | Fix the fields listed in fieldErrors |
| 429 | RATE_LIMITED | Wait for Retry-After seconds |
Every endpoint, schema and example is in the API reference.
Still stuck? Email [email protected] and a person will get back to you.