ai_video_editor_create_video
What this API does
Create the same Video Editor you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to your own app or workflow.
Good for
Automation and batch processing
Adding video editor into apps, pipelines, or tools
How it works (3 steps)
Upload your inputs (video, image, or audio) with Generate Upload URLs and copy the
file_path.Send a request to create a video editor job with the basic fields.
Check the job status until it's
complete, then download the result fromdownloads.
Key options
Inputs: see the request schema for endpoint-specific assets
Resolution: free users default to 480p; higher plans unlock HD and larger sizes
Extra fields: see the request schema for endpoint-specific options
Cost
Credits are only charged for the frames that actually render. You'll see an estimate when the job is queued, and the final total after it's done.
For detailed examples, see the product page.
MCP guidance:
This starts an async video generation job and returns
idpluscredits_chargedimmediately. If the user wants the finished result, call thewait_for_video_projecthelper with the returned id, or poll the matchingGET /v1/video-projects/{id}endpoint until status iscomplete,error, orcanceled. Completed projects includedownloadswith direct URLs. The custom wait helper also returnsexact_download_urlsseparately from expiration metadata.For
*_file_pathvalues, prefer an existing Magic Hour file path or afile_pathreturned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returnedfile_path.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Give your video a custom name for easy identification. | Video Editor - dateTime |
| model | No | Editing model. Defaults to `ltx-2.3` for free tier and `gemini-omni` for paid. Use `ltx-2.3` for LTX video edit. | |
| style | Yes | ||
| assets | Yes | Provide the assets for video editing. | |
| resolution | No | Output resolution. Defaults to `480p` for free tier and `720p` for paid. Google Omni supports 720p only; LTX-2.3 supports 480p, 720p, and 1080p. | |
| end_seconds | Yes | End time of your clip in seconds. Must be greater than `start_seconds`. Minimum duration depends on model: `gemini-omni`: 3s, `ltx-2.3`: 0.5s. Maximum duration depends on model: `gemini-omni`: 10s, `ltx-2.3`: 45s. | |
| start_seconds | No | Start time of your clip (seconds). Must be ≥ 0. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Unique ID of the video. Use it with the [Get video Project API](https://docs.magichour.ai/api-reference/video-projects/get-video-details) to fetch status and downloads. | |
| credits_charged | Yes | The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video. If video generation fails, credits will be refunded, and this field will be updated to include the refund. |