{
  "aboutHtml": "<p>Avatar IV is HeyGen’s avatar engine for turning a still image into an expressive talking video. Its diffusion-inspired audio-to-expression design uses vocal tone, rhythm and emotion to guide facial movement, head tilts, pauses and micro-expressions. The purpose is a presenter or character delivering spoken content with lip sync and gestures, rather than a general scene generator that creates a whole setting and soundtrack from a cinematic prompt.</p><p>The manufacturer describes support for lifelike and stylized characters, including angled or profile images, anime-style faces and pets. Photo-based characters work best when their eyes, mouth and facial structure are easy to identify. HeyGen recommends a clear, well-lit image with a natural posture and visible hands when gestures matter. A very small face, hidden lips, heavy masks, a pronounced beak or highly exaggerated proportions can weaken facial movement and lip sync. Keep the source framing suited to the intended performance.</p><p>The producer provides two speech-input paths. A written script is paired with a selected voice; a prerecorded audio track supplies the voice and timing directly. Use the recorded-audio path when the delivery is already established, and the script path when the speech needs to be synthesized. These inputs are alternatives in the documented interface. Prepare the final wording, names and pronunciation before animation, and preserve the audio or script with the returned video so the spoken result can be checked.</p><p>HeyGen’s Avatar IV model profile covers studio avatars, Digital Twins, Photo Avatars, direct images and prompt-created subjects. A reusable Photo Avatar provides a stable subject for later videos, while a direct-image workflow starts from the supplied picture. The producer’s Photo Avatar profile offers free-text motion instructions and expressiveness choices of high, medium or low, with low as its default. Retain the chosen avatar look and engine when making a series so a changed source image or rendering model does not become an unnoticed change in the presenter.</p><p>For motion direction, describe a visible body action and its emotional quality. “Nods gently with a warm smile” gives one gesture and one expression; a brief greeting can use a friendly wave. The maker recommends one main gesture, optionally paired with a facial expression, and no more than two short clauses for a sequence. Avatar IV handles pacing from the performance, so the Studio guide does not require a second-by-second gesture schedule. Specific, concise wording is easier to inspect than several competing actions in one prompt.</p><p>The producer’s audio-to-video profile renders up to thirty minutes of supplied audio per request, and uploaded MP3 or WAV assets have a 32 MB limit. For a longer lesson or recording, divide the material at coherent speech boundaries and retain the original ordering. The final video’s spoken timing should follow the selected audio rather than an unrelated clip-duration estimate.</p><p>The documented producer output settings include 720p or 1080p and shapes of 16:9, 9:16, 4:5, 5:4 or 1:1, with an automatic option that follows the source proportions. A cover fit can crop the subject; contain fits the whole subject and may leave surrounding background visible. Its audio-to-video workflow returns MP4 by default. For video avatars, transparent WebM output requires matting support, and the producer applies background removal for that output rather than combining it with a new background. Inspect the actual framing and file before placing the presenter in a larger composition.</p><p>A training introduction can use a readable presenter image, a concise explanation and one restrained gesture at the key instruction. A product explainer can retain the same avatar look while changing the spoken script for different features. The producer also documents optional subtitle files and burned captions; review their wording and timing alongside the speech. Rendering is asynchronous in the maker interface, so a creation response and the completed video are different artifacts. Keep the finished recording and its completion state with the task’s result.</p><p>Avatar IV remains distinct from Avatar V’s reference-driven motion and its separate Studio preset controls. It is also distinct from HeyGen Video’s general-purpose scene generation and from an interactive live-avatar conversation. Review the rendered mouth movement, visible hands, facial expression, pauses and spoken wording against the source material and intended tone. Image, pose, lighting and motion instructions affect the result; a photo-based animation should be checked as a generated performance, with the chosen inputs retained for later revisions.</p>",
  "aboutText": "Avatar IV is HeyGen’s avatar engine for turning a still image into an expressive talking video. Its diffusion-inspired audio-to-expression design uses vocal tone, rhythm and emotion to guide facial movement, head tilts, pauses and micro-expressions. The purpose is a presenter or character delivering spoken content with lip sync and gestures, rather than a general scene generator that creates a whole setting and soundtrack from a cinematic prompt.\n\nThe manufacturer describes support for lifelike and stylized characters, including angled or profile images, anime-style faces and pets. Photo-based characters work best when their eyes, mouth and facial structure are easy to identify. HeyGen recommends a clear, well-lit image with a natural posture and visible hands when gestures matter. A very small face, hidden lips, heavy masks, a pronounced beak or highly exaggerated proportions can weaken facial movement and lip sync. Keep the source framing suited to the intended performance.\n\nThe producer provides two speech-input paths. A written script is paired with a selected voice; a prerecorded audio track supplies the voice and timing directly. Use the recorded-audio path when the delivery is already established, and the script path when the speech needs to be synthesized. These inputs are alternatives in the documented interface. Prepare the final wording, names and pronunciation before animation, and preserve the audio or script with the returned video so the spoken result can be checked.\n\nHeyGen’s Avatar IV model profile covers studio avatars, Digital Twins, Photo Avatars, direct images and prompt-created subjects. A reusable Photo Avatar provides a stable subject for later videos, while a direct-image workflow starts from the supplied picture. The producer’s Photo Avatar profile offers free-text motion instructions and expressiveness choices of high, medium or low, with low as its default. Retain the chosen avatar look and engine when making a series so a changed source image or rendering model does not become an unnoticed change in the presenter.\n\nFor motion direction, describe a visible body action and its emotional quality. “Nods gently with a warm smile” gives one gesture and one expression; a brief greeting can use a friendly wave. The maker recommends one main gesture, optionally paired with a facial expression, and no more than two short clauses for a sequence. Avatar IV handles pacing from the performance, so the Studio guide does not require a second-by-second gesture schedule. Specific, concise wording is easier to inspect than several competing actions in one prompt.\n\nThe producer’s audio-to-video profile renders up to thirty minutes of supplied audio per request, and uploaded MP3 or WAV assets have a 32 MB limit. For a longer lesson or recording, divide the material at coherent speech boundaries and retain the original ordering. The final video’s spoken timing should follow the selected audio rather than an unrelated clip-duration estimate.\n\nThe documented producer output settings include 720p or 1080p and shapes of 16:9, 9:16, 4:5, 5:4 or 1:1, with an automatic option that follows the source proportions. A cover fit can crop the subject; contain fits the whole subject and may leave surrounding background visible. Its audio-to-video workflow returns MP4 by default. For video avatars, transparent WebM output requires matting support, and the producer applies background removal for that output rather than combining it with a new background. Inspect the actual framing and file before placing the presenter in a larger composition.\n\nA training introduction can use a readable presenter image, a concise explanation and one restrained gesture at the key instruction. A product explainer can retain the same avatar look while changing the spoken script for different features. The producer also documents optional subtitle files and burned captions; review their wording and timing alongside the speech. Rendering is asynchronous in the maker interface, so a creation response and the completed video are different artifacts. Keep the finished recording and its completion state with the task’s result.\n\nAvatar IV remains distinct from Avatar V’s reference-driven motion and its separate Studio preset controls. It is also distinct from HeyGen Video’s general-purpose scene generation and from an interactive live-avatar conversation. Review the rendered mouth movement, visible hands, facial expression, pauses and spoken wording against the source material and intended tone. Image, pose, lighting and motion instructions affect the result; a photo-based animation should be checked as a generated performance, with the chosen inputs retained for later revisions.",
  "editorialOverlay": {
    "copy_fields": null,
    "copy_sha256": null,
    "copy_source": null,
    "html_sha256": "e2a938a8ced2f7ff96c545836632ce8f86940fc2406a7daf4833a71c67b84452",
    "module_sha256": "ee9dc1c50b1e6a8fb7fa062030fcb4646b9aaaeb08be513b723a5a92a7290f06",
    "raw_model_unchanged": true,
    "schema": "ailoot-native-model-editorial-v1"
  },
  "locale": "en",
  "methods": [
    {
      "html": "<div class=\"sheet-head\"><span class=\"mav\" aria-hidden=\"true\">•</span><h2 id=\"sheet-title\">HeyGen: Avatar IV</h2><button class=\"icon-btn\" type=\"button\" data-close-sheet aria-label=\"Close\">×</button></div><div class=\"idline\"><span>HeyGen /</span><code>heygen/avatar-iv</code><button type=\"button\" id=\"copy-id\">Copy ID</button></div><nav class=\"card-jump-nav\" aria-label=\"Model card sections\"><button type=\"button\" data-card-jump=\"overview\">Overview</button><button type=\"button\" data-card-jump=\"methods\">Inputs &amp; methods</button><button type=\"button\" data-card-jump=\"pricing\">Pricing</button><button type=\"button\" data-card-jump=\"examples\">Examples</button><button type=\"button\" data-card-jump=\"results\">Results</button><button type=\"button\" data-card-jump=\"aliases\">Aliases</button></nav><div class=\"card-method-tabs\" role=\"tablist\" aria-label=\"API methods\"><button type=\"button\" role=\"tab\" tabindex=\"0\" aria-controls=\"card-method-content\" aria-selected=\"true\" id=\"card-method-tab-0\" data-card-method=\"Ultra|videos|/v1/videos|heygen%2Favatar-iv\">Video</button></div><div id=\"card-method-content\" role=\"tabpanel\" aria-labelledby=\"card-method-tab-0\"><section class=\"card-section\" data-card-section=\"overview\"><h3 tabindex=\"-1\">Overview</h3><p class=\"mdesc-full\">Avatar IV animates a photo into a lip-synced talking video, with facial expression and gesture timing guided by the voice. HeyGen documents script or recorded-audio workflows and Photo Avatar motion controls for lifelike or stylized presenters.</p><dl class=\"card-io\" data-card-io><div><dt>Accepted inputs</dt><dd>Text · Images · Audio · Video</dd></div><div><dt>Results</dt><dd>Video</dd></div></dl><details class=\"card-about\"><summary>About the model</summary><p class=\"note-s\" data-model-method-boundary>This description covers the model’s capabilities. Available in Ailoot inputs, outputs and options are listed for the selected method below.</p><div class=\"mabout\" id=\"m-about\"><p>Avatar IV is HeyGen’s avatar engine for turning a still image into an expressive talking video. Its diffusion-inspired audio-to-expression design uses vocal tone, rhythm and emotion to guide facial movement, head tilts, pauses and micro-expressions. The purpose is a presenter or character delivering spoken content with lip sync and gestures, rather than a general scene generator that creates a whole setting and soundtrack from a cinematic prompt.</p><p>The manufacturer describes support for lifelike and stylized characters, including angled or profile images, anime-style faces and pets. Photo-based characters work best when their eyes, mouth and facial structure are easy to identify. HeyGen recommends a clear, well-lit image with a natural posture and visible hands when gestures matter. A very small face, hidden lips, heavy masks, a pronounced beak or highly exaggerated proportions can weaken facial movement and lip sync. Keep the source framing suited to the intended performance.</p><p>The producer provides two speech-input paths. A written script is paired with a selected voice; a prerecorded audio track supplies the voice and timing directly. Use the recorded-audio path when the delivery is already established, and the script path when the speech needs to be synthesized. These inputs are alternatives in the documented interface. Prepare the final wording, names and pronunciation before animation, and preserve the audio or script with the returned video so the spoken result can be checked.</p><p>HeyGen’s Avatar IV model profile covers studio avatars, Digital Twins, Photo Avatars, direct images and prompt-created subjects. A reusable Photo Avatar provides a stable subject for later videos, while a direct-image workflow starts from the supplied picture. The producer’s Photo Avatar profile offers free-text motion instructions and expressiveness choices of high, medium or low, with low as its default. Retain the chosen avatar look and engine when making a series so a changed source image or rendering model does not become an unnoticed change in the presenter.</p><p>For motion direction, describe a visible body action and its emotional quality. “Nods gently with a warm smile” gives one gesture and one expression; a brief greeting can use a friendly wave. The maker recommends one main gesture, optionally paired with a facial expression, and no more than two short clauses for a sequence. Avatar IV handles pacing from the performance, so the Studio guide does not require a second-by-second gesture schedule. Specific, concise wording is easier to inspect than several competing actions in one prompt.</p><p>The producer’s audio-to-video profile renders up to thirty minutes of supplied audio per request, and uploaded MP3 or WAV assets have a 32 MB limit. For a longer lesson or recording, divide the material at coherent speech boundaries and retain the original ordering. The final video’s spoken timing should follow the selected audio rather than an unrelated clip-duration estimate.</p><p>The documented producer output settings include 720p or 1080p and shapes of 16:9, 9:16, 4:5, 5:4 or 1:1, with an automatic option that follows the source proportions. A cover fit can crop the subject; contain fits the whole subject and may leave surrounding background visible. Its audio-to-video workflow returns MP4 by default. For video avatars, transparent WebM output requires matting support, and the producer applies background removal for that output rather than combining it with a new background. Inspect the actual framing and file before placing the presenter in a larger composition.</p><p>A training introduction can use a readable presenter image, a concise explanation and one restrained gesture at the key instruction. A product explainer can retain the same avatar look while changing the spoken script for different features. The producer also documents optional subtitle files and burned captions; review their wording and timing alongside the speech. Rendering is asynchronous in the maker interface, so a creation response and the completed video are different artifacts. Keep the finished recording and its completion state with the task’s result.</p><p>Avatar IV remains distinct from Avatar V’s reference-driven motion and its separate Studio preset controls. It is also distinct from HeyGen Video’s general-purpose scene generation and from an interactive live-avatar conversation. Review the rendered mouth movement, visible hands, facial expression, pauses and spoken wording against the source material and intended tone. Image, pose, lighting and motion instructions affect the result; a photo-based animation should be checked as a generated performance, with the chosen inputs retained for later revisions.</p></div></details></section><section class=\"card-section\" data-card-section=\"methods\"><h3 tabindex=\"-1\">Available in Ailoot · inputs &amp; methods</h3><details class=\"card-method\" open><summary><b>Ailoot Ultra · Video</b> <code>POST /v1/videos</code></summary><dl class=\"method-capabilities\"><div><dt>Input types</dt><dd><code>text</code>, <code>image</code>, <code>audio</code>, <code>video</code></dd></div><div><dt>Output types</dt><dd><code>video</code></dd></div></dl><div class=\"tw\" data-card-parameters data-typed-parameters><table><thead><tr><th>Field</th><th>Type</th><th>Requirement</th><th>Values &amp; limits</th><th>Default</th></tr></thead><tbody><tr><th data-cell-label=\"Field\" scope=\"row\"><span class=\"card-cell-label\">Field</span><code class=\"card-field-name\">model</code></th><td data-cell-label=\"Type\" data-field-type><span class=\"card-cell-label\">Type</span><code>string</code></td><td data-cell-label=\"Requirement\"><span class=\"card-cell-label\">Requirement</span>Required</td><td data-cell-label=\"Values &amp; limits\"><span class=\"card-cell-label\">Values &amp; limits</span><div>heygen/avatar-iv</div></td><td data-cell-label=\"Default\" data-default=\"unspecified\"><span class=\"card-cell-label\">Default</span>—</td></tr><tr><th data-cell-label=\"Field\" scope=\"row\"><span class=\"card-cell-label\">Field</span><code class=\"card-field-name\">input_references</code></th><td data-cell-label=\"Type\" data-field-type><span class=\"card-cell-label\">Type</span><code>array</code></td><td data-cell-label=\"Requirement\"><span class=\"card-cell-label\">Requirement</span>Required</td><td data-cell-label=\"Values &amp; limits\"><span class=\"card-cell-label\">Values &amp; limits</span><div>Minimum items: 2</div><div>Maximum items: 2</div></td><td data-cell-label=\"Default\" data-default=\"unspecified\"><span class=\"card-cell-label\">Default</span>—</td></tr><tr><th data-cell-label=\"Field\" scope=\"row\"><span class=\"card-cell-label\">Field</span><code class=\"card-field-name\">prompt</code></th><td data-cell-label=\"Type\" data-field-type><span class=\"card-cell-label\">Type</span><code>string</code></td><td data-cell-label=\"Requirement\"><span class=\"card-cell-label\">Requirement</span>Optional</td><td data-cell-label=\"Values &amp; limits\"><span class=\"card-cell-label\">Values &amp; limits</span></td><td data-cell-label=\"Default\" data-default=\"unspecified\"><span class=\"card-cell-label\">Default</span>—</td></tr></tbody></table></div><details class=\"note-s\" data-method-contract><summary>Method parameters and lifecycle</summary><div class=\"tw\" data-card-table=\"contract\"><table><thead><tr><th>Parameter</th><th>Contract</th></tr></thead><tbody><tr><th data-cell-label=\"Parameter\" scope=\"row\"><span class=\"card-cell-label\">Parameter</span><code>content_type</code></th><td data-cell-label=\"Contract\"><span class=\"card-cell-label\">Contract</span>application/json</td></tr><tr><th data-cell-label=\"Parameter\" scope=\"row\"><span class=\"card-cell-label\">Parameter</span><code>required</code></th><td data-cell-label=\"Contract\"><span class=\"card-cell-label\">Contract</span>model, input_references</td></tr><tr><th data-cell-label=\"Parameter\" scope=\"row\"><span class=\"card-cell-label\">Parameter</span><code>material_types</code></th><td data-cell-label=\"Contract\"><span class=\"card-cell-label\">Contract</span>text, image, audio, video</td></tr><tr><th data-cell-label=\"Parameter\" scope=\"row\"><span class=\"card-cell-label\">Parameter</span><code>material_conditions</code></th><td data-cell-label=\"Contract\"><span class=\"card-cell-label\">Contract</span>Use actual completed owned media asset content URLs with their returned signatures: one video source for BFL, or one image and one audio source for avatar. The Source owner/type/byte witness is required., Supply exactly one PNG/JPEG image and one WAV/MP3 audio asset. The audio is at most32000000 bytes, with duration greater than0 and at most1800 seconds.</td></tr></tbody></table></div><p>Lifecycle: <code>asynchronous_job_then_owned_outputs</code></p><p class=\"note-s\"><code>GET /v1/videos/{request_id}</code> · actual returned id or polling_url</p><p class=\"note-s\"><code>GET /v1/videos/{request_id}/content</code></p></details></details></section><section class=\"card-section\" data-card-section=\"pricing\"><h3 tabindex=\"-1\">Pricing</h3><div class=\"card-result-process\" data-billing-basis><h5>How the final charge is calculated</h5><p class=\"note-s\">The displayed rates estimate the cost before generation. The final charge is calculated from the cost recorded for the original generation. Measured output duration and forecast quantities are not the final billable quantity.</p></div><div data-native-semantic-method=\"v1\" data-tariff-reference-only><p class=\"note-s\" data-rate-support-note>Tariff references do not add request options. Supported parameters are listed for the selected method.</p><dl data-price-conditions><dt>Fast mode</dt><dd>Not specified <span class=\"note-s\">When fast mode is selected</span></dd><dt>Flex mode</dt><dd>Not specified <span class=\"note-s\">When flex mode is selected</span></dd><dt>Maximum reasoning effort</dt><dd>Not specified <span class=\"note-s\">When maximum reasoning effort uses the default adjustment</span></dd></dl></div><div data-declared-tariff-pricing><h4>Estimated rates for comparison</h4><h4>Prices by configuration</h4><p class=\"note-s\">Match each charge to the conditions shown. Use one rate for each set of alternative configurations.</p><div class=\"tw\" data-pricing-profiles><table><thead><tr><th>Configuration</th><th>Rate schedule</th><th>Forecast quantity</th><th>Billing unit</th><th>Billing conditions</th><th>Charge</th></tr></thead><tbody><tr><th data-cell-label=\"Configuration\" scope=\"row\"><span class=\"card-cell-label\">Configuration</span>Base token rates</th><td data-cell-label=\"Rate schedule\"><span class=\"card-cell-label\">Rate schedule</span>Base rate</td><td data-cell-label=\"Forecast quantity\"><span class=\"card-cell-label\">Forecast quantity</span>—</td><td data-cell-label=\"Billing unit\"><span class=\"card-cell-label\">Billing unit</span>—</td><td data-cell-label=\"Billing conditions\"><span class=\"card-cell-label\">Billing conditions</span>—</td><td data-cell-label=\"Charge\"><span class=\"card-cell-label\">Charge</span><div><span>Input · Input tokens · Estimate for comparison only</span> <b>—</b> <span class=\"price-unit\">/ 1K tokens</span></div><div><span>Output · Output tokens · Estimate for comparison only</span> <b>—</b> <span class=\"price-unit\">/ 1K tokens</span></div><div><span>Input · Cache read · Estimate for comparison only</span> <b>—</b> <span class=\"price-unit\">/ 1K tokens</span></div><div><span>Input · Cache write · Estimate for comparison only</span> <b>—</b> <span class=\"price-unit\">/ 1K tokens</span></div><div><span>Input · Cache write, 1 hour · Estimate for comparison only</span> <b>—</b> <span class=\"price-unit\">/ 1K tokens</span></div></td></tr><tr><th data-cell-label=\"Configuration\" scope=\"row\"><span class=\"card-cell-label\">Configuration</span>Video price</th><td data-cell-label=\"Rate schedule\"><span class=\"card-cell-label\">Rate schedule</span>—</td><td data-cell-label=\"Forecast quantity\"><span class=\"card-cell-label\">Forecast quantity</span>—</td><td data-cell-label=\"Billing unit\"><span class=\"card-cell-label\">Billing unit</span>per video second</td><td data-cell-label=\"Billing conditions\"><span class=\"card-cell-label\">Billing conditions</span>No additional condition is declared in this pricing key.</td><td data-cell-label=\"Charge\"><span class=\"card-cell-label\">Charge</span><div><span>Output · Video price · Estimate for comparison only</span> <b>$0.1</b> <span class=\"price-unit\">per video second</span></div></td></tr><tr><th data-cell-label=\"Configuration\" scope=\"row\"><span class=\"card-cell-label\">Configuration</span>Estimated generation cost</th><td data-cell-label=\"Rate schedule\"><span class=\"card-cell-label\">Rate schedule</span>—</td><td data-cell-label=\"Forecast quantity\"><span class=\"card-cell-label\">Forecast quantity</span>one generation estimate</td><td data-cell-label=\"Billing unit\"><span class=\"card-cell-label\">Billing unit</span>—</td><td data-cell-label=\"Billing conditions\"><span class=\"card-cell-label\">Billing conditions</span>—</td><td data-cell-label=\"Charge\"><span class=\"card-cell-label\">Charge</span><div><span>Output · Estimated generation cost · Estimate for comparison only</span> <b>$0.1</b> <span class=\"price-unit\">estimate before generation</span></div><p class=\"note-s\">This estimate is not an additional charge or a fixed rate for the completed generation.</p></td></tr></tbody></table></div></div><p class=\"note-s\">Ailoot reserves an estimated amount before a request. After the result, it settles the final charge from measured usage. Streaming settlement uses the final usage record. <a href=\"/docs/en/billing/reserve/\">How reservation and settlement work →</a></p></section><section class=\"card-section\" data-card-section=\"examples\"><h3 tabindex=\"-1\">Example requests</h3><h4>Ailoot Ultra · Video</h4><div class=\"code-group\"><div class=\"cg-bar\"><div class=\"cg-tabs\" role=\"tablist\" aria-label=\"Code options\"><button class=\"cg-tab\" id=\"model-code-1711-tab-0\" role=\"tab\" type=\"button\" aria-controls=\"model-code-1711-panel-0\" aria-selected=\"true\" tabindex=\"0\">Use actual input and retain the complete result</button></div><div class=\"cg-tools\"><button class=\"cg-btn cg-copy\" type=\"button\" aria-label=\"Copy code\"><svg class=\"cp\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\"><rect x=\"5.25\" y=\"5.25\" width=\"8.5\" height=\"8.5\" rx=\"1.75\"/><path d=\"M10.75 5.25V3.5a1.25 1.25 0 0 0-1.25-1.25H3.5A1.25 1.25 0 0 0 2.25 3.5v6a1.25 1.25 0 0 0 1.25 1.25h1.75\"/></svg><svg class=\"ok\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\"><path d=\"m3 8.5 3.25 3.25L13 5\"/></svg></button></div></div><div class=\"cg-body\"><div class=\"cg-pane\" id=\"model-code-1711-panel-0\" role=\"tabpanel\" aria-labelledby=\"model-code-1711-tab-0\"><pre data-lang=\"bash\"><code>set -eu\n: &quot;${AILOOT_API_KEY:?Set your Ailoot API key}&quot;\n: &quot;${AILOOT_INPUT_REFERENCES_JSON:?Set the actual documented input value}&quot;\nexport AILOOT_INPUT_REFERENCES_JSON\npython3 - &lt;&lt;&#39;PY_REQUEST&#39;\nimport json,os\nfrom pathlib import Path\nrequest={&#39;model&#39;: &#39;heygen/avatar-iv&#39;, &#39;input_references&#39;: &#39;${ACTUAL_OWNED_INPUT_REFERENCES}&#39;}\nrequest[&#39;input_references&#39;]=json.loads(os.environ[&#39;AILOOT_INPUT_REFERENCES_JSON&#39;])\nPath(&#39;request.json&#39;).write_text(json.dumps(request,ensure_ascii=False),encoding=&#39;utf-8&#39;)\nPY_REQUEST\ncurl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/videos \\\n  -H &quot;Authorization: Bearer $AILOOT_API_KEY&quot; -H &#39;Content-Type: application/json&#39; \\\n  --data-binary @request.json -D response-headers.txt -o response.bin\n# Retain the complete response and headers, every actual output, original returned identifiers and all usage fields. Recover the original operation without submitting creation again.\n</code></pre></div></div></div></section><section class=\"card-section\" data-card-section=\"results\"><h3 tabindex=\"-1\">Receive and save results</h3><h4>Ailoot Ultra · Video</h4><ul class=\"card-result-paths\"><li><code>GET /v1/videos/{request_id}</code></li><li><code>GET /v1/videos/{request_id}/content</code></li></ul><h5>Save all completed assets</h5><div class=\"code-group\"><div class=\"cg-bar\"><div class=\"cg-tabs\" role=\"tablist\" aria-label=\"Code options\"><button class=\"cg-tab\" id=\"model-code-1712-tab-0\" role=\"tab\" type=\"button\" aria-controls=\"model-code-1712-panel-0\" aria-selected=\"true\" tabindex=\"0\">GET all completed assets</button></div><div class=\"cg-tools\"><button class=\"cg-btn cg-copy\" type=\"button\" aria-label=\"Copy code\"><svg class=\"cp\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\"><rect x=\"5.25\" y=\"5.25\" width=\"8.5\" height=\"8.5\" rx=\"1.75\"/><path d=\"M10.75 5.25V3.5a1.25 1.25 0 0 0-1.25-1.25H3.5A1.25 1.25 0 0 0 2.25 3.5v6a1.25 1.25 0 0 0 1.25 1.25h1.75\"/></svg><svg class=\"ok\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\"><path d=\"m3 8.5 3.25 3.25L13 5\"/></svg></button></div></div><div class=\"cg-body\"><div class=\"cg-pane\" id=\"model-code-1712-panel-0\" role=\"tabpanel\" aria-labelledby=\"model-code-1712-tab-0\"><pre data-lang=\"bash\"><code>set -eu\n: &quot;${AILOOT_API_KEY:?Set your Ailoot API key}&quot;\n: &quot;${AILOOT_STATUS_FILE:?Set the actual completed status JSON file}&quot;\nexport AILOOT_STATUS_FILE\npython3 - &lt;&lt;&#39;PY_REQUEST&#39;\nimport json,os\nfrom pathlib import Path\nfrom urllib.parse import urlsplit,urljoin\nf=Path(os.environ[&quot;AILOOT_STATUS_FILE&quot;])\nif not f.is_file():raise SystemExit(&quot;Choose the actual completed status file&quot;)\nr=json.loads(f.read_text())\nif r.get(&quot;status&quot;)!=&quot;completed&quot; or not isinstance(r.get(&quot;data&quot;),list) or not r[&quot;data&quot;]:raise SystemExit(&quot;Wait for a completed status with asset paths&quot;)\nurls=[]\nfor x in r[&quot;data&quot;]:\n    if not isinstance(x,str) or &quot;\\n&quot; in x or &quot;\\r&quot; in x:raise SystemExit(&quot;Invalid asset path&quot;)\n    u=urljoin(&quot;https://api.ailoot.ai&quot;,x)\n    z=urlsplit(u)\n    if z.scheme!=&quot;https&quot; or z.netloc!=&quot;api.ailoot.ai&quot; or z.username or z.password:raise SystemExit(&quot;Use the actual Ailoot asset paths from status&quot;)\n    urls.append(u)\nPath(&quot;asset-urls.txt&quot;).write_text(&quot;\\n&quot;.join(urls)+&quot;\\n&quot;)\nPY_REQUEST\nindex=0\nwhile IFS= read -r asset_url; do\n  curl --fail-with-body --silent --show-error &quot;$asset_url&quot; \\\n    -H &quot;Authorization: Bearer $AILOOT_API_KEY&quot; -o &quot;video-${index}.mp4&quot;\n  index=$((index + 1))\ndone &lt; asset-urls.txt\n</code></pre></div></div></div><div class=\"card-result-process\" data-all-results><h5>Keep all completed results</h5><p class=\"note-s\">Save every completed video or returned file; retrieve every actual returned asset URL.</p><p class=\"note-s\">Retain the complete response and headers, every actual output, original returned identifiers and all usage fields. Recover the original operation without submitting creation again.</p></div><div class=\"card-result-process\" data-unknown-recovery><h5>If the original response needs checking</h5><p class=\"note-s\">Keep X-Client-Request-ID, X-Ailoot-Task-Id and actual returned id/polling_url. Continue the original job; do not submit creation again.</p></div><details class=\"card-about\" data-output-fields><summary>Response fields</summary><div class=\"tw\" data-card-table=\"output\"><table><thead><tr><th>Field</th><th>Type</th></tr></thead><tbody><tr><th data-cell-label=\"Field\" scope=\"row\"><span class=\"card-cell-label\">Field</span><code class=\"card-field-name\">id</code></th><td data-cell-label=\"Type\" data-field-type><span class=\"card-cell-label\">Type</span></td></tr><tr><th data-cell-label=\"Field\" scope=\"row\"><span class=\"card-cell-label\">Field</span><code class=\"card-field-name\">status</code></th><td data-cell-label=\"Type\" data-field-type><span class=\"card-cell-label\">Type</span></td></tr><tr><th data-cell-label=\"Field\" scope=\"row\"><span class=\"card-cell-label\">Field</span><code class=\"card-field-name\">data[]</code></th><td data-cell-label=\"Type\" data-field-type><span class=\"card-cell-label\">Type</span></td></tr><tr><th data-cell-label=\"Field\" scope=\"row\"><span class=\"card-cell-label\">Field</span><code class=\"card-field-name\">outputs[]</code></th><td data-cell-label=\"Type\" data-field-type><span class=\"card-cell-label\">Type</span></td></tr></tbody></table></div></details></section><section class=\"card-section\" data-card-section=\"aliases\"><h3 tabindex=\"-1\">Aliases</h3><h4>Model aliases</h4><p class=\"note-s\"><span data-model-alias-route=\"Ultra\"><b>Ailoot Ultra</b> <a href=\"#m=heygen%2Favatar-iv&amp;route=Ultra&amp;caller=heygen%2Favatar-iv&amp;fmt=videos\"><code>heygen/avatar-iv</code></a></span></p><h4>Method path aliases</h4><p class=\"note-s\">Use the method paths shown above.</p><h4>Related caller IDs</h4><p class=\"note-s\"><a href=\"#m=heygen%2Favatar-iv&amp;route=Ultra&amp;caller=heygen%2Favatar-iv&amp;fmt=videos\"><code>heygen/avatar-iv</code></a></p></section></div>",
      "method_identity": {
        "effective_request_model_id": "heygen/avatar-iv",
        "fmt": "videos",
        "http": "POST",
        "path": "/v1/videos",
        "request_model_id": "heygen/avatar-iv",
        "route_label": "Ultra"
      },
      "method_key": "Ultra|videos|/v1/videos|heygen%2Favatar-iv",
      "ordinal": 0,
      "rawMethod": {
        "available": null,
        "billing_basis": {
          "basis": "original_invoice_usd",
          "description": "The displayed rates estimate the cost before generation. The final charge is calculated from the cost recorded for the original generation. Measured output duration and forecast quantities are not the final billable quantity.",
          "forecast_quantity_is_estimate": true,
          "physical_output_is_billable_quantity": false,
          "version": "original_invoice_usd_v1"
        },
        "cache_read": null,
        "cache_write": null,
        "cache_write_1h": null,
        "contract": {
          "data": {
            "all_results": "Retain the complete response and headers, every actual output, original returned identifiers and all usage fields. Recover the original operation without submitting creation again.",
            "lifecycle": {
              "content": [
                {
                  "http": "GET",
                  "path": "/v1/videos/{request_id}/content",
                  "query": {
                    "index": "actual zero-based output index from completed manifest"
                  }
                }
              ],
              "creation_id_field": "id",
              "media_library": {
                "http": "GET",
                "path": "/v1/media/assets"
              },
              "mode": "asynchronous_job_then_owned_outputs",
              "operation_id_is_not_task_id": true,
              "output_content_response": "owned MP4 bytes with Range support",
              "status": [
                {
                  "http": "GET",
                  "id_source": "actual returned id or polling_url",
                  "path": "/v1/videos/{request_id}"
                }
              ],
              "unknown": "Keep X-Client-Request-ID, X-Ailoot-Task-Id and actual returned id/polling_url. Continue the original job; do not submit creation again."
            },
            "outputs": {
              "all_results": "Retain the complete response and headers, every actual output, original returned identifiers and all usage fields. Recover the original operation without submitting creation again.",
              "family": "video",
              "fields": [
                {
                  "description": null,
                  "name": "id",
                  "type": null
                },
                {
                  "description": null,
                  "name": "status",
                  "type": null
                },
                {
                  "description": null,
                  "name": "data[]",
                  "type": null
                },
                {
                  "description": null,
                  "name": "outputs[]",
                  "type": null
                }
              ]
            },
            "parameters": [
              {
                "enum": [
                  "heygen/avatar-iv"
                ],
                "enum_known": true,
                "name": "model",
                "required": true,
                "type": "string"
              },
              {
                "items": {
                  "anyOf": [
                    {
                      "additionalProperties": false,
                      "properties": {
                        "image_url": {
                          "additionalProperties": false,
                          "properties": {
                            "url": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "url"
                          ],
                          "type": "object"
                        },
                        "type": {
                          "const": "image_url"
                        }
                      },
                      "required": [
                        "type",
                        "image_url"
                      ],
                      "type": "object"
                    },
                    {
                      "additionalProperties": false,
                      "properties": {
                        "audio_url": {
                          "additionalProperties": false,
                          "properties": {
                            "url": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "url"
                          ],
                          "type": "object"
                        },
                        "type": {
                          "const": "audio_url"
                        }
                      },
                      "required": [
                        "type",
                        "audio_url"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "maximum_items": 2,
                "minimum_items": 2,
                "name": "input_references",
                "required": true,
                "type": "array"
              },
              {
                "name": "prompt",
                "required": false,
                "type": "string"
              }
            ],
            "request_schema": {
              "additionalProperties": false,
              "properties": {
                "input_references": {
                  "allOf": [
                    {
                      "contains": {
                        "additionalProperties": false,
                        "properties": {
                          "image_url": {
                            "additionalProperties": false,
                            "properties": {
                              "url": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "url"
                            ],
                            "type": "object"
                          },
                          "type": {
                            "const": "image_url"
                          }
                        },
                        "required": [
                          "type",
                          "image_url"
                        ],
                        "type": "object"
                      },
                      "maxContains": 1,
                      "minContains": 1
                    },
                    {
                      "contains": {
                        "additionalProperties": false,
                        "properties": {
                          "audio_url": {
                            "additionalProperties": false,
                            "properties": {
                              "url": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "url"
                            ],
                            "type": "object"
                          },
                          "type": {
                            "const": "audio_url"
                          }
                        },
                        "required": [
                          "type",
                          "audio_url"
                        ],
                        "type": "object"
                      },
                      "maxContains": 1,
                      "minContains": 1
                    }
                  ],
                  "items": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "image_url": {
                            "additionalProperties": false,
                            "properties": {
                              "url": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "url"
                            ],
                            "type": "object"
                          },
                          "type": {
                            "const": "image_url"
                          }
                        },
                        "required": [
                          "type",
                          "image_url"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "audio_url": {
                            "additionalProperties": false,
                            "properties": {
                              "url": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "url"
                            ],
                            "type": "object"
                          },
                          "type": {
                            "const": "audio_url"
                          }
                        },
                        "required": [
                          "type",
                          "audio_url"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "maxItems": 2,
                  "minItems": 2,
                  "type": "array"
                },
                "model": {
                  "enum": [
                    "heygen/avatar-iv"
                  ],
                  "type": "string"
                },
                "prompt": {
                  "const": "",
                  "type": "string"
                }
              },
              "required": [
                "model",
                "input_references"
              ],
              "type": "object"
            },
            "schema_template": {
              "actual_file_preparation_required": false,
              "body": {
                "input_references": "${ACTUAL_OWNED_INPUT_REFERENCES}",
                "model": "heygen/avatar-iv"
              },
              "content_type": "application/json"
            }
          },
          "input": {
            "content_type": "application/json",
            "material_conditions": [
              "Use actual completed owned media asset content URLs with their returned signatures: one video source for BFL, or one image and one audio source for avatar. The Source owner/type/byte witness is required.",
              "Supply exactly one PNG/JPEG image and one WAV/MP3 audio asset. The audio is at most32000000 bytes, with duration greater than0 and at most1800 seconds."
            ],
            "material_types": [
              "text",
              "image",
              "audio",
              "video"
            ],
            "required": [
              "model",
              "input_references"
            ]
          },
          "lifecycle": {
            "content": [
              {
                "http": "GET",
                "path": "/v1/videos/{request_id}/content",
                "query": {
                  "index": "actual zero-based output index from completed manifest"
                }
              }
            ],
            "creation_id_field": "id",
            "media_library": {
              "http": "GET",
              "path": "/v1/media/assets"
            },
            "mode": "asynchronous_job_then_owned_outputs",
            "operation_id_is_not_task_id": true,
            "output_content_response": "owned MP4 bytes with Range support",
            "status": [
              {
                "http": "GET",
                "id_source": "actual returned id or polling_url",
                "path": "/v1/videos/{request_id}"
              }
            ],
            "unknown": "Keep X-Client-Request-ID, X-Ailoot-Task-Id and actual returned id/polling_url. Continue the original job; do not submit creation again."
          },
          "method": {
            "http": "POST",
            "path": "/v1/videos"
          },
          "output": {
            "all_results": "Retain the complete response and headers, every actual output, original returned identifiers and all usage fields. Recover the original operation without submitting creation again.",
            "family": "video",
            "fields": [
              {
                "description": null,
                "name": "id",
                "type": null
              },
              {
                "description": null,
                "name": "status",
                "type": null
              },
              {
                "description": null,
                "name": "data[]",
                "type": null
              },
              {
                "description": null,
                "name": "outputs[]",
                "type": null
              }
            ]
          }
        },
        "ctx": null,
        "declared_pricing_profiles": [
          {
            "dimensions": {
              "regime": "base"
            },
            "label": "Base token rates",
            "units": [
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          },
          {
            "dimensions": {
              "conditions": "No additional condition is declared in this pricing key.",
              "quoted_unit": "per video second"
            },
            "label": "Video price",
            "units": [
              {
                "amount": "0.1",
                "amount_unit": "usd_per_video_second",
                "billing_input": false,
                "estimate_only": true,
                "key": "duration_seconds",
                "label": "Video price",
                "native_amount_usd_per_unit": "0.1",
                "native_quantity": 1,
                "public_unit_label": "per video second",
                "quantity": 1,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "video_second"
              }
            ]
          },
          {
            "basis": "This estimate is not an additional charge or a fixed rate for the completed generation.",
            "dimensions": {
              "forecast_quantity": "one generation estimate"
            },
            "label": "Estimated generation cost",
            "units": [
              {
                "amount": "0.1",
                "amount_unit": "usd_per_exact_native_unit",
                "billing_input": false,
                "estimate_only": true,
                "key": "forecast_usd",
                "label": "Estimated generation cost",
                "native_amount_usd_per_unit": "0.1",
                "native_quantity": 1,
                "public_unit_label": "estimate before generation",
                "quantity": 1,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "request_estimate"
              }
            ]
          }
        ],
        "examples": [
          {
            "code": "set -eu\n: \"${AILOOT_API_KEY:?Set your Ailoot API key}\"\n: \"${AILOOT_INPUT_REFERENCES_JSON:?Set the actual documented input value}\"\nexport AILOOT_INPUT_REFERENCES_JSON\npython3 - <<'PY_REQUEST'\nimport json,os\nfrom pathlib import Path\nrequest={'model': 'heygen/avatar-iv', 'input_references': '${ACTUAL_OWNED_INPUT_REFERENCES}'}\nrequest['input_references']=json.loads(os.environ['AILOOT_INPUT_REFERENCES_JSON'])\nPath('request.json').write_text(json.dumps(request,ensure_ascii=False),encoding='utf-8')\nPY_REQUEST\ncurl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/videos \\\n  -H \"Authorization: Bearer $AILOOT_API_KEY\" -H 'Content-Type: application/json' \\\n  --data-binary @request.json -D response-headers.txt -o response.bin\n# Retain the complete response and headers, every actual output, original returned identifiers and all usage fields. Recover the original operation without submitting creation again.\n",
            "label": "Use actual input and retain the complete result",
            "language": "bash"
          },
          {
            "code": "set -eu\n: \"${AILOOT_API_KEY:?Set your Ailoot API key}\"\n: \"${AILOOT_STATUS_FILE:?Set the actual completed status JSON file}\"\nexport AILOOT_STATUS_FILE\npython3 - <<'PY_REQUEST'\nimport json,os\nfrom pathlib import Path\nfrom urllib.parse import urlsplit,urljoin\nf=Path(os.environ[\"AILOOT_STATUS_FILE\"])\nif not f.is_file():raise SystemExit(\"Choose the actual completed status file\")\nr=json.loads(f.read_text())\nif r.get(\"status\")!=\"completed\" or not isinstance(r.get(\"data\"),list) or not r[\"data\"]:raise SystemExit(\"Wait for a completed status with asset paths\")\nurls=[]\nfor x in r[\"data\"]:\n    if not isinstance(x,str) or \"\\n\" in x or \"\\r\" in x:raise SystemExit(\"Invalid asset path\")\n    u=urljoin(\"https://api.ailoot.ai\",x)\n    z=urlsplit(u)\n    if z.scheme!=\"https\" or z.netloc!=\"api.ailoot.ai\" or z.username or z.password:raise SystemExit(\"Use the actual Ailoot asset paths from status\")\n    urls.append(u)\nPath(\"asset-urls.txt\").write_text(\"\\n\".join(urls)+\"\\n\")\nPY_REQUEST\nindex=0\nwhile IFS= read -r asset_url; do\n  curl --fail-with-body --silent --show-error \"$asset_url\" \\\n    -H \"Authorization: Bearer $AILOOT_API_KEY\" -o \"video-${index}.mp4\"\n  index=$((index + 1))\ndone < asset-urls.txt\n",
            "label": "GET all completed assets",
            "language": "bash"
          }
        ],
        "family": "openai",
        "fast_multiplier": null,
        "flex_multiplier": null,
        "fmt": "videos",
        "hints": [
          "Use the exact caller model ID and documented input representation.",
          "Retain the complete response and headers, every actual output, original returned identifiers and all usage fields. Recover the original operation without submitting creation again."
        ],
        "http": "POST",
        "in": null,
        "input": [
          "text",
          "image",
          "audio",
          "video"
        ],
        "label": "Video",
        "max_out": null,
        "max_reasoning_effort_multiplier": null,
        "method_aliases": [],
        "native_endpoint": "videos",
        "out": null,
        "output": [
          "video"
        ],
        "path": "/v1/videos",
        "price_conditions": [
          {
            "label": "Fast mode",
            "value": "Not specified",
            "when": "When fast mode is selected"
          },
          {
            "label": "Flex mode",
            "value": "Not specified",
            "when": "When flex mode is selected"
          },
          {
            "label": "Maximum reasoning effort",
            "value": "Not specified",
            "when": "When maximum reasoning effort uses the default adjustment"
          }
        ],
        "pricing": {
          "billing_mode": "original_invoice_usd",
          "image_input_price": null,
          "image_output_price": null
        },
        "pricing_profiles": [
          {
            "dimensions": {
              "regime": "base"
            },
            "label": "Base token rates",
            "units": [
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          },
          {
            "dimensions": {
              "conditions": "No additional condition is declared in this pricing key.",
              "quoted_unit": "per video second"
            },
            "label": "Video price",
            "units": [
              {
                "amount": "0.1",
                "amount_unit": "usd_per_video_second",
                "billing_input": false,
                "estimate_only": true,
                "key": "duration_seconds",
                "label": "Video price",
                "native_amount_usd_per_unit": "0.1",
                "native_quantity": 1,
                "public_unit_label": "per video second",
                "quantity": 1,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "video_second"
              }
            ]
          },
          {
            "basis": "This estimate is not an additional charge or a fixed rate for the completed generation.",
            "dimensions": {
              "forecast_quantity": "one generation estimate"
            },
            "label": "Estimated generation cost",
            "units": [
              {
                "amount": "0.1",
                "amount_unit": "usd_per_exact_native_unit",
                "billing_input": false,
                "estimate_only": true,
                "key": "forecast_usd",
                "label": "Estimated generation cost",
                "native_amount_usd_per_unit": "0.1",
                "native_quantity": 1,
                "public_unit_label": "estimate before generation",
                "quantity": 1,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "request_estimate"
              }
            ]
          }
        ],
        "request_model_id": "heygen/avatar-iv",
        "route_label": "Ultra",
        "status_reads": [
          "GET /v1/videos/{request_id}"
        ],
        "tiers": [],
        "units": [
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": false,
            "estimate_only": true,
            "key": "input_price",
            "label": "Input tokens",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "input_token"
          },
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": false,
            "estimate_only": true,
            "key": "output_price",
            "label": "Output tokens",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "output_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "out",
            "unit": "output_token"
          },
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": false,
            "estimate_only": true,
            "key": "cache_read_price",
            "label": "Cache read",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "cached_input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "cached_input_token"
          },
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": false,
            "estimate_only": true,
            "key": "cache_write_price",
            "label": "Cache write",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "generic_cache_creation_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "generic_cache_creation_token"
          },
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": false,
            "estimate_only": true,
            "key": "cache_write_1h_price",
            "label": "Cache write, 1 hour",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "one_hour_cache_creation_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "one_hour_cache_creation_token"
          },
          {
            "amount": "0.1",
            "amount_unit": "usd_per_video_second",
            "billing_input": false,
            "estimate_only": true,
            "key": "duration_seconds",
            "label": "Video price",
            "native_amount_usd_per_unit": "0.1",
            "native_quantity": 1,
            "public_unit_label": "per video second",
            "quantity": 1,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "out",
            "unit": "video_second"
          },
          {
            "amount": "0.1",
            "amount_unit": "usd_per_exact_native_unit",
            "billing_input": false,
            "estimate_only": true,
            "key": "forecast_usd",
            "label": "Estimated generation cost",
            "native_amount_usd_per_unit": "0.1",
            "native_quantity": 1,
            "public_unit_label": "estimate before generation",
            "quantity": 1,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "out",
            "unit": "request_estimate"
          }
        ]
      }
    }
  ],
  "model_id": "heygen/avatar-iv",
  "nativeProvenance": {
    "input_facts_canonical_sha256": "d8cd5dd540c919b8f9ffdca0ff3f0b8c3d76496dedbc9cd0b747f6e2fe15f067",
    "input_html_sha256": "18e91fc5b0c91ea449f37aa50ac5154387428ccafa34fb949d56bc5bc89ffa62",
    "private_audit_sha256": "33ce8c47f723f0a8ed83f5d17a8fe4fc04c8eb516912fc2b611acdc69c07a721",
    "role": "historical-normalized-input-audit-hashes",
    "schema": "ailoot-native-model-provenance-v2"
  },
  "page": {
    "canonical": "https://ailoot.ai/models/en/heygen-avatar-iv/",
    "description": "Avatar IV animates a photo into a lip-synced talking video, with facial expression and gesture timing guided by the voice. HeyGen documents script or recorded-audio workflows and Photo Avatar motion controls for lifelike or stylized presenters.",
    "locale": "en",
    "md_url": "https://ailoot.ai/models/en/heygen-avatar-iv/index.md",
    "title": "HeyGen: Avatar IV — Ailoot",
    "url": "https://ailoot.ai/models/en/heygen-avatar-iv/"
  },
  "rawModel": {
    "about": "Avatar IV is HeyGen’s avatar engine for turning a still image into an expressive talking video. Its diffusion-inspired audio-to-expression design uses vocal tone, rhythm and emotion to guide facial movement, head tilts, pauses and micro-expressions. The purpose is a presenter or character delivering spoken content with lip sync and gestures, rather than a general scene generator that creates a whole setting and soundtrack from a cinematic prompt.\n\nThe manufacturer describes support for lifelike and stylized characters, including angled or profile images, anime-style faces and pets. Photo-based characters work best when their eyes, mouth and facial structure are easy to identify. HeyGen recommends a clear, well-lit image with a natural posture and visible hands when gestures matter. A very small face, hidden lips, heavy masks, a pronounced beak or highly exaggerated proportions can weaken facial movement and lip sync. Keep the source framing suited to the intended performance.\n\nThe producer provides two speech-input paths. A written script is paired with a selected voice; a prerecorded audio track supplies the voice and timing directly. Use the recorded-audio path when the delivery is already established, and the script path when the speech needs to be synthesized. These inputs are alternatives in the documented interface. Prepare the final wording, names and pronunciation before animation, and preserve the audio or script with the returned video so the spoken result can be checked.\n\nHeyGen’s Avatar IV model profile covers studio avatars, Digital Twins, Photo Avatars, direct images and prompt-created subjects. A reusable Photo Avatar provides a stable subject for later videos, while a direct-image workflow starts from the supplied picture. The producer’s Photo Avatar profile offers free-text motion instructions and expressiveness choices of high, medium or low, with low as its default. Retain the chosen avatar look and engine when making a series so a changed source image or rendering model does not become an unnoticed change in the presenter.\n\nFor motion direction, describe a visible body action and its emotional quality. “Nods gently with a warm smile” gives one gesture and one expression; a brief greeting can use a friendly wave. The maker recommends one main gesture, optionally paired with a facial expression, and no more than two short clauses for a sequence. Avatar IV handles pacing from the performance, so the Studio guide does not require a second-by-second gesture schedule. Specific, concise wording is easier to inspect than several competing actions in one prompt.\n\nThe producer’s audio-to-video profile renders up to thirty minutes of supplied audio per request, and uploaded MP3 or WAV assets have a 32 MB limit. For a longer lesson or recording, divide the material at coherent speech boundaries and retain the original ordering. The final video’s spoken timing should follow the selected audio rather than an unrelated clip-duration estimate.\n\nThe documented producer output settings include 720p or 1080p and shapes of 16:9, 9:16, 4:5, 5:4 or 1:1, with an automatic option that follows the source proportions. A cover fit can crop the subject; contain fits the whole subject and may leave surrounding background visible. Its audio-to-video workflow returns MP4 by default. For video avatars, transparent WebM output requires matting support, and the producer applies background removal for that output rather than combining it with a new background. Inspect the actual framing and file before placing the presenter in a larger composition.\n\nA training introduction can use a readable presenter image, a concise explanation and one restrained gesture at the key instruction. A product explainer can retain the same avatar look while changing the spoken script for different features. The producer also documents optional subtitle files and burned captions; review their wording and timing alongside the speech. Rendering is asynchronous in the maker interface, so a creation response and the completed video are different artifacts. Keep the finished recording and its completion state with the task’s result.\n\nAvatar IV remains distinct from Avatar V’s reference-driven motion and its separate Studio preset controls. It is also distinct from HeyGen Video’s general-purpose scene generation and from an interactive live-avatar conversation. Review the rendered mouth movement, visible hands, facial expression, pauses and spoken wording against the source material and intended tone. Image, pose, lighting and motion instructions affect the result; a photo-based animation should be checked as a generated performance, with the chosen inputs retained for later revisions.",
    "alias_of": null,
    "aliases": [],
    "author": "HeyGen",
    "capabilities": {
      "context_length": 0,
      "manufacturer_input": [
        "text",
        "image",
        "audio"
      ],
      "manufacturer_output": [
        "video"
      ]
    },
    "card_routes": [
      {
        "label": "Ultra",
        "rates": [
          {
            "amount": "0.1",
            "amount_unit": "usd_per_exact_native_unit",
            "billing_input": false,
            "estimate_only": true,
            "key": "forecast_usd",
            "label": "Estimated generation cost",
            "native_amount_usd_per_unit": "0.1",
            "native_quantity": 1,
            "public_unit_label": "estimate before generation",
            "quantity": 1,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "out",
            "unit": "request_estimate"
          }
        ],
        "summary": "Full configuration pricing in details."
      }
    ],
    "ctx": null,
    "formats": [
      "videos"
    ],
    "id": "heygen/avatar-iv",
    "input": [
      "text",
      "image",
      "audio",
      "video"
    ],
    "kind": "video",
    "max_out": null,
    "methods": [
      {
        "available": null,
        "billing_basis": {
          "basis": "original_invoice_usd",
          "description": "The displayed rates estimate the cost before generation. The final charge is calculated from the cost recorded for the original generation. Measured output duration and forecast quantities are not the final billable quantity.",
          "forecast_quantity_is_estimate": true,
          "physical_output_is_billable_quantity": false,
          "version": "original_invoice_usd_v1"
        },
        "cache_read": null,
        "cache_write": null,
        "cache_write_1h": null,
        "contract": {
          "data": {
            "all_results": "Retain the complete response and headers, every actual output, original returned identifiers and all usage fields. Recover the original operation without submitting creation again.",
            "lifecycle": {
              "content": [
                {
                  "http": "GET",
                  "path": "/v1/videos/{request_id}/content",
                  "query": {
                    "index": "actual zero-based output index from completed manifest"
                  }
                }
              ],
              "creation_id_field": "id",
              "media_library": {
                "http": "GET",
                "path": "/v1/media/assets"
              },
              "mode": "asynchronous_job_then_owned_outputs",
              "operation_id_is_not_task_id": true,
              "output_content_response": "owned MP4 bytes with Range support",
              "status": [
                {
                  "http": "GET",
                  "id_source": "actual returned id or polling_url",
                  "path": "/v1/videos/{request_id}"
                }
              ],
              "unknown": "Keep X-Client-Request-ID, X-Ailoot-Task-Id and actual returned id/polling_url. Continue the original job; do not submit creation again."
            },
            "outputs": {
              "all_results": "Retain the complete response and headers, every actual output, original returned identifiers and all usage fields. Recover the original operation without submitting creation again.",
              "family": "video",
              "fields": [
                {
                  "description": null,
                  "name": "id",
                  "type": null
                },
                {
                  "description": null,
                  "name": "status",
                  "type": null
                },
                {
                  "description": null,
                  "name": "data[]",
                  "type": null
                },
                {
                  "description": null,
                  "name": "outputs[]",
                  "type": null
                }
              ]
            },
            "parameters": [
              {
                "enum": [
                  "heygen/avatar-iv"
                ],
                "enum_known": true,
                "name": "model",
                "required": true,
                "type": "string"
              },
              {
                "items": {
                  "anyOf": [
                    {
                      "additionalProperties": false,
                      "properties": {
                        "image_url": {
                          "additionalProperties": false,
                          "properties": {
                            "url": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "url"
                          ],
                          "type": "object"
                        },
                        "type": {
                          "const": "image_url"
                        }
                      },
                      "required": [
                        "type",
                        "image_url"
                      ],
                      "type": "object"
                    },
                    {
                      "additionalProperties": false,
                      "properties": {
                        "audio_url": {
                          "additionalProperties": false,
                          "properties": {
                            "url": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "url"
                          ],
                          "type": "object"
                        },
                        "type": {
                          "const": "audio_url"
                        }
                      },
                      "required": [
                        "type",
                        "audio_url"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "maximum_items": 2,
                "minimum_items": 2,
                "name": "input_references",
                "required": true,
                "type": "array"
              },
              {
                "name": "prompt",
                "required": false,
                "type": "string"
              }
            ],
            "request_schema": {
              "additionalProperties": false,
              "properties": {
                "input_references": {
                  "allOf": [
                    {
                      "contains": {
                        "additionalProperties": false,
                        "properties": {
                          "image_url": {
                            "additionalProperties": false,
                            "properties": {
                              "url": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "url"
                            ],
                            "type": "object"
                          },
                          "type": {
                            "const": "image_url"
                          }
                        },
                        "required": [
                          "type",
                          "image_url"
                        ],
                        "type": "object"
                      },
                      "maxContains": 1,
                      "minContains": 1
                    },
                    {
                      "contains": {
                        "additionalProperties": false,
                        "properties": {
                          "audio_url": {
                            "additionalProperties": false,
                            "properties": {
                              "url": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "url"
                            ],
                            "type": "object"
                          },
                          "type": {
                            "const": "audio_url"
                          }
                        },
                        "required": [
                          "type",
                          "audio_url"
                        ],
                        "type": "object"
                      },
                      "maxContains": 1,
                      "minContains": 1
                    }
                  ],
                  "items": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "image_url": {
                            "additionalProperties": false,
                            "properties": {
                              "url": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "url"
                            ],
                            "type": "object"
                          },
                          "type": {
                            "const": "image_url"
                          }
                        },
                        "required": [
                          "type",
                          "image_url"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "audio_url": {
                            "additionalProperties": false,
                            "properties": {
                              "url": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "url"
                            ],
                            "type": "object"
                          },
                          "type": {
                            "const": "audio_url"
                          }
                        },
                        "required": [
                          "type",
                          "audio_url"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "maxItems": 2,
                  "minItems": 2,
                  "type": "array"
                },
                "model": {
                  "enum": [
                    "heygen/avatar-iv"
                  ],
                  "type": "string"
                },
                "prompt": {
                  "const": "",
                  "type": "string"
                }
              },
              "required": [
                "model",
                "input_references"
              ],
              "type": "object"
            },
            "schema_template": {
              "actual_file_preparation_required": false,
              "body": {
                "input_references": "${ACTUAL_OWNED_INPUT_REFERENCES}",
                "model": "heygen/avatar-iv"
              },
              "content_type": "application/json"
            }
          },
          "input": {
            "content_type": "application/json",
            "material_conditions": [
              "Use actual completed owned media asset content URLs with their returned signatures: one video source for BFL, or one image and one audio source for avatar. The Source owner/type/byte witness is required.",
              "Supply exactly one PNG/JPEG image and one WAV/MP3 audio asset. The audio is at most32000000 bytes, with duration greater than0 and at most1800 seconds."
            ],
            "material_types": [
              "text",
              "image",
              "audio",
              "video"
            ],
            "required": [
              "model",
              "input_references"
            ]
          },
          "lifecycle": {
            "content": [
              {
                "http": "GET",
                "path": "/v1/videos/{request_id}/content",
                "query": {
                  "index": "actual zero-based output index from completed manifest"
                }
              }
            ],
            "creation_id_field": "id",
            "media_library": {
              "http": "GET",
              "path": "/v1/media/assets"
            },
            "mode": "asynchronous_job_then_owned_outputs",
            "operation_id_is_not_task_id": true,
            "output_content_response": "owned MP4 bytes with Range support",
            "status": [
              {
                "http": "GET",
                "id_source": "actual returned id or polling_url",
                "path": "/v1/videos/{request_id}"
              }
            ],
            "unknown": "Keep X-Client-Request-ID, X-Ailoot-Task-Id and actual returned id/polling_url. Continue the original job; do not submit creation again."
          },
          "method": {
            "http": "POST",
            "path": "/v1/videos"
          },
          "output": {
            "all_results": "Retain the complete response and headers, every actual output, original returned identifiers and all usage fields. Recover the original operation without submitting creation again.",
            "family": "video",
            "fields": [
              {
                "description": null,
                "name": "id",
                "type": null
              },
              {
                "description": null,
                "name": "status",
                "type": null
              },
              {
                "description": null,
                "name": "data[]",
                "type": null
              },
              {
                "description": null,
                "name": "outputs[]",
                "type": null
              }
            ]
          }
        },
        "ctx": null,
        "declared_pricing_profiles": [
          {
            "dimensions": {
              "regime": "base"
            },
            "label": "Base token rates",
            "units": [
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          },
          {
            "dimensions": {
              "conditions": "No additional condition is declared in this pricing key.",
              "quoted_unit": "per video second"
            },
            "label": "Video price",
            "units": [
              {
                "amount": "0.1",
                "amount_unit": "usd_per_video_second",
                "billing_input": false,
                "estimate_only": true,
                "key": "duration_seconds",
                "label": "Video price",
                "native_amount_usd_per_unit": "0.1",
                "native_quantity": 1,
                "public_unit_label": "per video second",
                "quantity": 1,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "video_second"
              }
            ]
          },
          {
            "basis": "This estimate is not an additional charge or a fixed rate for the completed generation.",
            "dimensions": {
              "forecast_quantity": "one generation estimate"
            },
            "label": "Estimated generation cost",
            "units": [
              {
                "amount": "0.1",
                "amount_unit": "usd_per_exact_native_unit",
                "billing_input": false,
                "estimate_only": true,
                "key": "forecast_usd",
                "label": "Estimated generation cost",
                "native_amount_usd_per_unit": "0.1",
                "native_quantity": 1,
                "public_unit_label": "estimate before generation",
                "quantity": 1,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "request_estimate"
              }
            ]
          }
        ],
        "examples": [
          {
            "code": "set -eu\n: \"${AILOOT_API_KEY:?Set your Ailoot API key}\"\n: \"${AILOOT_INPUT_REFERENCES_JSON:?Set the actual documented input value}\"\nexport AILOOT_INPUT_REFERENCES_JSON\npython3 - <<'PY_REQUEST'\nimport json,os\nfrom pathlib import Path\nrequest={'model': 'heygen/avatar-iv', 'input_references': '${ACTUAL_OWNED_INPUT_REFERENCES}'}\nrequest['input_references']=json.loads(os.environ['AILOOT_INPUT_REFERENCES_JSON'])\nPath('request.json').write_text(json.dumps(request,ensure_ascii=False),encoding='utf-8')\nPY_REQUEST\ncurl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/videos \\\n  -H \"Authorization: Bearer $AILOOT_API_KEY\" -H 'Content-Type: application/json' \\\n  --data-binary @request.json -D response-headers.txt -o response.bin\n# Retain the complete response and headers, every actual output, original returned identifiers and all usage fields. Recover the original operation without submitting creation again.\n",
            "label": "Use actual input and retain the complete result",
            "language": "bash"
          },
          {
            "code": "set -eu\n: \"${AILOOT_API_KEY:?Set your Ailoot API key}\"\n: \"${AILOOT_STATUS_FILE:?Set the actual completed status JSON file}\"\nexport AILOOT_STATUS_FILE\npython3 - <<'PY_REQUEST'\nimport json,os\nfrom pathlib import Path\nfrom urllib.parse import urlsplit,urljoin\nf=Path(os.environ[\"AILOOT_STATUS_FILE\"])\nif not f.is_file():raise SystemExit(\"Choose the actual completed status file\")\nr=json.loads(f.read_text())\nif r.get(\"status\")!=\"completed\" or not isinstance(r.get(\"data\"),list) or not r[\"data\"]:raise SystemExit(\"Wait for a completed status with asset paths\")\nurls=[]\nfor x in r[\"data\"]:\n    if not isinstance(x,str) or \"\\n\" in x or \"\\r\" in x:raise SystemExit(\"Invalid asset path\")\n    u=urljoin(\"https://api.ailoot.ai\",x)\n    z=urlsplit(u)\n    if z.scheme!=\"https\" or z.netloc!=\"api.ailoot.ai\" or z.username or z.password:raise SystemExit(\"Use the actual Ailoot asset paths from status\")\n    urls.append(u)\nPath(\"asset-urls.txt\").write_text(\"\\n\".join(urls)+\"\\n\")\nPY_REQUEST\nindex=0\nwhile IFS= read -r asset_url; do\n  curl --fail-with-body --silent --show-error \"$asset_url\" \\\n    -H \"Authorization: Bearer $AILOOT_API_KEY\" -o \"video-${index}.mp4\"\n  index=$((index + 1))\ndone < asset-urls.txt\n",
            "label": "GET all completed assets",
            "language": "bash"
          }
        ],
        "family": "openai",
        "fast_multiplier": null,
        "flex_multiplier": null,
        "fmt": "videos",
        "hints": [
          "Use the exact caller model ID and documented input representation.",
          "Retain the complete response and headers, every actual output, original returned identifiers and all usage fields. Recover the original operation without submitting creation again."
        ],
        "http": "POST",
        "in": null,
        "input": [
          "text",
          "image",
          "audio",
          "video"
        ],
        "label": "Video",
        "max_out": null,
        "max_reasoning_effort_multiplier": null,
        "method_aliases": [],
        "native_endpoint": "videos",
        "out": null,
        "output": [
          "video"
        ],
        "path": "/v1/videos",
        "price_conditions": [
          {
            "label": "Fast mode",
            "value": "Not specified",
            "when": "When fast mode is selected"
          },
          {
            "label": "Flex mode",
            "value": "Not specified",
            "when": "When flex mode is selected"
          },
          {
            "label": "Maximum reasoning effort",
            "value": "Not specified",
            "when": "When maximum reasoning effort uses the default adjustment"
          }
        ],
        "pricing": {
          "billing_mode": "original_invoice_usd",
          "image_input_price": null,
          "image_output_price": null
        },
        "pricing_profiles": [
          {
            "dimensions": {
              "regime": "base"
            },
            "label": "Base token rates",
            "units": [
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          },
          {
            "dimensions": {
              "conditions": "No additional condition is declared in this pricing key.",
              "quoted_unit": "per video second"
            },
            "label": "Video price",
            "units": [
              {
                "amount": "0.1",
                "amount_unit": "usd_per_video_second",
                "billing_input": false,
                "estimate_only": true,
                "key": "duration_seconds",
                "label": "Video price",
                "native_amount_usd_per_unit": "0.1",
                "native_quantity": 1,
                "public_unit_label": "per video second",
                "quantity": 1,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "video_second"
              }
            ]
          },
          {
            "basis": "This estimate is not an additional charge or a fixed rate for the completed generation.",
            "dimensions": {
              "forecast_quantity": "one generation estimate"
            },
            "label": "Estimated generation cost",
            "units": [
              {
                "amount": "0.1",
                "amount_unit": "usd_per_exact_native_unit",
                "billing_input": false,
                "estimate_only": true,
                "key": "forecast_usd",
                "label": "Estimated generation cost",
                "native_amount_usd_per_unit": "0.1",
                "native_quantity": 1,
                "public_unit_label": "estimate before generation",
                "quantity": 1,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "request_estimate"
              }
            ]
          }
        ],
        "request_model_id": "heygen/avatar-iv",
        "route_label": "Ultra",
        "status_reads": [
          "GET /v1/videos/{request_id}"
        ],
        "tiers": [],
        "units": [
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": false,
            "estimate_only": true,
            "key": "input_price",
            "label": "Input tokens",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "input_token"
          },
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": false,
            "estimate_only": true,
            "key": "output_price",
            "label": "Output tokens",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "output_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "out",
            "unit": "output_token"
          },
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": false,
            "estimate_only": true,
            "key": "cache_read_price",
            "label": "Cache read",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "cached_input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "cached_input_token"
          },
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": false,
            "estimate_only": true,
            "key": "cache_write_price",
            "label": "Cache write",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "generic_cache_creation_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "generic_cache_creation_token"
          },
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": false,
            "estimate_only": true,
            "key": "cache_write_1h_price",
            "label": "Cache write, 1 hour",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "one_hour_cache_creation_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "one_hour_cache_creation_token"
          },
          {
            "amount": "0.1",
            "amount_unit": "usd_per_video_second",
            "billing_input": false,
            "estimate_only": true,
            "key": "duration_seconds",
            "label": "Video price",
            "native_amount_usd_per_unit": "0.1",
            "native_quantity": 1,
            "public_unit_label": "per video second",
            "quantity": 1,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "out",
            "unit": "video_second"
          },
          {
            "amount": "0.1",
            "amount_unit": "usd_per_exact_native_unit",
            "billing_input": false,
            "estimate_only": true,
            "key": "forecast_usd",
            "label": "Estimated generation cost",
            "native_amount_usd_per_unit": "0.1",
            "native_quantity": 1,
            "public_unit_label": "estimate before generation",
            "quantity": 1,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "out",
            "unit": "request_estimate"
          }
        ]
      }
    ],
    "model_aliases": [
      {
        "canonical_model_id": "heygen/avatar-iv",
        "request_model_id": "heygen/avatar-iv",
        "route_label": "Ultra"
      }
    ],
    "name": "HeyGen: Avatar IV",
    "price": {
      "estimate_only": true,
      "in": null,
      "in_label": null,
      "out": 0.1,
      "out_label": "estimate before generation",
      "scope_label": "Estimated generation cost",
      "sort_in": null,
      "sort_out": 0.1,
      "varies": false
    },
    "short": "Avatar IV animates a photo into a lip-synced talking video, with facial expression and gesture timing guided by the voice. HeyGen documents script or recorded-audio workflows and Photo Avatar motion controls for lifelike or stylized presenters."
  },
  "renderer_schema": {
    "method_order": "Original DTO methods order; every exact route/format/path/caller survives.",
    "prices": "Original public DTO fields and original native display HTML; no flattened or normalized offers."
  },
  "representation": "exact-public-dto-and-native-renderer-html",
  "representationNotes": {
    "current_reference": {
      "about_json_pointer": "/aboutHtml",
      "methods": [
        {
          "contract_json_pointer": "/methods/0/rawMethod/contract",
          "html_json_pointer": "/methods/0/html",
          "method_ordinal": 0
        }
      ],
      "role": "current-semantic-reference"
    },
    "raw_input": {
      "examples_role": "historical-input-not-current-ready-examples",
      "json_pointers": [
        "/rawModel",
        "/methods/0/rawMethod"
      ],
      "role": "historical-owner-input"
    },
    "schema": "ailoot-native-model-representations-v1"
  },
  "schema": "ailoot-static-model-facts-v1",
  "schema_version": 1,
  "shortText": "Avatar IV animates a photo into a lip-synced talking video, with facial expression and gesture timing guided by the voice. HeyGen documents script or recorded-audio workflows and Photo Avatar motion controls for lifelike or stylized presenters.",
  "source": {
    "audit_sha256": "2e00086bcbfc28e64d0cebe97aa47c17d8d5618963027f8ffb9dc6123d7d25b1",
    "bridge_map_sha256": "1125275768b9636fc8461bc7da5061239a81ddfe508e2557843ca42c58ab0036",
    "raw_model_json_sha256": "55a9984cf4c9fe3900b3f2c8b65ab826472c5863b2a5d3d7dc96842be590c99f",
    "renderer_sha256": "fed50305bd3bcc4980ac14df23640efb8c1bc1e819f9d53643d6f43e8974d3fe"
  },
  "sourceRevision": "7b2de85eca0b97c25b58ef4f0ba5f289f1f4647f72f69534d1358f7752f292fc"
}
