Overview
Replace an actor in a video segment with a different person, retaining original motion, camera angle, and scene continuity.
Primary Endpoint
POST
/api/v1/actorSwap/startStart actor swap task
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | No | Name of the actor swap task |
| image_url | string | Yes | URL of the reference actor image |
| video_url | string | Yes | URL of the control video |
| prompt | string | No | Positive prompt for generation |
| negative_prompt | string | No | Negative prompt to avoid unwanted features |
| timeout | integer | No | Timeout in seconds |
| webhook_url | string | No | HTTPS 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_token | string | No | Optional 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/actorSwap/start" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "My Actor Swap",
"image_url": "https://example.com/actor.jpg",
"video_url": "https://example.com/video.mp4",
"prompt": "high quality, realistic",
"negative_prompt": "blurry, distorted",
"timeout": 300,
"webhook_url": "https://your-server.example.com/a2e/webhook",
"webhook_token": "a-shared-secret"
}'Related Endpoints
POST
/api/v1/actorSwap/startStart actor swap task
GET
/api/v1/actorSwap/allRecordsGet all task records
POST
/api/v1/actorSwap/batchDetailBatch query task details
GET
/api/v1/actorSwap/{_id}Get task details
DELETE
/api/v1/actorSwap/{_id}Delete task
Responses
200
Actor swap task started successfully
401
Unauthorized - Invalid or missing bearer token