BeatAPI Quick Guide
Quick Guide
BeatAPI uses one server-side API key across Workflow, Realtime, Video, Image, and Effect APIs. Start with the three steps below, then use the rest of this guide for shared task fields, uploads, limits, and production errors.
First task in three steps
1. Create an API key
Create a key in Dashboard → API Keys, then load it into your shell without placing it in command history:
All requests use the https://api.beatapi.io base URL and this header:
2. Create a task
This minimal image request uses POST /v1/images/tasks:
A valid request returns 201 Created. Save the returned data.id.
3. Poll the result
Replace task_8K2qA with the data.id from step 2. Poll every 5–10 seconds with jitter. On succeeded, read data.output.media and stop polling. On failed, read data.error_code and data.error_message, then stop polling.
Keep permanent API keys on trusted servers. Never place them in browser code, mobile code, scripts, logs, or screenshots. Realtime browsers receive only a short-lived client_secret created by your server.
Choose an API
With the exception of Realtime, create operations return an asynchronous Task. Store data.id, then poll the shared task endpoint. The task endpoint allows up to 120 requests per minute per API key.
Get task status
GET /v1/tasks/{task_id}
Status values
Normalized Task fields
Usage and output fields
Upload an input file
POST /v1/files
Use file upload when an input is local instead of already available at a public HTTPS URL.
Multipart fields
You may also send the raw file body with its asset Content-Type.
PDF, generic text, octet-stream, video, and ZIP uploads are not supported. Workflow input URLs cannot be localhost, private-network, or data URLs.
File response
Use data.url in the model or workflow request. Audio task limits still apply: Standard Music Video accepts 10–180 seconds; Premium accepts 10–300.
Check usage and limits
GET /v1/usage
This authenticated endpoint has no parameters.
Breakdown item fields:
Music Video tasks paused at storyboard_ready or requires_action can have settled credits without counting as active processing work.
Errors and retry policy
Public error codes
BeatAPI exposes only the stable public codes below. Internal provider errors are normalized and are never part of the customer contract. These values appear in response error.code. Terminal asynchronous failures may also return the applicable value in task error_code.
Idempotency differs by endpoint:
- Realtime Session create requires
Idempotency-Key(1–128 characters). - Workflow, Image, Video, and Effect task creation accept an optional key. Reuse a key only with the exact same logical request body.
- Image, Video, and Effect keys are documented with a maximum of 255 characters. Workflow keys should be kept concise for cross-database compatibility.
Production checklist
- Use the exact
https://api.beatapi.ioorigin. - Keep permanent API keys on trusted servers.
- Validate required/optional fields, enums, limits, and conditional rules from the selected API page.
- Store task/Session IDs and
request_idbefore starting background work. - Poll with jitter and stop at the documented terminal or action state.
- Honor status codes,
Retry-After, andretry_after_seconds. - Verify webhook signatures against raw bytes before JSON parsing.
- Record credit reservations, settlements, refunds, errors, and final output URLs.
- Review the Privacy Policy and Terms of Service before processing cameras, faces, voices, or reference assets.

