JoyPix

Motion-2-Dialog API

Overview

Motion-2-Dialog converts one photo, 2 audio clips into audio-driven conversation videos, up to 10 minutes. It supports human, animals, and anime characters in 480p/720p resolutions. You can also use prompts to customize the character's expressions and poses.Try Motion-2-Dialog On JoyPix AI

Endpoint

POSThttps://openapi.joypix.ai/v1/lip-sync/motion-2-dialog

Headers

NameValueRequired
Content-Typeapplication/jsonYes
AuthorizationBearer ${JoyPix_API_KEY}Yes

Body Parameters

NameTypeRequiredDescription
left_audio_urlstringYesThe audio to drive the left character in the image
right_audio_urlstringYesThe audio to drive the right character in the image
image_urlstringYesThe image to generate the video
resolutionstringNoThe resolution of the output video. (480p, 720p). Default: 480p
promptstringNoThe positive prompt for the generation
seedintNoThe random seed to use for the generation. -1 means a random seed will be used. Default: -1

Example Request

{
  "left_audio_url": "https://example.com/audio1.mp3",
  "right_audio_url": "https://example.com/audio2.mp3",
  "image_url": "https://example.com/image.jpg",
  "resolution": "480p",
  "prompt": "the left man speak happily, the right woman has cheerful expressions.",
  "seed": -1
}

Response

{
  "code": 0,
  "message": "success",
  "data": {
    "task_id": "task_123456789"
  }
}

Get Task Status

Endpoint

GEThttps://openapi.joypix.ai/v1/tasks/${task_id}

Headers

NameValueRequired
AuthorizationBearer ${JoyPix_API_KEY}Yes

Response

{
    "code": 0,    // int, 200 for success, 4xx, client error, 5xx, server error
    "message": "success", // string, eg.success
    "data": {
        "task_id": "task_123456789",         // string, task id
        "inputs": "...",          // string, input params
        "model": "motion-2-dialog",           // string, model id
        "status":  "completed",             // string, task status, submitted, processing, completed, failed
        "error": "",      // string, fail reason, when status=failed
        "video_url": "https://joypix-output.s3.amazonaws.com/...",        // string, video url , when status=completed
    }
}

Pricing

Billing is based on the duration of the generated video. The billing unit is 5 seconds. Any duration less than 5 seconds will be counted as 5 seconds.

ResolutionCredits / 5sPrice / 5s
480p15$0.15
720p30$0.30

Tips

  • Processing Time: The Real-Time Factor (RTF) for 480p is ~15 (1s video takes ~15s to generate); for 720p, RTF is ~25 (1s video takes ~25s).
  • Storage: Generated videos are stored for 72 hours. Please download them promptly.
  • Max Duration: The maximum supported video duration is 10 minutes.