video_assets_generate_presigned_url
Generates a list of pre-signed upload URLs for the assets required. This API is only necessary if you want to upload to Magic Hour's storage. Refer to the Input Files Guide for more details.
The response array will match the order of items in the request body.
Valid file extensions per asset type:
video: mp4, m4v, mov, webm
audio: mp3, wav, aac, flac, webm, weba, m4a, opus, ogg, oga, aiff, amr
image: png, jpg, jpeg, jfif, heic, heif, webp, avif, jp2, tiff, tif, bmp
gif: gif, webp, webm
Note:
gifis only supported for face swap APIvideo_file_pathfield.
Once you receive an upload URL, send a PUT request to upload the file directly.
Example:
curl -X PUT --data '@/path/to/file/video.mp4' \
https://videos.magichour.ai/api-assets/id/video.mp4?<auth params from the API response>MCP guidance:
This only creates presigned upload URLs. For local files, upload the raw bytes to each returned
upload_urloutside the generation call, then pass the matchingfile_pathinto the create tool.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 |
|---|---|---|---|
| items | Yes | The list of assets to upload. The response array will match the order of items in the request body. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | The list of upload URLs and file paths for the assets. The response array will match the order of items in the request body. Refer to the [Input Files Guide](https://docs.magichour.ai/integration/inputs-and-outputs) for more details. |