{"uid":"cap_IKwOLqZLOgQI9YdSyF3a1","slug":"video-audio-replace-mix-b9653f65","name":"Video Audio Replace / Mix","description":"Takes a video and an audio file (for example a dubbed track from /v1/dub, a voice-over or music) and returns the video with the new sound: mode replace drops the original audio, mode mix keeps it at original_volume underneath. The new audio is trimmed to the video length or padded with silence, optionally delayed by offset_seconds. The picture is copied, not re-encoded. Output MP4 with AAC inline as base64, max 24 MB. Runs locally with ffmpeg. Fixed price per call.","url":"https://medien.halowerk.com/v1/video-audio-replace?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"mode":{"enum":["replace","mix"],"type":"string","default":"replace"},"audio":{"type":"object","properties":{"url":{"type":"string","maxLength":2048},"filename":{"type":"string","maxLength":260},"content_base64":{"type":"string","maxLength":5500000}},"additionalProperties":false},"video":{"type":"object","properties":{"url":{"type":"string","maxLength":2048},"filename":{"type":"string","maxLength":260},"content_base64":{"type":"string","maxLength":5500000}},"additionalProperties":false},"offset_seconds":{"type":"number","default":0,"maximum":600,"minimum":0},"original_volume":{"type":"number","default":0.2,"maximum":1,"minimum":0}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_oQlCPms_1Pz4Hsn2Z5KbF","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Replaces or mixes a video's audio track with a new audio file, copying the picture stream without re-encoding and returning the result as a base64-encoded MP4.","exampleAgentPrompt":"Take this video file and replace its audio with this dubbed MP3 track — drop the original sound entirely and pad with silence if the audio is shorter than the video, then give me the result as an MP4.","exampleUseCases":[{"title":"Attach dubbed audio to video","prompt":"I have a video and a dubbed audio track from a translation service — replace the video's original audio with the dub completely, no mixing, and return the finished MP4."},{"title":"Add background music under narration","prompt":"Can you mix this background music file into my interview video? Keep the original dialogue but lower the original audio to about 20% volume so the music sits underneath."},{"title":"Delayed voiceover overlay","prompt":"I have a product demo video and a voiceover MP3 that should start 3 seconds in — mix the voiceover into the video starting at offset 3 seconds while keeping the original audio at 15% volume underneath."}],"resultDescription":"A base64-encoded MP4 file (max 24 MB) with the video picture stream copied as-is and a new AAC audio track either fully replacing the original or mixed with it at the specified volume ratio. The audio is trimmed to match video length or padded with silence, and optionally delayed by the requested offset.","failureModes":["File too large: combined input or output exceeds 24 MB limit","Invalid mode value: only 'replace' or 'mix' are accepted","Audio or video not provided: at least one of url, filename, or content_base64 required for each","Offset exceeds maximum: offset_seconds must be between 0 and 600","ffmpeg processing failure due to corrupted or unsupported codec in source files","original_volume out of range: must be between 0 and 1"],"whenToPreferThis":"Choose this endpoint when you need to swap or blend a new audio track into an existing video without re-encoding the picture — ideal for dubbing workflows (e.g. output from /v1/dub), adding voiceovers, or layering background music, especially when preserving original video quality and keeping costs low per call ($0.004).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-12-02T12:06:22.443Z","isFirstParty":false,"canonicalSlug":"video-audio-replace-mix-b9653f65"}