MixMedia API
API keys Sign inTry it
MixMedia Sign in
Open as Markdown
← Try it on the website
Sync Labs

Sync Lipsync 2

Sync Labs · ~5 min
from $0.065per second

Lipsync: the lips in a finished video follow new speech. Video and audio from 2 to 300 s.

Sync Lipsync 2 takes a finished video of a person speaking and a new audio track, and re-animates the mouth to match the new speech while keeping the speaker's style. Works for real people, animation and generated characters.

This is lipsync, not a clip made from scratch: the scene and framing stay yours. The result is as long as the audio — a shorter video continues with a smooth back-and-forth repeat.

You need one video and one audio file from 2 to 300 seconds (MP4/MOV and MP3/WAV). You pay per second of your audio. If generation fails, the money is returned.

One model, sync-lipsync-2 · ~5 min. Send a finished video video_url and one new audio file in audio_urls.

Price

ResolutionPrice per second of your audio
1080p$0.065
  • Price = per-second price × your audio length, rounded up to $0.001. Charged when the task is created and fully refunded if it fails.
  • You pay per second of your audio (2 to 300 s). The result has the same length. Send a finished video video_url and one new audio file in audio_urls. Do not send prompt.

Media limits

TypeLimits
Videoone clip, video_url; 2 s to 300 s (longer is trimmed to 300); MP4 / MOV → MP4 on the server; upload ≤ 200 MB
Audioup to 1; total ≤ 300 s; MP3 / WAV; upload ≤ 200 MB

Photos — public https or upload; video and audio — files/upload only.

Parameters (field input)

ParameterDescriptionValues (default in bold)
video_urlA finished video of a person speaking (MP4): one clip, at least 2 s. Longer than 300 s is trimmed. Upload it via files/upload first"https://…"
audio_urlsNew speech (MP3 / WAV): one file, 2 to 300 s. The result has the same length. Upload it via files/upload first["https://…"], up to 1
resolutionVideo resolution1080p

Examples

Video + new audio

curl -X POST https://mixmedia.tech/api/v1/jobs/createTask \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"sync-lipsync-2","input":{"video_url":"https://mixmedia.tech/files/<id>.mp4","audio_urls":["https://mixmedia.tech/files/<id>.mp3"],"resolution":"1080p"}}'
import os, requests

r = requests.post(
    "https://mixmedia.tech/api/v1/jobs/createTask",
    headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
    json={
      "model": "sync-lipsync-2",
      "input": {
        "video_url": "https://mixmedia.tech/files/<id>.mp4",
        "audio_urls": [
          "https://mixmedia.tech/files/<id>.mp3"
        ],
        "resolution": "1080p"
      }
    },
)
print(r.json())  # {"code": 200, "data": {"taskId": "..."}}
const r = await fetch("https://mixmedia.tech/api/v1/jobs/createTask", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "model": "sync-lipsync-2",
    "input": {
      "video_url": "https://mixmedia.tech/files/<id>.mp4",
      "audio_urls": [
        "https://mixmedia.tech/files/<id>.mp3"
      ],
      "resolution": "1080p"
    }
  }),
});
console.log(await r.json()); // { code: 200, data: { taskId: "..." } }

Create and result

  1. POST /api/v1/jobs/createTask with model and input.
  2. Poll GET /api/v1/jobs/recordInfo?taskId=… every 3–5 s (or a callback).

Successful createTask (HTTP 200)

{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "task_...",
    "task_id": "task_...",
    "status": "submitted"
  }
}

Completed task (recordInfo)

{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "task_...",
    "task_id": "task_...",
    "state": "success",
    "status": "completed",
    "costUsd": "0.384",
    "refunded": false,
    "resultJson": {
      "videos": [
        {
          "url": "https://…/out.mp4"
        }
      ],
      "duration": 8
    }
  }
}

Aliases: task_id = taskId; status: pending / processing / completed / failed alongside state. Clip URL is in resultJson. size is an alias of aspect_ratio in input.

Photos can be any public https links or uploads via files/upload. Videos and audio — via files/upload only.

Error handling

API responses are JSON {"code", "msg", "data"}; errors also have a string error field (type). On /api/v1/* the HTTP status matches body code.

Example response bodies

400

{
  "code": 400,
  "msg": "input.duration: must be between 4 and 30, or \"auto\" / -1",
  "data": null,
  "error": "invalid_request_error"
}

401

{
  "code": 401,
  "msg": "Authentication failed. Please check your API key",
  "data": null,
  "error": "authentication_error"
}

402

{
  "code": 402,
  "msg": "Insufficient balance. Please top up and try again. Available: $0.01, required: $0.015. Top up at https://mixmedia.tech/cabinet/billing",
  "data": {
    "balance": "0.0100",
    "required": "0.0150",
    "currency": "USD",
    "topUpUrl": "https://mixmedia.tech/cabinet/billing"
  },
  "error": "payment_required"
}

429

{
  "code": 429,
  "msg": "Rate limit exceeded: 10 createTask/upload requests per 10 s per key. Retry after 8s",
  "data": null,
  "error": "rate_limit_error"
}

500

{
  "code": 500,
  "msg": "Internal server error",
  "data": null,
  "error": "server_error"
}

Codes on createTask / upload

codeerrorMeaningWhat to do
400invalid_request_errorInvalid parameter or bodySee msg
400unsupported_modelUnknown modelModel list
400nsfw_content_detectedModeration / content policy — msg / failMsg is the upstream text verbatimRead the refusal text, change the prompt or files
401authentication_errorMissing or invalid keyCheck the key
402payment_requiredNot enough balanceTop up
403permission_errorNo accessContact support
429rate_limit_errorToo many requestsWait for Retry-After
505model_disabledModel temporarily disabledPick another
500server_errorOur failureRetry later

Example msg values: Authentication failed. Please check your API key (401); Insufficient balance. Please top up and try again… (402).

Task errors (recordInfo)

If the task was created and then failed: state: "fail" (alias status: "failed"), failCode / failMsg, and error: { code, message, type }. Money is refunded (refunded: true).

failCodeerror.typeMeaning
400nsfw_content_detected / invalid_request_errorModeration — failMsg is upstream text verbatim
422invalid_request_errorThe model rejected the parameters (length, mode, resolution, file)
501server_errorThe model could not generate (failMsg)
504timeout_errorTimed out — retry
500 / 503server_errorService temporarily unavailable

Rate limits

WhatLimit
createTask and upload20 per 10 s per key
recordInfo / list / balance100 per 10 s per key

Over the limit — HTTP 429 and Retry-After.

Try the same models on the website or see prices.

© 2026 MixMedia