https://app.yuzulabs.io/api/v1
All endpoints require Bearer authentication and a workspace with at least one ready avatar, a configured voice, and remaining quota.
Lifecycle
| Status | Description |
|---|---|
pending | Flow accepted, queued. |
generating_script | Drafting the video script. |
pending_approval | Awaiting a human approve / edit / reject (only when autoApproveScript: false). |
segmenting | Breaking the script into scenes. |
voice_generating | Producing the voiceover. |
video_generating | Rendering the avatar + scenes. |
completed | videoUrl available. |
failed | Permanent error — see error. |
cancelled | Cancelled by user or timeout. |
Endpoint summary
| Method | Path | Scope |
|---|---|---|
POST | /v1/flows/sales-email-video | flows:create |
GET | /v1/flows/sales-email-video | flows:read |
GET | /v1/flows/sales-email-video/{flowId} | flows:read |
POST | /v1/flows/sales-email-video/{flowId}/approve | flows:approve |
DELETE | /v1/flows/sales-email-video/{flowId} | flows:cancel |
POST Create flow
POST /v1/flows/sales-email-video
Creates a flow and starts script generation. The response returns immediately with a flowId you can poll.
Body parameters
Sales-call summary in plain text. Minimum 50 words. Becomes the input for script generation.
When
true, the flow proceeds straight from generating_script to segmenting. When false, it stops at pending_approval until you call the /approve endpoint.Convex ID of the avatar to render. Defaults to the first ready 16:9 avatar in your workspace.
ElevenLabs voice ID. Defaults to the workspace’s configured voice.
Prospect’s first name. Used in the script’s greeting.
Prospect’s company name.
Sender’s name. Defaults to the API key’s owner.
Sender’s company. Defaults to the workspace name.
Video title shown in the dashboard. Auto-generated from the prospect name when omitted.
Response
true on accepted requests.Convex ID. Use this to poll status, approve, or cancel.
Always
pending for newly created flows.Human-readable confirmation.
GET List flows
GET /v1/flows/sales-email-video
Returns flows visible to the API key, most recent first. Useful for dashboards and reconciliation jobs.
Query parameters
Page size. Maximum 100.
Continuation cursor from a previous response.
Filter by a single status (e.g.
completed, pending_approval).Response
Array of flow summaries. Each entry contains
flowId, status, createdAt, title, and videoUrl (when completed).Present when more results are available.
GET Get flow
GET /v1/flows/sales-email-video/{flowId}
Returns the current status of a single flow. Poll this every few seconds while the flow is in progress.
Path parameters
The flow ID returned from the create endpoint.
Response
One of the lifecycle states above.
ISO-8601 timestamp.
ISO-8601 timestamp. Only present once
status is completed.Direct CDN URL to the rendered MP4. Only present once
status is completed.Duration in seconds.
Final script. Available from
pending_approval onwards.Per-scene breakdown:
index, text, durationEstimate. Available from segmenting onwards.Failure reason. Only present when
status is failed.POST Approve, edit, or reject script
POST /v1/flows/sales-email-video/{flowId}/approve
Only valid while the flow is in pending_approval. Use it to advance, edit, or kill a draft script.
Path parameters
Body parameters
Either
"approve" or "reject".Replacement script. Honored only when
action: "approve". If omitted, the draft script proceeds unchanged.Response
After approval, transitions to
segmenting. After rejection, transitions to cancelled.DELETE Cancel flow
DELETE /v1/flows/sales-email-video/{flowId}
Cancels a flow in any non-terminal state. Already-rendered videos are kept; in-flight rendering is aborted.
Path parameters
Response
Always
cancelled on success.