Generate a video with AI
generate_videoStart an AI video generation job (text-to-video, image-to-video, or an avatar reading a script). ASYNCHRONOUS: it returns a jobId; poll get_media_job until status is "done" to obtain the URL. Generation usually takes 1-5 minutes. Requires a provider configured by the organization (see list_media_providers). For a reel or Short, start with get_reel_playbook (the reel is built there); a clip from here can be one of its beats. This is one of the two ways; the other is Ignix Creator (get_creator_setup), with Ignix AI credits and no key. Ask which one only when both are available; otherwise use the one there is (no provider → Creator). Write a scene prompt following get_shot_guide("h3_clip"); with shot the server composes it and checks the minimum fields. SPENDS AI CREDITS ONLY WITH confirm: true. Call it first without confirm: nothing runs and nothing is charged, you get the quote (what it will do and the credits). Tell the user, in your own words, exactly that — including the options you chose, so they can change them — and wait for a clear yes before calling again with the same arguments and confirm: true. One yes covers the plan they approved (e.g. every line of an approved voice-over with the chosen voice); anything new or different needs a new yes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| shot | No | Optional structured shot: the server composes the prompt from it (after `prompt`, if any) and checks the minimum fields of its type (get_shot_guide). | |
| aspect | No | Aspect ratio. Use 9:16 for reels, shorts and TikTok. | |
| prompt | No | For video providers: the scene to generate (optional with `shot`). For avatar providers: the exact SCRIPT the avatar will say. | |
| confirm | No | true ONLY after the user said yes to the quote (what it does and the credits). Without it nothing runs and nothing is charged. | |
| quality | No | Quality/cost trade-off, on the client's own key: 'high' = Kling pro mode / Veo 1080p (16:9 only, forces 8s); 'eco' = Veo fast model (fewer credits). Other providers ignore it. | |
| voiceId | No | Voice for avatar providers. | |
| avatarId | No | Avatar to use. Required for avatar providers (see list_avatar_options). | |
| imageUrl | No | Starting image for image-to-video (only providers with supportsImage). | |
| provider | Yes | Provider id from list_media_providers. | |
| background | No | Solid background colour as #rrggbb hex (HeyGen avatar videos only). | |
| workspaceId | No | Workspace to work on (an id from list_workspaces). Not needed when this connection is tied to one workspace, or when you pass an account: the account's workspace is used. | |
| attachToPostId | No | Optional: attach the finished video to this post automatically when the job ends. | |
| idempotencyKey | No | Optional. A unique id for this action (16-128 chars: letters, digits, _ : . -). If you are unsure whether a call went through (timeout, network error), repeat it with the SAME idempotencyKey and the same arguments: you get the original result and nothing is done twice. | |
| negativePrompt | No | What to AVOID in the video (Kling only; e.g. "on-screen text, crowds"). | |
| durationSeconds | No | Length in seconds where the provider allows choosing: 5 or 10 (Runway, Kling); 4, 6 or 8 (Veo). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jobId | No | ||
| status | No | ||
| promptTip | No | ||
| confirmToken | No | ||
| promptWarnings | No | What the server checked and found missing (warnings: it still generated). needs_customer_fact = ask the person before the next one. | |
| estimatedCredits | No | ||
| needsConfirmation | No | true = this is only the quote: nothing was done or charged. |