Multiple Face Swap
POST /api/v1/multiple-face-swap/submit
targetImageUrl is required and faceMappings is required.
Required inputs
targetImageUrlstring- Publicly reachable URL of the target photo.
faceMappingsobject[]- One to 20 reference mappings. Omit targetFaceIndex/referenceFaceIndex until get_task_result returns indexed previews, or provide explicit stable indexes.
Edit the sample inputs for your own task before submitting.
# Set VIDMAGE_IDEMPOTENCY_KEY to a unique value for this task; preserve it for transport retries.
curl -X POST "https://vidmage.ai/api/v1/multiple-face-swap/submit" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: ${VIDMAGE_IDEMPOTENCY_KEY}" \
-H "Content-Type: application/json" \
-d '{"targetImageUrl":"https://vidmage.ai/assets/images/ai-tools/close-up-group-people.webp","faceMappings":[{"referenceFaceImageUrl":"https://vidmage.ai/assets/images/samples/smiling-man-sweater.webp"}]}'
# -> { "success": true, "taskId": "...", "creditsRequired": ..., "creditsConsumed": 0, "usageDeferred": true }Parameters and input rules2 fields
| Field | Type | Required | Default | Meaning and limits |
|---|---|---|---|---|
targetImageUrl | string | Yes | Not specified | Publicly reachable URL of the target photo. No additional field constraint listed. |
faceMappings | object[] | Yes | Not specified | One to 20 reference mappings. Omit targetFaceIndex/referenceFaceIndex until get_task_result returns indexed previews, or provide explicit stable indexes. Minimum items: 1 · Maximum items: 20 |
Retrieve the result
Save taskId from the accepted submission and send it to this endpoint:
POST /api/v1/multiple-face-swap/query
Use the same Bearer API key. On completion, read the imageUrl result field.
curl -X POST "https://vidmage.ai/api/v1/multiple-face-swap/query" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "taskId": "TASK_ID_FROM_SUBMIT" }'
# -> { "success": true, "data": { "status": "...", "imageUrl": "https://..." } }

