Merge Audio + Video

Merge a video URL with an audio URL into a single MP4. Replace original audio or mix new audio on top of existing. 1 credit per merge.

New: Merge audio and video files into a single MP4 with a single API call. Video stream is copied without re-encoding when possible — fast and cheap.

Pricing

OperationCreditsPrice (Pro Yearly)Price (Pro Monthly)
Merge (any mode)1$0.006$0.012

Credits are deducted upfront. Refunded automatically if the merge fails.


Endpoint

POST https://vicsee.com/api/v1/tools/merge-audio-video

See Authentication for API key setup.

Parameters

ParameterTypeRequiredDescription
video_urlstringYesSource video URL (MP4, MOV, WebM)
audio_urlstringYesAudio track URL (MP3, WAV, AAC, OGG, M4A)
modestringNo"replace" (default) = discard original audio. "mix" = overlay new audio on existing.
volumenumberNoVolume of new audio (0.0-1.0). Default: 1.0 for replace, 0.5 for mix.

Modes

Replace (default): Discards the video's original audio and uses the new audio track. Use this when merging AI-generated video (no audio) with separately generated TTS or sound effects.

Mix: Overlays the new audio on top of the video's existing audio. Use this when adding background music or sound effects to a video that already has dialogue. If the source video has no audio stream, falls back to replace mode automatically.

Example Request

curl -X POST https://vicsee.com/api/v1/tools/merge-audio-video \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "video_url": "https://example.com/video.mp4",
    "audio_url": "https://example.com/audio.mp3",
    "mode": "replace"
  }'

Response

{
  "success": true,
  "data": {
    "id": "task_abc123",
    "model": "merge-audio-video",
    "status": "completed",
    "output": {
      "url": "https://assets.vicsee.com/vicsee/dew/2026-02-28-xyz/merge.mp4",
      "duration": 5.2
    },
    "creditsUsed": 1,
    "creditsRemaining": 499,
    "createdAt": "2026-02-28T12:00:00.000Z"
  }
}

The response returns immediately with the merged video URL — no polling needed. The duration field contains the output video duration in seconds.


Mix Mode Example

Overlay background music at 30% volume on a video with existing dialogue:

curl -X POST https://vicsee.com/api/v1/tools/merge-audio-video \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "video_url": "https://example.com/interview.mp4",
    "audio_url": "https://example.com/background-music.mp3",
    "mode": "mix",
    "volume": 0.3
  }'

Limits

ConstraintValue
Supported video formatsMP4, MOV, WebM
Supported audio formatsMP3, WAV, AAC, OGG, M4A
Audio longer than videoTruncated at video end
Video longer than audioContinues with silence

Errors

CodeHTTPDescription
MISSING_VIDEO_URL400video_url not provided
MISSING_AUDIO_URL400audio_url not provided
INVALID_MODE400Mode not "replace" or "mix"
INVALID_VOLUME400Volume not between 0.0 and 1.0
INSUFFICIENT_CREDITS402Not enough credits
MERGE_FAILED500FFmpeg merge failed