Skip to main content

Documentation Index

Fetch the complete documentation index at: https://apixo.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

Overview

InfiniteTalk turns a source portrait plus an audio track into a talking or singing avatar video with lip synchronization. Use this page when you are ready to call the API after trying the model in the APIXO playground.
CapabilityValue
Model IDinfinitetalk
Modeimage-to-video
Source images1 required image URL, plus 1 optional mask image URL
Audio inputExactly 1 public HTTP(S) MP3, WAV, or M4A URL
Audio limitsUp to 128 MB and 600 seconds
Resolutions480p, 720p
BillingPer probed audio second, minimum 5 seconds

Endpoint and authentication

Base URL:
https://api.apixo.ai/api/v1
MethodEndpointPurpose
POST/generateTask/infinitetalkSubmit a generation task
GET/statusTask/infinitetalk?taskId={taskId}Poll task status and retrieve results
All requests require your APIXO API key:
Authorization: Bearer YOUR_API_KEY
Submit requests also require:
Content-Type: application/json

Copy-paste async quickstart

This minimal request submits an InfiniteTalk task and returns a taskId.
curl -X POST "https://api.apixo.ai/api/v1/generateTask/infinitetalk" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "async",
    "input": {
      "mode": "image-to-video",
      "image_urls": [
        "https://example.com/portrait.png"
      ],
      "audio_urls": [
        "https://example.com/voice.mp3"
      ],
      "prompt": "make the portrait speak naturally with subtle head motion",
      "resolution": "480p",
      "seed": -1
    }
  }'
Successful response:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678"
  }
}
Save the taskId; you need it to poll for the final result.

Poll for result

curl -X GET "https://api.apixo.ai/api/v1/statusTask/infinitetalk?taskId=task_12345678" \
  -H "Authorization: Bearer YOUR_API_KEY"
Processing response:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "processing",
    "createTime": 1767965610929
  }
}
Success response:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "success",
    "resultJson": "{\"resultUrls\":[\"https://r2.apixo.ai/video.mp4\"]}",
    "createTime": 1767965610929,
    "completeTime": 1767965652317,
    "costTime": 41388
  }
}
Failed response:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "failed",
    "failCode": "SensitiveContent",
    "failMsg": "Content violates safety policy, please adjust the prompt",
    "createTime": 1767965610929,
    "completeTime": 1767965620132
  }
}
Parse resultJson after state becomes success:
const payload = JSON.parse(data.resultJson);
const videoUrls = payload.resultUrls;

Request body

Image-to-video

{
  "request_type": "async",
  "input": {
    "mode": "image-to-video",
    "image_urls": [
      "https://example.com/portrait.png"
    ],
    "audio_urls": [
      "https://example.com/voice.m4a"
    ],
    "prompt": "keep the face stable while syncing lips to the audio",
    "resolution": "480p",
    "seed": -1
  }
}

With an optional mask image

{
  "request_type": "async",
  "input": {
    "mode": "image-to-video",
    "image_urls": [
      "https://example.com/portrait.png",
      "https://example.com/mask.png"
    ],
    "audio_urls": [
      "https://example.com/voice.wav"
    ],
    "prompt": "subtle head motion, natural eye movement",
    "resolution": "720p",
    "seed": 7
  }
}
image_urls[0] is sent as the source image. image_urls[1], when provided, is sent as the mask image.

Parameters

request_type
string
default:"async"
Result delivery mode. Use async for polling with statusTask, or callback for webhook delivery.
callback_url
string
Required when request_type is callback. Use a public endpoint that can receive the final task payload. See Webhooks.
input
object
required
InfiniteTalk input parameters.

Response format

Submit task response

POST /generateTask/infinitetalk returns a task ID when the task is accepted:
code
integer
API status code. 200 means the task was accepted.
message
string
Human-readable status message.
data.taskId
string
Unique task identifier used with the status endpoint.

Status response fields

