Skip to main content
These pages describe the Training API on dev, where authenticated creation, editing, downloads, revert, and website brand lookup have been tested live. Production availability is not confirmed. Your API service and worker must both run the updated code. See Testing and availability.
POST {API_BASE}/v1/edits Submit a specific instruction, then poll the edit. The target video must be accessible in the key’s workspace, have a saved planner, and be in an editable state. Initial generation must finish first. Locked preview scenes must be unlocked through the existing completion flow.
Set EDIT_REQUEST_ID once per logical edit, for example to a UUID, and retain it for retries.

Request

Reference images must be direct public HTTPS PNG, JPEG, or WebP files, or imported images owned by the caller’s workspace. Public images are copied into caller-owned storage. Images are limited to 10 MB and 25 megapixels; redirects and unsafe/private hosts are rejected with 422. Changing the aspect ratio returns 422. Use the app’s reformat flow to change format.

Response and retries

HTTP 202 returns:
The initial status can also be queued when the video has another edit in flight. Acceptance does not mean the edited video is ready. The optional Idempotency-Key header caches the accepted response for 24 hours, scoped by user and organization. Retry with the same key and the same body. A different body with a cached key returns 409. Access to the video is checked again on retries. A durable uniqueness check prevents concurrent identical keys from appending duplicate edits. A concurrent request can receive 409 before the accepted response is cached; poll the original edit.

Applying the edit

The worker approves a proposed edit plan explicitly and applies the changes through the rendering flow. Frame changes already committed by editing tools are not regenerated a second time. If the instruction requires missing information, the edit fails with a clarification message. Supply the missing details in a new request with a new idempotency key. Check result.video_synced to distinguish an applied render from a planner-only result.

Credit policy

Edits use the current free-edit policy. The previous per-scene edit pricing and worst-case credit preflight do not describe this update. A missing subscription record alone does not reject a credit-exempt edit. API entitlement and locked-preview restrictions still apply; creation remains subject to its own billing rules. See Errors and Rate limits. Malformed video identifiers return 422 before any edit lookup or submission. Duplicate idempotency keys cannot append another pending edit. If the short-lived response cache has expired but the durable edit record still owns the key, the API returns 409; poll the original edit. Submission-storage failures return a sanitized 503, with an edit ID when a pollable record exists.