Developer Docs/Talking Photo API

Talking Photo API

Build Talking Photo integrations with A2E. Review authentication, request parameters, task creation, status, and result endpoints.

Overview

Animate a portrait photo to lip-sync with a given audio track, generating a realistic talking-head video from a single still image.

Primary Endpoint

POST/api/v1/talkingPhoto/start

Start talking photo generation

Request Parameters

NameTypeRequiredDescription
namestringYesName of the talking photo task
image_urlstringYesURL of the source image
audio_urlstringNoOptional audio URL
durationintegerNoDuration in seconds
promptstringYesGeneration prompt
negative_promptstringYesNegative prompt to avoid unwanted features
webhook_urlstringNoHTTPS URL to receive task.completed / task.failed notifications. Best-effort delivery, single attempt, no retries; clients should treat the detail API as the source of truth.
webhook_tokenstringNoOptional plaintext token returned in the X-A2e-Webhook-Token header so receivers can verify the request originated from a2e.

Request Example

curl -X POST "https://www.a2e.com.cn/api/v1/talkingPhoto/start" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "My Talking Photo",
  "image_url": "https://example.com/photo.jpg",
  "audio_url": "https://example.com/audio.mp3",
  "duration": 5,
  "prompt": "Make this person smile and speak",
  "negative_prompt": "blurry, distorted",
  "webhook_url": "https://your-server.example.com/a2e/webhook",
  "webhook_token": "a-shared-secret"
}'

Related Endpoints

POST/api/v1/talkingPhoto/start

Start talking photo generation

GET/api/v1/talkingPhoto/allRecords

Get all task records

POST/api/v1/talkingPhoto/batchDetail

Batch query task details

GET/api/v1/talkingPhoto/{_id}

Get task details

DELETE/api/v1/talkingPhoto/{_id}

Delete task

Responses

200

Talking photo task started successfully

400

Bad Request - Invalid parameters

401

Unauthorized - Invalid or missing bearer token