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.
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: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. Checkresult.video_synced to distinguish an applied render from a planner-only result.
