Skip to main content

Endpoints

MethodEndpointDescription
POST/api/v1/generateTask/infinitetalkCreate generation task
GET/api/v1/statusTask/infinitetalkQuery task status

Authentication

All requests require an API Key in the header:
Authorization: Bearer YOUR_API_KEY

Request Body

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

Parameters

request_type
string
default:"async"
async (polling) or callback (webhook)
callback_url
string
Callback URL, required when request_type=callback (conditional)
provider
string
default:"auto"
Routing strategy: auto, value, or official
input
object
required
Model input parameters

Example

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/callback",
    "provider": "official",
    "input": {
      "mode": "image-to-video",
      "image_urls": [
        "https://example.com/portrait.png",
        "https://example.com/mask.png"
      ],
      "audio_urls": [
        "https://example.com/voice.mp3"
      ],
      "prompt": "keep the face stable while syncing lips to the audio",
      "resolution": "720p",
      "seed": 7
    }
  }'

Response

POST /api/v1/generateTask/infinitetalk

Returns taskId on success for subsequent status queries. Success:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678"
  }
}
Error:
{
  "code": 400,
  "message": "Insufficient credits",
  "data": null
}

GET /api/v1/statusTask/infinitetalk

Query task execution status and results via taskId.
curl -X GET "https://api.apixo.ai/api/v1/statusTask/infinitetalk?taskId=task_12345678" \
  -H "Authorization: Bearer YOUR_API_KEY"
Success:
{
  "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:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "failed",
    "failCode": "CONTENT_VIOLATION",
    "failMsg": "Content does not meet safety guidelines"
  }
}

Status Response Fields

taskId
string
Unique task identifier.
state
string
Current task state: pending, processing, success, or failed.
resultJson
string
JSON string containing resultUrls array. Only present on success. Parse with JSON.parse().
failCode
string
Error code. Only present when state is failed. See Error Codes.
failMsg
string
Human-readable error message. Only present when state is failed.
createTime
integer
Task creation timestamp (Unix milliseconds).
completeTime
integer
Task completion timestamp (Unix milliseconds).
costTime
integer
Processing duration in milliseconds.

Error Codes

CodeDescription
400Invalid parameters or request error
401Invalid or missing API Key
429Rate limit exceeded
Fail CodeDescription
CONTENT_VIOLATIONContent violates safety guidelines
INVALID_IMAGE_URLCannot access provided image URL
INVALID_AUDIO_URLCannot access provided audio URL

Rate Limits

LimitValue
Requests10000 / minute
Concurrent tasks1000
Exceeding limits returns 429 error. Wait and retry.

Tips

  • Mode: Only image-to-video is supported. Provide one portrait image and one audio file.
  • Audio requirements: Must be a public MP3, WAV, or M4A URL, up to 128 MB and 10 minutes.
  • Billing: Per-second billing based on actual audio duration. Minimum charge is 5 seconds.
    • 480p: $0.03/second
    • 720p: $0.06/second
  • Mask image: Optionally provide a second image in image_urls to specify which regions can move. Do not use the full image as a mask — it may render as fully black.
  • Prompt tips: Keep prompts short and in English. Too many prompts may cause noisy or unexpected results.
  • Processing time: Approximately 10–30 seconds of wall time per 1 second of video output (varies by resolution and queue).
  • Callback mode: Video generation can take minutes for long audio; strongly recommend callback mode for production.
  • Video expiration: Result URLs are valid for 15 days. Download promptly.
  • Seed: Set a fixed seed (0–2147483647) for reproducible results, or use -1 for random.

InfiniteTalk generates variable-length videos — billing is per second of audio duration (minimum 5 seconds). Use callback mode for production workloads. Result URLs expire after 15 days; download important outputs promptly.