upload_audio
Upload an audio track into a project by fetching a public http(s) URL server-side — the ONLY way to get an audio file's bytes into a project over MCP/HTTP (add_audio_overlay / update_audio_overlay only reference a filename that must already be uploaded). The worker downloads the .mp3/.m4a/.wav/.ogg/.aac, stores it in the project's asset bucket, and returns { filename, sizeBytes, contentType }. Then pass the returned filename to add_audio_overlay (add a second track) or update_audio_overlay { id, filename } (replace an existing track's file — find the id via describe_video's audio_overlays). The url must be a direct, publicly-fetchable http(s) link (not an auth-walled page). Buffered in Worker memory, so capped at 16 MiB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Direct, publicly-fetchable http(s) URL of the audio file (.mp3/.m4a/.wav/.ogg/.aac). | |
| filename | No | Optional stored filename (.mp3/.m4a/.wav/.ogg/.aac). Defaults to the basename of the URL path; sanitised to lowercase a-z0-9._-. | |
| projectId | Yes | Project to add the audio to. |