Create video from audio
create_video_from_audioGenerates an audio-guided video from a supplied audio track, with an optional starting image and visual prompt. Starts a background job that costs credits; returns a project id for wait_for_video_project.
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. |