taskId
string
Unique task identifier.
state
string
Current task state: pending, processing, success, or failed.
resultJson
string
JSON string containing the generated video URLs as resultUrls. Present when state is success.
failCode
string
Machine-readable failure code. Present when state is failed.
failMsg
string
Human-readable failure message. Present when state is failed.
createTime
integer
Task creation timestamp in Unix milliseconds.
completeTime
integer
Task completion timestamp in Unix milliseconds. Present after completion.
costTime
integer
Processing time in milliseconds. Present after successful completion when available.

Webhook callback mode

Use callback mode when your backend should receive the final result automatically instead of polling.
curl -X POST "https://api.apixo.ai/api/v1/generateTask/infinitetalk" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "callback",
    "callback_url": "https://your-server.com/webhooks/apixo",
    "input": {
      "mode": "image-to-video",
      "image_urls": [
        "https://example.com/portrait.png"
      ],
      "audio_urls": [
        "https://example.com/voice.mp3"
      ],
      "prompt": "natural speech with subtle head movement",
      "resolution": "720p",
      "seed": -1
    }
  }'
Callback payloads use the same code, message, and data shape as the status response. See Webhooks for delivery requirements and retry behavior.

Billing

InfiniteTalk is billed per probed audio second. The backend downloads the audio, probes its real audio length, then bills:
billableSeconds = max(5, actualAudioSeconds)
totalCost = billableSeconds * resolutionUnitPrice
ResolutionAPIXO price
480p$0.03 / second
720p$0.06 / second
For current route and market comparison pricing, see Pricing.

Latency and polling

Actual latency varies by audio length, selected resolution, upstream queue load, and final result storage. Longer audio generally takes longer to complete.
Audio lengthRecommended first pollPoll interval
Up to 30s30s after task creation10s-15s
30s-120s60s after task creation15s-30s
120s-600s120s after task creation30s
For production workloads, especially long audio, use callback mode to avoid frequent polling.
Rate limits and concurrency can vary by account, API key, and route. If you receive 429, slow down requests and retry with backoff. For account-level details, see System APIs.

Errors and troubleshooting

HTTP errors

CodeMeaningWhat to do
400Invalid request body, unsupported mode, invalid parameter type or value, unreachable URL, or audio probe failureFix the request before retrying
401Missing or invalid API keyCheck the Authorization header
402Insufficient balance or quotaAdd balance or switch account/key
403Key or route cannot access the modelCheck permissions and route strategy
429Rate limit or concurrency limit reachedRetry with exponential backoff
500Server error or unmapped upstream failureRetry with backoff
502Upstream service errorRetry with backoff
504Upstream timeoutRetry or use callback mode for long-running jobs

Common validation issues

IssueWhat happenedWhat to do
Missing input.modeInfiniteTalk requires image-to-video modeSet input.mode to image-to-video
Invalid image_urls lengthThe backend accepts 1 or 2 image URLsSend the portrait URL first, then the optional mask URL
Invalid audio_urls lengthThe backend accepts exactly 1 audio URLSend a single MP3, WAV, or M4A URL
Audio cannot be fetchedThe backend must fetch the audio before billingUse a public HTTP(S) direct URL
Audio is too large or too longAudio is limited to 128 MB and 600 secondsShorten or compress the audio
Empty promptprompt is optional, but cannot be blank if presentRemove the field or send a non-empty string
Invalid seedseed must be an integer from -1 to 2147483647Use -1 or a valid integer

Task failure codes

Fail codeMeaningWhat to do
SensitiveContentUpstream rejected the prompt or media for safety reasonsChange the prompt, source image, or audio
PromptInvalidUpstream rejected or could not use the promptSimplify the prompt and retry
RateLimitedUpstream rate limited the taskRetry with backoff
TimeoutUpstream timed outRetry, reduce input complexity, or use callback mode
MissingParameter or BadRequestUpstream reported a malformed requestRecheck the request body
Unknown errorFailure could not be mapped to a known codeRetry with backoff or contact support with the taskId
See Error Codes for the full error reference.