curl --request POST \ --url https://easy-peasy.ai/api/generate-video \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "prompt": "A cat walks on the beach at sunset, cinematic lighting", "model": "MiniMax H3 Max", "duration": "5", "aspectRatio": "16:9", "resolution": "768p"}'
{ "id": 12345, "prompt": "A cat walking on the beach at sunset", "image_url": "", "model": "Veo 3.1 Fast", "is_video": true, "created_at": "2025-01-15T10:30:00.000Z"}
{
"error": "Invalid model selected"
}
{
"error": "Invalid API key"
}
{
"error": "This model is not available on the Free plan. Try Veo 3.1 or Seedance 2.0 Mini, or upgrade to unlock all models."
}
{
"error": "Invalid API key"
}
{
"error": "Invalid API key"
}
Video Generation
Generate Video
Generate videos from text, first/last frames, or reference media with MiniMax H3 Max, Seedance 2.5, Gemini Omni Flash 1.1, FLUX 3, WAN 3.0, Veo, Kling, and other models. The exact model title is required. See the video model reference for supported settings.
Generation is asynchronous. Save the returned id and poll Get Video with the same account’s API key. Paid plans require sufficient credits; free access is limited to selected variants and settings.
POST
/
api
/
generate-video
curl --request POST \ --url https://easy-peasy.ai/api/generate-video \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "prompt": "A cat walks on the beach at sunset, cinematic lighting", "model": "MiniMax H3 Max", "duration": "5", "aspectRatio": "16:9", "resolution": "768p"}'
{ "id": 12345, "prompt": "A cat walking on the beach at sunset", "image_url": "", "model": "Veo 3.1 Fast", "is_video": true, "created_at": "2025-01-15T10:30:00.000Z"}
{
"error": "Invalid model selected"
}
{
"error": "Invalid API key"
}
{
"error": "This model is not available on the Free plan. Try Veo 3.1 or Seedance 2.0 Mini, or upgrade to unlock all models."
}
The API supports MiniMax H3 Max, MiniMax H3, Seedance 2.5, Gemini Omni Flash 1.1, FLUX 3, WAN 3.0, Grok Imagine 1.5, and other video families. Use the video model reference to choose an exact variant and its supported inputs, durations, and resolutions.
The REST API requires model. The MCP generate_video tool defaults to MiniMax H3 Max when you omit it. REST fields use camelCase, such as aspectRatio and referenceVideos; MCP uses aspect_ratio and reference_videos.
Send one generation request and save its returned id. Generation runs asynchronously; an accepted request does not mean the video is ready. Most videos take a few minutes, and queues can take longer.
curl --fail-with-body -X POST https://easy-peasy.ai/api/generate-video \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "A cat walks along a beach at sunset, waves in the background, cinematic lighting", "model": "MiniMax H3 Max", "duration": "5", "aspectRatio": "16:9", "resolution": "768p" }'
MiniMax H3 Max accepts 5–15 whole seconds and 480p or 768p. MiniMax H3 accepts 4–15 whole seconds and 768p or 2k. Both families generate native audio; generateAudio: false does not disable it. Models with an audio toggle, such as Seedance 2.5, can accept generateAudio: false. Providing reference audio enables audio generation.
Send duration as a string. Veo 3.1 text variants accept "4s", "6s", or "8s"; their Image and First-Last Frame variants accept only "8s". Veo 3.1 does not accept five seconds. Equivalent strings such as "8" and "8s" are normalized by the API.
Select a model with a first-image input and send image. Adding an image does not automatically switch a text model to its image variant.
curl --fail-with-body -X POST https://easy-peasy.ai/api/generate-video \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "The subject slowly turns toward the camera in soft morning light", "model": "MiniMax H3 Max Image", "image": "https://yourcdn.com/first-frame.png", "duration": "5", "aspectRatio": "16:9", "resolution": "768p" }'
Add "tailImage": "https://yourcdn.com/last-frame.png" when you want a last frame and the chosen variant supports it. Check the Input column in the model catalog; model suffixes alone do not identify every input mode.
Reference variants use images to preserve subjects or style. Some also accept videos for motion or editing and audio for voice or sound guidance.This example uses a character image, a motion clip, and a voice clip. Replace the placeholder URLs with your own media. Keep each MiniMax H3 Max reference video and audio clip between 2 and 15 seconds, and each type’s combined duration at or below 15 seconds.
curl --fail-with-body -X POST https://easy-peasy.ai/api/generate-video \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "The character walks through the market with the motion from the video and speaks in the supplied voice", "model": "MiniMax H3 Max Reference", "referenceImages": [{ "url": "https://yourcdn.com/character.png" }], "referenceVideos": [{ "url": "https://yourcdn.com/motion.mp4" }], "referenceAudios": [{ "url": "https://yourcdn.com/voice.mp3" }], "duration": "5", "aspectRatio": "16:9", "resolution": "768p" }'
Use referenceImages, referenceVideos, and referenceAudios as arrays of { "url": "..." } objects.
referenceVideo is a single-URL alternative. If you supply the referenceVideos array, it takes precedence, including when empty.
Do not combine reference videos with image or tailImage. Audio references require a reference image or a supported reference video; they cannot accompany a first-frame image.
Limits differ by variant. MiniMax H3 Max Reference supports up to 9 images; Seedance 2.5 Reference supports up to 30. See reference limits for counts, durations, formats, and sizes.
referenceImages[].type is optional. Kling O1/O3 uses character, object, or style to assign reference roles; other families use general image references.
All input URLs must be downloadable server-side without browser cookies. A URL that works in your browser may still reject the provider with HTTP 403. Signed URLs must remain valid through queue delays and the provider’s download. Reference media can increase credit usage.
Call Get Video with the returned id and the same account’s API key every 15–30 seconds. Read video.url when video.status is completed.The following Node.js 20+ example checks HTTP errors, handles malformed responses, and stops after ten minutes. A local timeout does not cancel the generation; keep the ID so you can check it later.
async function waitForVideo(videoId, apiKey) { const deadline = Date.now() + 10 * 60 * 1000; while (Date.now() < deadline) { const response = await fetch( `https://easy-peasy.ai/api/get-video?video_id=${encodeURIComponent(videoId)}`, { headers: { 'x-api-key': apiKey }, signal: AbortSignal.timeout(Math.max(1, Math.min(30000, deadline - Date.now()))), } ); const data = await response.json().catch(() => null); if (!response.ok) { throw new Error(`Video ${videoId}: HTTP ${response.status}: ${data?.error || 'Could not retrieve video'}`); } if (data?.video?.status === 'completed' && data.video.url) { return data.video.url; } if (data?.video?.status !== 'processing') { throw new Error(`Unexpected response for video ${videoId}`); } await new Promise(resolve => setTimeout(resolve, Math.max(0, Math.min(15000, deadline - Date.now())))); } throw new Error(`Timed out waiting for video ${videoId}. Keep this ID and check it later.`);}
Verify the ID and account. Missing or deleted jobs, including some failed generations, return 404.
500 or a network timeout
Save any ID already received. Check the existing job before deciding whether to submit again.
Get Video currently exposes only processing and completed, so do not wait for a failed status. Submitting a new generation can create another billable job; a polling timeout is not a reason to recreate it automatically.
Required exact model title. See the video model reference for input modes, durations, resolutions, and reference limits. Adding media does not automatically switch model variants. https://docs.easy-peasy.ai/api-reference/video-models
Public URL of a first-frame image. Choose a variant with a first-image input in the video model reference. Model suffixes are not always enough: Grok Imagine 1.5 and Kling 2.5 Turbo Standard also require image. The URL must remain downloadable without browser cookies through queue delays.
Output length as a string, using the exact variant’s allowed durations. MiniMax H3 Max: 5–15 whole seconds; MiniMax H3: 4–15. Veo 3.1 text variants: 4s, 6s, 8s; Image and First-Last Frame variants: 8s only. Bare seconds and an s suffix are equivalent. If omitted, the API selects five seconds when listed, otherwise the first configured duration, or five seconds for models without a list. Provider-specific output lengths can differ.
Allowed resolutions depend on the exact variant. MiniMax H3 Max: 480p/768p; MiniMax H3: 768p/2k; Seedance 2.5: 480p/720p; Seedance 2.5 Turbo: 720p/1080p. Send a listed value explicitly; defaults vary by model. Use lowercase k for 2k and 4k. Omit when no resolution selector is listed.
Enable or disable generated audio only on models with an audio toggle. MiniMax H3 and H3 Max always generate native audio; false does not disable it. Supplying reference audio enables audio generation. Audio settings can affect credit usage.
Public URL of a last-frame image, paired with image. Use only a variant that supports a last image, such as MiniMax H3 Max Image or Seedance 2.5 Image. See the video model reference.
Array of reference images on supported variants. Reference models require at least one reference image or a supported reference video. Limits differ: MiniMax H3 Max Reference accepts up to 9 images; Seedance 2.5 Reference accepts up to 30. Some Veo variants also support optional references. See the video model reference.
Single reference video URL, on variants supporting reference video. Alternative to referenceVideos; the array takes precedence when supplied, even if empty.
Reference videos for supported variants only. Do not combine with image or tailImage. Counts, clip lengths, total duration, and file-size limits depend on the variant. MiniMax H3 Max Reference accepts up to 3 clips of 2–15 seconds, at most 15 seconds combined, and 20 MiB each. Seedance 2.5 Reference supports up to 3 clips of 2–30 seconds, at most 30 seconds combined, and 50 MiB each. Reference inputs can add credit charges.
Audio references for supported variants. Require a companion reference image or supported reference video, and cannot accompany image. Enable generated audio. MiniMax H3 Max Reference accepts up to 3 clips of 2–15 seconds and at most 15 seconds total. Seedance 2.5 Reference supports up to 10 MP3/WAV clips, 2–30 seconds each, at most 30 seconds total, and 15 MiB each. See the reference limits for other variants.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Easy-Peasy.AI Docs","colors":{"primary":"#6366F1","light":"#818CF8","dark":"#4F46E5"},"logo":{"light":"https://mintcdn.com/easy-peasyai/kLHRxZMJyyWSlR-b/logo/marky.png?fit=max\u0026auto=format\u0026n=kLHRxZMJyyWSlR-b\u0026q=85\u0026s=59994034f7c7508e0f18c4f7a40ea9b5","dark":"https://mintcdn.com/easy-peasyai/kLHRxZMJyyWSlR-b/logo/marky.png?fit=max\u0026auto=format\u0026n=kLHRxZMJyyWSlR-b\u0026q=85\u0026s=59994034f7c7508e0f18c4f7a40ea9b5","href":"https://easy-peasy.ai"},"favicon":"https://mintcdn.com/easy-peasyai/BzYZncJWg82D12rl/favicon.png?fit=max\u0026auto=format\u0026n=BzYZncJWg82D12rl\u0026q=85\u0026s=56baca1aff94e50c5f7a09f8c06fe351","appearance":{"default":"light"},"navbar":{"links":[{"href":"https://easy-peasy.ai/support","label":"Help \u0026 Support"}],"primary":{"type":"button","label":"Open dashboard","href":"https://easy-peasy.ai/dashboard"}},"footer":{"socials":{"x":"https://x.com/easy_peasy_ai","website":"https://easy-peasy.ai"}},"search":{"prompt":"Search the docs"},"styling":{"eyebrows":"section","latex":false},"contextual":{"options":["copy","view",{"title":"Open in Marky Agent","description":"Ask Marky about this page","icon":"/favicon.png","href":{"base":"https://easy-peasy.ai/chat","query":[{"key":"prompt","value":"Read from https://easy-peasy.ai/docs$path.md so I can ask questions about it."}]}},"chatgpt","claude","cursor"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"easy-peasyai","hasAudioNarration":false,"actualSubdomain":"easy-peasyai","customDomains":["easy-peasy.ai"],"gitSource":{"type":"github","owner":"easy-peasy-ai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6ae4348787a6b80b471b6660","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"Guides","count":115},{"language":"default","tag":"Agents","count":29},{"language":"default","tag":"API Reference","count":19},{"language":"default","tag":"AI Employees","count":16},{"language":"default","tag":"Marky Agent","count":14},{"language":"default","tag":"AI Videos","count":14},{"language":"default","tag":"Channels","count":13},{"language":"default","tag":"AI Images","count":11},{"language":"default","tag":"Audio","count":11},{"language":"default","tag":"Account \u0026 billing","count":9}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/endpoint/generate-video","slug":"/api-reference/endpoint/generate-video","pageMetadata":{"title":"Generate Video","openapi":"POST /api/generate-video","description":"Generate videos from text, first/last frames, or reference media with MiniMax H3 Max, Seedance 2.5, Gemini Omni Flash 1.1, FLUX 3, WAN 3.0, Veo, Kling, and other models. The exact model title is required. See the [video model reference](/api-reference/video-models) for supported settings.\n\nGeneration is asynchronous. Save the returned id and poll [Get Video](/api-reference/endpoint/get-video) with the same account’s API key. Paid plans require sufficient credits; free access is limited to selected variants and settings.","href":"/api-reference/endpoint/generate-video"},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n a: \"a\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Generate videos from text, first/last frames, or reference media with MiniMax H3 Max, Seedance 2.5, Gemini Omni Flash 1.1, FLUX 3, WAN 3.0, Veo, Kling, and other models. The exact model title is required. See the \", _jsx(_components.a, {\n href: \"/api-reference/video-models\",\n children: \"video model reference\"\n }), \" for supported settings.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Generation is asynchronous. Save the returned id and poll \", _jsx(_components.a, {\n href: \"/api-reference/endpoint/get-video\",\n children: \"Get Video\"\n }), \" with the same account’s API key. Paid plans require sufficient credits; free access is limited to selected variants and settings.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`choose-a-model`,children:`Choose a model`}),`\n`,_jsxs(_components.p,{children:[`The API supports MiniMax H3 Max, MiniMax H3, Seedance 2.5, Gemini Omni Flash 1.1, FLUX 3, WAN 3.0, Grok Imagine 1.5, and other video families. Use the `,_jsx(_components.a,{href:`/api-reference/video-models`,children:`video model reference`}),` to choose an exact variant and its supported inputs, durations, and resolutions.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`The REST API requires `,_jsx(_components.code,{children:`model`}),`. The `,_jsxs(_components.a,{href:`/mcp/tools`,children:[`MCP `,_jsx(_components.code,{children:`generate_video`}),` tool`]}),` defaults to `,_jsx(_components.code,{children:`MiniMax H3 Max`}),` when you omit it. REST fields use camelCase, such as `,_jsx(_components.code,{children:`aspectRatio`}),` and `,_jsx(_components.code,{children:`referenceVideos`}),`; MCP uses `,_jsx(_components.code,{children:`aspect_ratio`}),` and `,_jsx(_components.code,{children:`reference_videos`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`create-a-video`,children:`Create a video`}),`\n`,_jsxs(_components.p,{children:[`Send one generation request and save its returned `,_jsx(_components.code,{children:`id`}),`. Generation runs asynchronously; an accepted request does not mean the video is ready. Most videos take a few minutes, and queues can take longer.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --fail-with-body`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://easy-peasy.ai/api/generate-video`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\": \"A cat walks along a beach at sunset, waves in the background, cinematic lighting\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"MiniMax H3 Max\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"duration\": \"5\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"aspectRatio\": \"16:9\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"resolution\": \"768p\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`MiniMax H3 Max accepts 5–15 whole seconds and `,_jsx(_components.code,{children:`480p`}),` or `,_jsx(_components.code,{children:`768p`}),`. MiniMax H3 accepts 4–15 whole seconds and `,_jsx(_components.code,{children:`768p`}),` or `,_jsx(_components.code,{children:`2k`}),`. Both families generate native audio; `,_jsx(_components.code,{children:`generateAudio: false`}),` does not disable it. Models with an audio toggle, such as Seedance 2.5, can accept `,_jsx(_components.code,{children:`generateAudio: false`}),`. Providing reference audio enables audio generation.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Send `,_jsx(_components.code,{children:`duration`}),` as a string. Veo 3.1 text variants accept `,_jsx(_components.code,{children:`\"4s\"`}),`, `,_jsx(_components.code,{children:`\"6s\"`}),`, or `,_jsx(_components.code,{children:`\"8s\"`}),`; their Image and First-Last Frame variants accept only `,_jsx(_components.code,{children:`\"8s\"`}),`. Veo 3.1 does not accept five seconds. Equivalent strings such as `,_jsx(_components.code,{children:`\"8\"`}),` and `,_jsx(_components.code,{children:`\"8s\"`}),` are normalized by the API.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`animate-an-image`,children:`Animate an image`}),`\n`,_jsxs(_components.p,{children:[`Select a model with a first-image input and send `,_jsx(_components.code,{children:`image`}),`. Adding an image does not automatically switch a text model to its image variant.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --fail-with-body`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://easy-peasy.ai/api/generate-video`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\": \"The subject slowly turns toward the camera in soft morning light\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"MiniMax H3 Max Image\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"image\": \"https://yourcdn.com/first-frame.png\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"duration\": \"5\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"aspectRatio\": \"16:9\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"resolution\": \"768p\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Add `,_jsx(_components.code,{children:`\"tailImage\": \"https://yourcdn.com/last-frame.png\"`}),` when you want a last frame and the chosen variant supports it. Check the `,_jsx(_components.strong,{children:`Input`}),` column in the `,_jsx(_components.a,{href:`/api-reference/video-models#model-catalog`,children:`model catalog`}),`; model suffixes alone do not identify every input mode.`]}),`\n`,_jsx(Heading,{level:`2`,id:`use-reference-media`,children:`Use reference media`}),`\n`,_jsx(_components.p,{children:`Reference variants use images to preserve subjects or style. Some also accept videos for motion or editing and audio for voice or sound guidance.`}),`\n`,_jsx(_components.p,{children:`This example uses a character image, a motion clip, and a voice clip. Replace the placeholder URLs with your own media. Keep each MiniMax H3 Max reference video and audio clip between 2 and 15 seconds, and each type’s combined duration at or below 15 seconds.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --fail-with-body`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://easy-peasy.ai/api/generate-video`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\": \"The character walks through the market with the motion from the video and speaks in the supplied voice\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"MiniMax H3 Max Reference\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"referenceImages\": [{ \"url\": \"https://yourcdn.com/character.png\" }],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"referenceVideos\": [{ \"url\": \"https://yourcdn.com/motion.mp4\" }],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"referenceAudios\": [{ \"url\": \"https://yourcdn.com/voice.mp3\" }],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"duration\": \"5\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"aspectRatio\": \"16:9\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"resolution\": \"768p\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Use `,_jsx(_components.code,{children:`referenceImages`}),`, `,_jsx(_components.code,{children:`referenceVideos`}),`, and `,_jsx(_components.code,{children:`referenceAudios`}),` as arrays of `,_jsx(_components.code,{children:`{ \"url\": \"...\" }`}),` objects.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`referenceVideo`}),` is a single-URL alternative. If you supply the `,_jsx(_components.code,{children:`referenceVideos`}),` array, it takes precedence, including when empty.`]}),`\n`,_jsxs(_components.li,{children:[`Do not combine reference videos with `,_jsx(_components.code,{children:`image`}),` or `,_jsx(_components.code,{children:`tailImage`}),`. Audio references require a reference image or a supported reference video; they cannot accompany a first-frame `,_jsx(_components.code,{children:`image`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Limits differ by variant. MiniMax H3 Max Reference supports up to 9 images; Seedance 2.5 Reference supports up to 30. See `,_jsx(_components.a,{href:`/api-reference/video-models#reference-limits`,children:`reference limits`}),` for counts, durations, formats, and sizes.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`referenceImages[].type`}),` is optional. Kling O1/O3 uses `,_jsx(_components.code,{children:`character`}),`, `,_jsx(_components.code,{children:`object`}),`, or `,_jsx(_components.code,{children:`style`}),` to assign reference roles; other families use general image references.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`All input URLs must be downloadable server-side without browser cookies. A URL that works in your browser may still reject the provider with HTTP 403. Signed URLs must remain valid through queue delays and the provider’s download. Reference media can increase credit usage.`}),`\n`,_jsx(Heading,{level:`2`,id:`poll-for-the-result`,children:`Poll for the result`}),`\n`,_jsxs(_components.p,{children:[`Call `,_jsx(_components.a,{href:`/api-reference/endpoint/get-video`,children:`Get Video`}),` with the returned `,_jsx(_components.code,{children:`id`}),` and the same account’s API key every 15–30 seconds. Read `,_jsx(_components.code,{children:`video.url`}),` when `,_jsx(_components.code,{children:`video.status`}),` is `,_jsx(_components.code,{children:`completed`}),`.`]}),`\n`,_jsx(_components.p,{children:`The following Node.js 20+ example checks HTTP errors, handles malformed responses, and stops after ten minutes. A local timeout does not cancel the generation; keep the ID so you can check it later.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`28`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`28`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` waitForVideo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`videoId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`apiKey`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` deadline`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Date`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`now`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`+`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 10`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` *`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 60`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` *`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` while`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Date`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`now`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` deadline`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `https://easy-peasy.ai/api/get-video?video_id=\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`encodeURIComponent`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`videoId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'x-api-key'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` signal:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` AbortSignal`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`timeout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Math`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`max`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Math`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`min`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`30000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`deadline`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` -`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Date`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`now`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()))),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ok`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`Video \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`videoId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: HTTP `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ||`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Could not retrieve video'`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`video`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'completed'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`video`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`video`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`video`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'processing'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`Unexpected response for video \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`videoId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` Promise`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`resolve`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` =>`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` setTimeout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`resolve`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Math`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`max`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Math`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`min`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`15000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`deadline`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` -`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Date`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`now`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()))));`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`Timed out waiting for video \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`videoId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\". Keep this ID and check it later.`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`handle-errors-and-access-limits`,children:`Handle errors and access limits`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Response`}),_jsx(_components.th,{children:`What to do`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:`Check the exact model name, string duration, resolution, input mode, and reference limits.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:`Check your API key and account access.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsxs(_components.td,{children:[`Check your plan and remaining credits. Free accounts have `,_jsx(_components.a,{href:`/api-reference/video-models#free-plan-settings`,children:`specific model and resolution limits`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`404`}),` from Get Video`]}),_jsx(_components.td,{children:`Verify the ID and account. Missing or deleted jobs, including some failed generations, return 404.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`500`}),` or a network timeout`]}),_jsx(_components.td,{children:`Save any ID already received. Check the existing job before deciding whether to submit again.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Get Video currently exposes only `,_jsx(_components.code,{children:`processing`}),` and `,_jsx(_components.code,{children:`completed`}),`, so do not wait for a `,_jsx(_components.code,{children:`failed`}),` status. Submitting a new generation can create another billable job; a polling timeout is not a reason to recreate it automatically.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Generate Video","openapi":"POST /api/generate-video","description":"Generate videos from text, first/last frames, or reference media with MiniMax H3 Max, Seedance 2.5, Gemini Omni Flash 1.1, FLUX 3, WAN 3.0, Veo, Kling, and other models. The exact model title is required. See the [video model reference](/api-reference/video-models) for supported settings.\n\nGeneration is asynchronous. Save the returned id and poll [Get Video](/api-reference/endpoint/get-video) with the same account’s API key. Paid plans require sufficient credits; free access is limited to selected variants and settings.","href":"/api-reference/endpoint/generate-video"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Choose a model","slug":"choose-a-model","depth":2,"children":[]},{"title":"Create a video","slug":"create-a-video","depth":2,"children":[]},{"title":"Animate an image","slug":"animate-an-image","depth":2,"children":[]},{"title":"Use reference media","slug":"use-reference-media","depth":2,"children":[]},{"title":"Poll for the result","slug":"poll-for-the-result","depth":2,"children":[]},{"title":"Handle errors and access limits","slug":"handle-errors-and-access-limits","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Generate Video","operationId":"generateVideo","description":"Generate videos from text, first/last frames, or reference media with MiniMax H3 Max, Seedance 2.5, Gemini Omni Flash 1.1, FLUX 3, WAN 3.0, Veo, Kling, and other models. The exact model title is required. See the [video model reference](/api-reference/video-models) for supported settings.\n\nGeneration is asynchronous. Save the returned id and poll [Get Video](/api-reference/endpoint/get-video) with the same account’s API key. Paid plans require sufficient credits; free access is limited to selected variants and settings.","requestBody":"74525a46-4bdd-454e-80a1-a1e965d392c0","responses":{"200":"041085f7-5a84-4638-a542-32a069dec380","400":"2e8a6348-0c2b-4666-bfd6-ff956ef7f807","401":"c4cf0edc-f290-4e6c-b3f0-8924ef7bf16d","403":"8abba81f-0943-41b8-bc93-9d064799caa8","405":"4d6059c3-4fad-4c1e-862a-0a9076cd3d8a","500":"5100df12-5dc6-4e5a-9690-6322e7def646"},"method":"post","type":"path","servers":["341c5f3e-c44b-4765-bc85-0c4cf1b9119d"],"security":["4aeb4ddf-7ca6-4487-bfab-fb3b0e8515da"],"path":"/api/generate-video","baseUrlOptions":["https://easy-peasy.ai"],"title":"Generate Video","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["prompt","model"],"properties":{"prompt":{"type":"string","description":"Text prompt describing the video to generate.","example":"A cat walking on the beach at sunset, cinematic lighting","minLength":1,"isRequired":true,"uniqueKey":"prompt","typeLabel":"string"},"model":{"type":"string","description":"Required exact model title. See the video model reference for input modes, durations, resolutions, and reference limits. Adding media does not automatically switch model variants. https://docs.easy-peasy.ai/api-reference/video-models","enum":["Veo 3.1 Fast","Gemini Omni Flash","Gemini Omni Flash Reference","Gemini Omni Flash 1.1","Gemini Omni Flash 1.1 Reference","MiniMax H3 Max","MiniMax H3 Max Reference","Grok Imagine","Grok Imagine Reference","Grok Imagine 1.5 Text","Grok Imagine 1.5 Reference","Seedance 2.0 Fast","MiniMax H3","Seedance 2.5","Seedance 2.5 Turbo","Seedance 2.5 Turbo Reference","Seedance 2.5 Reference","FLUX 3","WAN 3.0","WAN 3.0 Reference","Seedance 2.0 Turbo","Seedance 2.0","Seedance 2.0 Mini","Seedance 2.0 Reference","Seedance 2.0 Fast Reference","MiniMax H3 Reference","Seedance 2.0 Mini Reference","Kling 2.6 Pro","Veo 3.1 Lite","Veo 3.1 Lite Image","Veo 3.1 Fast Image","Gemini Omni Flash Image","Gemini Omni Flash 1.1 Image","Gemini Omni Flash 1.1 First-Last Frame","MiniMax H3 Max Image","Grok Imagine Image","Grok Imagine 1.5","Seedance 2.0 Image","Seedance 2.0 Fast Image","MiniMax H3 Image","Seedance 2.5 Turbo Image","Seedance 2.5 Image","FLUX 3 Image","WAN 3.0 Image","Seedance 2.0 Turbo Image","Seedance 2.0 Mini Image","Happy Horse","Happy Horse Image","Happy Horse Reference","Kling 2.6 Pro Image","Kling 3.0 Pro","Kling 3.0 Pro Image","Kling 3.0 Standard","Kling 3.0 Standard Image","Kling O3 Pro","Kling O3 Pro Image","Kling O3 Standard","Kling O3 Standard Image","Kling O3 Reference","Seedance 1.5 Pro","Seedance 1.5 Pro Image","Kling O1 Image","Kling O1 Reference","Kling 2.5 Turbo Pro Image","Kling 2.5 Turbo Pro","Kling 2.5 Turbo Standard","Seedance 1.5 Pro First-Last Frame","Veo 3.1","LTX-2 Pro","LTX-2 Fast","Veo 3.1 Image","Veo 3.1 First-Last Frame","Veo 3.1 Fast First-Last Frame","LTX-2 Pro Image","LTX-2 Fast Image","Hailuo 2.0","Hailuo 2.0 Pro","Hailuo 2.3","Hailuo 2.3 Pro","Hailuo 2.3 Image","Hailuo 2.3 Pro Image","Hailuo 2.3-Fast Pro Image","Seedance v1 Pro Fast","Pixverse v5.5","Wan 2.5","Wan v2.2 Turbo","Wan v2.2","Hailuo 2.0 Image","Hailuo 2.0 Pro Image","Seedance 1.0 Pro Fast","Pixverse v5.5 Image","Wan 2.5 Image","Wan v2.2 Turbo Image","Wan-2.2 Image"],"example":"MiniMax H3 Max","isRequired":true,"uniqueKey":"model","typeLabel":"enum\u003cstring>"},"image":{"type":"string","format":"uri","description":"Public URL of a first-frame image. Choose a variant with a first-image input in the video model reference. Model suffixes are not always enough: Grok Imagine 1.5 and Kling 2.5 Turbo Standard also require image. The URL must remain downloadable without browser cookies through queue delays.","uniqueKey":"image","typeLabel":"string\u003curi>"},"duration":{"type":"string","description":"Output length as a string, using the exact variant’s allowed durations. MiniMax H3 Max: 5–15 whole seconds; MiniMax H3: 4–15. Veo 3.1 text variants: 4s, 6s, 8s; Image and First-Last Frame variants: 8s only. Bare seconds and an s suffix are equivalent. If omitted, the API selects five seconds when listed, otherwise the first configured duration, or five seconds for models without a list. Provider-specific output lengths can differ.","example":"5","uniqueKey":"duration","typeLabel":"string"},"aspectRatio":{"type":"string","default":"16:9","description":"Use an aspect ratio listed for the exact variant. Omit for variants whose framing follows the input. The API defaults to 16:9 when applicable.","enum":["16:9","9:16","1:1","4:3","3:4","21:9","3:2","2:3"],"uniqueKey":"aspectRatio","typeLabel":"enum\u003cstring>"},"resolution":{"type":"string","description":"Allowed resolutions depend on the exact variant. MiniMax H3 Max: 480p/768p; MiniMax H3: 768p/2k; Seedance 2.5: 480p/720p; Seedance 2.5 Turbo: 720p/1080p. Send a listed value explicitly; defaults vary by model. Use lowercase k for 2k and 4k. Omit when no resolution selector is listed.","enum":["360p","480p","720p","768p","1080p","2k","4k"],"uniqueKey":"resolution","typeLabel":"enum\u003cstring>"},"generateAudio":{"type":"boolean","description":"Enable or disable generated audio only on models with an audio toggle. MiniMax H3 and H3 Max always generate native audio; false does not disable it. Supplying reference audio enables audio generation. Audio settings can affect credit usage.","uniqueKey":"generateAudio","typeLabel":"boolean"},"tailImage":{"type":"string","format":"uri","description":"Public URL of a last-frame image, paired with image. Use only a variant that supports a last image, such as MiniMax H3 Max Image or Seedance 2.5 Image. See the video model reference.","uniqueKey":"tailImage","typeLabel":"string\u003curi>"},"referenceImages":{"type":"array","description":"Array of reference images on supported variants. Reference models require at least one reference image or a supported reference video. Limits differ: MiniMax H3 Max Reference accepts up to 9 images; Seedance 2.5 Reference accepts up to 30. Some Veo variants also support optional references. See the video model reference.","items":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri","description":"Publicly reachable image URL.","isRequired":true,"uniqueKey":"referenceImages.items.[INDEX].url","typeLabel":"string\u003curi>"},"type":{"type":"string","enum":["character","object","style"],"description":"Optional reference role. Kling O1/O3 uses character/object/style to assign reference roles; other families use general image references.","uniqueKey":"referenceImages.items.[INDEX].type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"referenceImages.items.[INDEX]","typeLabel":"object"},"uniqueKey":"referenceImages","typeLabel":"object[]"},"referenceVideo":{"type":"string","format":"uri","description":"Single reference video URL, on variants supporting reference video. Alternative to referenceVideos; the array takes precedence when supplied, even if empty.","uniqueKey":"referenceVideo","typeLabel":"string\u003curi>"},"referenceVideos":{"type":"array","description":"Reference videos for supported variants only. Do not combine with image or tailImage. Counts, clip lengths, total duration, and file-size limits depend on the variant. MiniMax H3 Max Reference accepts up to 3 clips of 2–15 seconds, at most 15 seconds combined, and 20 MiB each. Seedance 2.5 Reference supports up to 3 clips of 2–30 seconds, at most 30 seconds combined, and 50 MiB each. Reference inputs can add credit charges.","items":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri","description":"Publicly downloadable media URL.","isRequired":true,"uniqueKey":"referenceVideos.items.[INDEX].url","typeLabel":"string\u003curi>"}},"uniqueKey":"referenceVideos.items.[INDEX]","typeLabel":"object"},"uniqueKey":"referenceVideos","typeLabel":"object[]"},"referenceAudios":{"type":"array","description":"Audio references for supported variants. Require a companion reference image or supported reference video, and cannot accompany image. Enable generated audio. MiniMax H3 Max Reference accepts up to 3 clips of 2–15 seconds and at most 15 seconds total. Seedance 2.5 Reference supports up to 10 MP3/WAV clips, 2–30 seconds each, at most 30 seconds total, and 15 MiB each. See the reference limits for other variants.","items":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri","description":"Publicly downloadable media URL.","isRequired":true,"uniqueKey":"referenceAudios.items.[INDEX].url","typeLabel":"string\u003curi>"}},"uniqueKey":"referenceAudios.items.[INDEX]","typeLabel":"object"},"uniqueKey":"referenceAudios","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"minimax_text":{"title":"minimax_text","value":{"prompt":"A cat walks on the beach at sunset, cinematic lighting","model":"MiniMax H3 Max","duration":"5","aspectRatio":"16:9","resolution":"768p"}},"minimax_image":{"title":"minimax_image","value":{"prompt":"The subject slowly turns toward the camera","model":"MiniMax H3 Max Image","image":"https://yourcdn.com/first-frame.png","duration":"5","aspectRatio":"16:9","resolution":"768p"}},"seedance_references":{"title":"seedance_references","value":{"prompt":"The character walks through a neon-lit market","model":"Seedance 2.5 Reference","referenceImages":[{"url":"https://yourcdn.com/character.png"}],"referenceVideos":[{"url":"https://yourcdn.com/motion.mp4"}],"referenceAudios":[{"url":"https://yourcdn.com/voice.mp3"}],"duration":"5","aspectRatio":"16:9","resolution":"720p"}},"text_to_video":{"title":"text_to_video","value":{"prompt":"A cat walking on the beach at sunset, cinematic lighting","model":"Veo 3.1 Fast","duration":"4s","aspectRatio":"16:9","resolution":"720p"}},"image_to_video":{"title":"image_to_video","value":{"prompt":"The subject slowly turns and smiles at the camera","image":"https://example.com/photo.jpg","model":"Veo 3.1 Fast Image","duration":"8s","aspectRatio":"16:9","resolution":"720p"}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"041085f7-5a84-4638-a542-32a069dec380":{"description":"Video generation started","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"Video ID. Use this to poll for the result with the Get Video endpoint.","uniqueKey":"id","typeLabel":"integer"},"prompt":{"type":"string","description":"The prompt used for generation","uniqueKey":"prompt","typeLabel":"string"},"image_url":{"type":"string","description":"Video URL when present. May be empty or omitted while processing. Poll Get Video with id; do not depend on this field to detect submission success.","uniqueKey":"image_url","typeLabel":"string"},"model":{"type":"string","description":"The model used for generation","uniqueKey":"model","typeLabel":"string"},"is_video":{"type":"boolean","uniqueKey":"is_video","typeLabel":"boolean"},"created_at":{"type":"string","format":"date-time","uniqueKey":"created_at","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"","typeLabel":"object"},"example":{"id":12345,"prompt":"A cat walking on the beach at sunset","image_url":"","model":"Veo 3.1 Fast","is_video":true,"created_at":"2025-01-15T10:30:00.000Z"},"examples":{"Example":{"title":"Example","value":{"id":12345,"prompt":"A cat walking on the beach at sunset","image_url":"","model":"Veo 3.1 Fast","is_video":true,"created_at":"2025-01-15T10:30:00.000Z"}}},"exampleType":"examples"}},"exampleType":"examples"},"2e8a6348-0c2b-4666-bfd6-ff956ef7f807":{"description":"Bad request — invalid model, duration, aspect ratio, or input type","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"oneOf":[{"type":"string","description":"Error text, or an object with message and optional status for some provider integrations.","example":"Invalid API key","uniqueKey":"error.oneOf.0","typeLabel":"string"},{"type":"object","description":"Error text, or an object with message and optional status for some provider integrations.","example":"Invalid API key","properties":{"message":{"type":"string","uniqueKey":"error.oneOf.1.message","typeLabel":"string"},"status":{"type":"integer","uniqueKey":"error.oneOf.1.status","typeLabel":"integer"}},"uniqueKey":"error.oneOf.1","typeLabel":"object"}],"uniqueKey":"error","typeLabel":"string | object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":"Invalid model selected"},"examples":{"Example":{"title":"Example","value":{"error":"Invalid model selected"}}},"exampleType":"examples"}},"exampleType":"examples"},"c4cf0edc-f290-4e6c-b3f0-8924ef7bf16d":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"oneOf":[{"type":"string","description":"Error text, or an object with message and optional status for some provider integrations.","example":"Invalid API key","uniqueKey":"error.oneOf.0","typeLabel":"string"},{"type":"object","description":"Error text, or an object with message and optional status for some provider integrations.","example":"Invalid API key","properties":{"message":{"type":"string","uniqueKey":"error.oneOf.1.message","typeLabel":"string"},"status":{"type":"integer","uniqueKey":"error.oneOf.1.status","typeLabel":"integer"}},"uniqueKey":"error.oneOf.1","typeLabel":"object"}],"uniqueKey":"error","typeLabel":"string | object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":"Invalid API key"},"examples":{"Example":{"title":"Example","value":{"error":"Invalid API key"}}},"exampleType":"examples"}},"exampleType":"examples"},"8abba81f-0943-41b8-bc93-9d064799caa8":{"description":"Credit limit reached or model/settings unavailable on the current plan","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"oneOf":[{"type":"string","description":"Error text, or an object with message and optional status for some provider integrations.","example":"Invalid API key","uniqueKey":"error.oneOf.0","typeLabel":"string"},{"type":"object","description":"Error text, or an object with message and optional status for some provider integrations.","example":"Invalid API key","properties":{"message":{"type":"string","uniqueKey":"error.oneOf.1.message","typeLabel":"string"},"status":{"type":"integer","uniqueKey":"error.oneOf.1.status","typeLabel":"integer"}},"uniqueKey":"error.oneOf.1","typeLabel":"object"}],"uniqueKey":"error","typeLabel":"string | object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":"This model is not available on the Free plan. Try Veo 3.1 or Seedance 2.0 Mini, or upgrade to unlock all models."},"examples":{"Example":{"title":"Example","value":{"error":"This model is not available on the Free plan. Try Veo 3.1 or Seedance 2.0 Mini, or upgrade to unlock all models."}}},"exampleType":"examples"}},"exampleType":"examples"},"4d6059c3-4fad-4c1e-862a-0a9076cd3d8a":{"description":"Method not allowed. Use POST.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"oneOf":[{"type":"string","description":"Error text, or an object with message and optional status for some provider integrations.","example":"Invalid API key","uniqueKey":"error.oneOf.0","typeLabel":"string"},{"type":"object","description":"Error text, or an object with message and optional status for some provider integrations.","example":"Invalid API key","properties":{"message":{"type":"string","uniqueKey":"error.oneOf.1.message","typeLabel":"string"},"status":{"type":"integer","uniqueKey":"error.oneOf.1.status","typeLabel":"integer"}},"uniqueKey":"error.oneOf.1","typeLabel":"object"}],"uniqueKey":"error","typeLabel":"string | object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"Invalid API key"}}},"exampleType":"generated"}},"exampleType":"generated"},"5100df12-5dc6-4e5a-9690-6322e7def646":{"description":"Provider or server error. Preserve any existing job ID before deciding to submit another generation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"oneOf":[{"type":"string","description":"Error text, or an object with message and optional status for some provider integrations.","example":"Invalid API key","uniqueKey":"error.oneOf.0","typeLabel":"string"},{"type":"object","description":"Error text, or an object with message and optional status for some provider integrations.","example":"Invalid API key","properties":{"message":{"type":"string","uniqueKey":"error.oneOf.1.message","typeLabel":"string"},"status":{"type":"integer","uniqueKey":"error.oneOf.1.status","typeLabel":"integer"}},"uniqueKey":"error.oneOf.1","typeLabel":"object"}],"uniqueKey":"error","typeLabel":"string | object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"Invalid API key"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"4aeb4ddf-7ca6-4487-bfab-fb3b0e8515da":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for authentication. Get yours at https://easy-peasy.ai/settings/api","scopes":[],"schemeName":"apiKeyAuth"}}},"servers":{"341c5f3e-c44b-4765-bc85-0c4cf1b9119d":{"url":"https://easy-peasy.ai"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for authentication. Get yours at https://easy-peasy.ai/settings/api","scopes":[],"schemeName":"apiKeyAuth"},"schema":{"title":"x-api-key","type":"string","description":"API key for authentication. Get yours at https://easy-peasy.ai/settings/api","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"apiKeyAuth","name":"x-api-key"}],"title":"apiKeyAuth"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"easy-peasyai","siteName":"Easy-Peasy.AI Docs","title":"Generate Video - Easy-Peasy.AI Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-12T13:06:34.595Z","originalFileLocation":"api-reference/endpoint/generate-video.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Generate videos from text, first/last frames, or reference media with MiniMax H3 Max, Seedance 2.5, Gemini Omni Flash 1.1, FLUX 3, WAN 3.0, Veo, Kling, and other models. The exact model title is required. See the video model reference for supported settings. Generation is asynchronous. Save the returned id and poll Get Video with the same account’s API key. Paid plans require sufficient credits; free access is limited to selected variants and settings.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Easy-Peasy.AI Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/easy-peasyai/Am3MO_FpKKCWWVV0/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/easy-peasyai/Am3MO_FpKKCWWVV0/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/easy-peasyai/Am3MO_FpKKCWWVV0/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/easy-peasyai/Am3MO_FpKKCWWVV0/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/easy-peasyai/Am3MO_FpKKCWWVV0/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/easy-peasyai/Am3MO_FpKKCWWVV0/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/easy-peasyai/Am3MO_FpKKCWWVV0/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/easy-peasyai/Am3MO_FpKKCWWVV0/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/easy-peasyai/Am3MO_FpKKCWWVV0/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Generate Video - Easy-Peasy.AI Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Generate videos from text, first/last frames, or reference media with MiniMax H3 Max, Seedance 2.5, Gemini Omni Flash 1.1, FLUX 3, WAN 3.0, Veo, Kling, and other models. The exact model title is required. See the video model reference for supported settings. Generation is asynchronous. Save the returned id and poll Get Video with the same account’s API key. Paid plans require sufficient credits; free access is limited to selected variants and settings.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Easy-Peasy.AI Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://easy-peasy.ai/docs/api-reference/endpoint/generate-video\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://easy-peasyai.mintlify.site/docs/_mintlify/api/og/v2?division=Video+Generation\u0026amp;title=Generate+Video\u0026amp;description=Generate+videos+from+text%2C+first%2Flast+frames%2C+or+reference+media+with+MiniMax+H3+Max%2C+Seedance+2.5%2C+Gemini+Omni+Flash+1.1%2C+FLUX+3%2C+WAN+3.0%2C+Veo%2C+Kling%2C+and+othe\u0026amp;theme=e4192a553308564721da91ed\u0026amp;signature=9a60ac1bef9c8cd3cdcd607b2ab2d986579fc40edcc8606721b8654596a40c42\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Generate Video - Easy-Peasy.AI Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Generate videos from text, first/last frames, or reference media with MiniMax H3 Max, Seedance 2.5, Gemini Omni Flash 1.1, FLUX 3, WAN 3.0, Veo, Kling, and other models. The exact model title is required. See the video model reference for supported settings. Generation is asynchronous. Save the returned id and poll Get Video with the same account’s API key. Paid plans require sufficient credits; free access is limited to selected variants and settings.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://easy-peasyai.mintlify.site/docs/_mintlify/api/og/v2?division=Video+Generation\u0026amp;title=Generate+Video\u0026amp;description=Generate+videos+from+text%2C+first%2Flast+frames%2C+or+reference+media+with+MiniMax+H3+Max%2C+Seedance+2.5%2C+Gemini+Omni+Flash+1.1%2C+FLUX+3%2C+WAN+3.0%2C+Veo%2C+Kling%2C+and+othe\u0026amp;theme=e4192a553308564721da91ed\u0026amp;signature=9a60ac1bef9c8cd3cdcd607b2ab2d986579fc40edcc8606721b8654596a40c42\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/easy-peasyai/Am3MO_FpKKCWWVV0/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Easy-Peasy.AI Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6366F1\">\u003clink data-mint-head rel=\"canonical\" href=\"https://easy-peasy.ai/docs/api-reference/endpoint/generate-video\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/endpoint/generate-video.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://easy-peasy.ai/#organization\",\"name\":\"Easy-Peasy.AI Docs\",\"url\":\"https://easy-peasy.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/easy-peasyai/kLHRxZMJyyWSlR-b/logo/marky.png?fit=max\u0026auto=format\u0026n=kLHRxZMJyyWSlR-b\u0026q=85\u0026s=59994034f7c7508e0f18c4f7a40ea9b5\"}},{\"@type\":\"WebSite\",\"@id\":\"https://easy-peasy.ai/docs#website\",\"name\":\"Easy-Peasy.AI Docs\",\"url\":\"https://easy-peasy.ai/docs\",\"publisher\":{\"@id\":\"https://easy-peasy.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://easy-peasy.ai/docs/api-reference/endpoint/generate-video#webpage\",\"url\":\"https://easy-peasy.ai/docs/api-reference/endpoint/generate-video\",\"name\":\"Generate Video\",\"description\":\"Generate videos from text, first/last frames, or reference media with MiniMax H3 Max, Seedance 2.5, Gemini Omni Flash 1.1, FLUX 3, WAN 3.0, Veo, Kling, and other models. The exact model title is required. See the video model reference for supported settings. Generation is asynchronous. Save the returned id and poll Get Video with the same account’s API key. Paid plans require sufficient credits; free access is limited to selected variants and settings.\",\"dateModified\":\"2026-09-12T13:06:34.595Z\",\"isPartOf\":{\"@id\":\"https://easy-peasy.ai/docs#website\"},\"breadcrumb\":{\"@id\":\"https://easy-peasy.ai/docs/api-reference/endpoint/generate-video#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://easy-peasy.ai/docs/api-reference/endpoint/generate-video#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Video Generation\",\"item\":\"https://easy-peasy.ai/docs/api-reference/video-models\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Generate Video\",\"item\":\"https://easy-peasy.ai/docs/api-reference/endpoint/generate-video\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://easy-peasy.ai/docs/api-reference/endpoint/generate-video#apireference\",\"headline\":\"Generate Video\",\"name\":\"Generate Video\",\"description\":\"Generate videos from text, first/last frames, or reference media with MiniMax H3 Max, Seedance 2.5, Gemini Omni Flash 1.1, FLUX 3, WAN 3.0, Veo, Kling, and other models. The exact model title is required. See the video model reference for supported settings. Generation is asynchronous. Save the returned id and poll Get Video with the same account’s API key. Paid plans require sufficient credits; free access is limited to selected variants and settings.\",\"url\":\"https://easy-peasy.ai/docs/api-reference/endpoint/generate-video\",\"mainEntityOfPage\":{\"@id\":\"https://easy-peasy.ai/docs/api-reference/endpoint/generate-video#webpage\"},\"dateModified\":\"2026-09-12T13:06:34.595Z\",\"publisher\":{\"@id\":\"https://easy-peasy.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://easy-peasy.ai/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Easy-Peasy.AI Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Easy-Peasy.AI Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/api-reference/endpoint/generate-video.md","siteName":"Easy-Peasy.AI Docs","nav":{"global":null,"tabs":[{"tab":"Guides","icon":"book-open","pages":[{"title":"Guides","href":""}]},{"tab":"Developers","icon":"code","pages":[{"title":"Developers","href":"/developers/overview"}]},{"tab":"API Reference","icon":"square-terminal","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":"/api-reference/introduction"}]},{"group":"Text Generation","pages":[{"title":"List Presets","openapi":"GET /api/presets","href":"/api-reference/endpoint/list-presets"},{"title":"Get Preset Details","openapi":"GET /api/presets/{slug}","href":"/api-reference/endpoint/get-preset"},{"title":"Generate Text","openapi":"POST /api/generate","href":"/api-reference/endpoint/generate"}]},{"group":"Image Generation","pages":[{"title":"Generate Image","openapi":"POST /api/generate-image","href":"/api-reference/endpoint/generate-image"},{"title":"Get Image","openapi":"GET /api/get-image","href":"/api-reference/endpoint/get-image"}]},{"group":"Video Generation","pages":[{"title":"Video models","description":"Exact API model names, input modes, durations, resolutions, and reference limits","href":"/api-reference/video-models"},{"title":"Generate Video","openapi":"POST /api/generate-video","href":"/api-reference/endpoint/generate-video"},{"title":"Generate Talking Video","openapi":"POST /api/generate-talking-video","description":"Generate a talking video by animating a face image or video with speech. Provide either text + voice to generate audio, or supply your own audio file.\n\n**Input combinations:**\n- **Image + text + voice** — Generates speech from text using the specified voice, then animates the face in the image\n- **Image + audio** — Uses the provided audio to animate the face in the image\n- **Video + text + voice** — Generates speech from text, then lip-syncs the video\n- **Video + audio** — Lip-syncs the video with the provided audio\n\n**Models:**\n- `premium` — High-quality avatar generation (VEED Fabric). Supports 480p and 720p.\n- `standard` — Faster generation (WaveSpeed InfiniteTalk). Supports 480p and 720p.\n\nVideo generation is asynchronous. Use the [Get Video](/api-reference/endpoint/get-video) endpoint to poll for results.\n\n**Note:** Requires a paid plan. Image must be at least 512x512 pixels. Audio/video max 5 minutes.","href":"/api-reference/endpoint/generate-talking-video"},{"title":"Get Video","openapi":"GET /api/get-video","href":"/api-reference/endpoint/get-video"}]},{"group":"Transcription","pages":[{"title":"Create Transcription","openapi":"POST /api/transcriptions","href":"/api-reference/endpoint/create-transcription"},{"title":"Get Transcription Result","openapi":"POST /api/audios","href":"/api-reference/endpoint/get-transcription"},{"title":"Generate Audio Content","openapi":"POST /api/generate-audio-content","href":"/api-reference/endpoint/generate-audio-content"}]},{"group":"Text-to-Speech","pages":[{"title":"Get TTS Configuration","openapi":"GET /api/get-text-to-speech-config","href":"/api-reference/endpoint/get-tts-config"},{"title":"Get TTS Voices","openapi":"GET /api/get-text-to-speech-voices","href":"/api-reference/endpoint/get-tts-voices"},{"title":"Generate Text-to-Speech","openapi":"POST /api/generate-text-to-speech","href":"/api-reference/endpoint/generate-tts"}]},{"group":"Sound Effects","pages":[{"title":"Generate Sound Effect","openapi":"POST /api/generate-sound","href":"/api-reference/endpoint/generate-sound"}]},{"group":"Chat Completions","pages":[{"title":"Chat Completions (OpenAI-compatible)","openapi":"POST /api/chat/completions","href":"/api-reference/endpoint/chat-completions"}]},{"group":"Agents","pages":[{"title":"Chat with an agent","openapi":"POST /bot/{public_url}/api","href":"/api-reference/endpoint/chat-with-bot"}]}]}]},"basePath":"","title":"Generate Video - Easy-Peasy.AI Docs","buildId":"dpl_6PxPD4Fj1JDU9BJxEHvfdUmxKThw","deploymentId":"dpl_6PxPD4Fj1JDU9BJxEHvfdUmxKThw","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CASS2Vpq.js","utils-4k9fyWRu.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-UU-UueZb.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BgJ0LOYq.js","snippetPresets-CMgzlMR-.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BzEJegkK.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CZuQIZdk.js","shallow-Bw5arfMA.js","getApiPlaygroundDisplay-Ds834aVN.js","CodeSnippet-CKzmjw9L.js","CodeSnippets-BRpgomdp.js","Page-DvEUoD2H.js","getPastedJson-B0N-Tn76.js","icon-DASMs9nC.js","MethodPill-BA6DBLqx.js","DuplicateIcon-BMT5qfbJ.js","createIcon-CNfwVWPx.js","DynamicMarkdown-JYyBNlrJ.js","SectionHeading-BbZnmz8a.js","axios-vUo_bRtp.js","Markdown-LUU0YLpA.js","clsx-Di4ek5Ae.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-VEVWQCR4.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-CPszyu99.js"]}