Audio-to-Video
audio_to_video_create_videoMCP guidance:
Starts an async video job; returns
idandcredits_charged. For finished results, callwait_for_video_projectwith that id or pollGET /v1/video-projects/{id}untilcomplete,error, orcanceled. Results includedownloads; wait helpers addexact_download_urls. Preserve signed URLs and query parameters; never append expiration metadata.For
*_file_path, use an existing Magic Hour path or the upload-URL endpoint'sfile_pathafter uploading raw bytes to its presigned URL. Direct public media URLs may work if stable and fetchable as raw bytes; hotlinked URLs can fail. Prefer the upload-URL endpoint when unsure.
What this API does
Create the same Audio To Video 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 audio to video 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 audio to video job with the basic fields.
Check the job status until it's
complete, then download the result fromdownloads.
Key options
Inputs: usually a file, sometimes a YouTube link, depending on project type
Resolution: output size and plan requirements vary by workflow and model. Some workflows derive output size from the input video.
Extra fields: e.g.
face_swap_mode,start_seconds/end_seconds, or a text prompt
Cost
Credits are charged when the job is queued (credits_charged in the response). Tools billed per frame charge an estimate and settle to the frames that actually render once the job finishes; tools billed per second charge the final amount upfront. Failed jobs are refunded.
For detailed examples, see the product page.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Give your video a custom name for easy identification. | Audio To Video - dateTime |
| style | No | Attributes used to dictate the style of the output | |
| assets | Yes | Provide the audio file and an optional reference image. | |
| resolution | No | Output video resolution. Defaults to `720p` on paid tiers and `480p` on free tiers. | |
| end_seconds | Yes | End time of your clip (seconds). Must be greater than start_seconds. | |
| 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. |