Export the project as a video. Exports spend the workspace's export minutes
(the user's paid allowance), so only export when the user asked for one, never as a
step of your own (to get audio or a merged file, say).
Two calls. The first starts nothing: it returns what the export costs, the minutes
left, and a confirm_token. Tell the user the cost and ask; once they say yes, call
again with the same arguments plus confirm_token. Re-exporting a project that hasn't
grown costs nothing and starts on the first call. Cost is per project: a duplicate
exports at its full length.
Once started it returns an export_id; the export renders in the background (~5 min)
and the user downloads it from Share (top right) → Export video → Previous exports (English only; for another language, get_export returns the link). Start it, tell the user it has started (with the export_id), and
stop: do not call get_export in a loop or hold run_script open waiting for it. Call
get_export only when the user asks for the link (it then returns download_url, or
embed_url for destination="embed").
destination:
• "download" (default) — an mp4 file; once done, get_export returns a time-limited download_url.
• "embed" — publish the project as an embeddable video player (the same embed the
editor's Share → Embed code creates). The embed URL is permanent: re-publishing after
edits updates the video behind the SAME URL, so pages and LMS lessons that embed it
update in place. Use get_embed(project_id) to read the URL and iframe code of an
already-published project without re-rendering.
format:
• "mp4" (default) — the video.
• "mp3" — the project's whole soundtrack as one MP3: voiceover, music, extracted
audio and video audio, mixed as the video plays them. Billed like a video export.
Download only; resolution, fps and captions are ignored. There is no voiceover-only
file: to leave music or video audio out, mute or remove it first.
Defaults: 1080p / 30fps / no captions / English. Pass overrides only when needed; a resolution or fps above the workspace's plan is capped to it.
Refused while a job (speech, sync, the build) still holds the project, since the render would catch it mid-change: export once they finish.
`captions` burns subtitles into a download; an embed instead carries captions the
viewer toggles in the player, so `captions` is ignored for destination="embed".