GIF Face Swap
POST /api/v1/gif-face-swap/submit
targetGifUrl is required and referenceFaceImageUrl is required.
Required inputs
targetGifUrlstring- Animated-GIF fileUrl returned by upload_files.
referenceFaceImageUrlstring- Publicly reachable URL of the photo containing the replacement face.
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/gif-face-swap/submit" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: ${VIDMAGE_IDEMPOTENCY_KEY}" \
-H "Content-Type: application/json" \
-d '{"targetGifUrl":"https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif","referenceFaceImageUrl":"https://vidmage.ai/assets/images/samples/smiling-man-sweater.webp"}'
# -> { "success": true, "taskId": "...", "creditsRequired": ..., "creditsConsumed": 0, "usageDeferred": true }Parameters and input rules4 fields
| Field | Type | Required | Default | Meaning and limits |
|---|---|---|---|---|
targetGifUrl | string | Yes | Not specified | Animated-GIF fileUrl returned by upload_files. No additional field constraint listed. |
referenceFaceImageUrl | string | Yes | Not specified | Publicly reachable URL of the photo containing the replacement face. No additional field constraint listed. |
targetFaceIndex | number | No | Not specified | Optional explicit tracked-face index. Omit to auto-select only one detected target face. Minimum: 0 · Maximum: 99 · Whole numbers only |
referenceFaceIndex | number | No | Not specified | Optional explicit reference-face index. Omit to auto-select only one detected reference face. Minimum: 0 · Maximum: 99 · Whole numbers only |
Retrieve the result
Save taskId from the accepted submission and send it to this endpoint:
POST /api/v1/gif-face-swap/query
Use the same Bearer API key. On completion, read the gifUrl result field.
curl -X POST "https://vidmage.ai/api/v1/gif-face-swap/query" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "taskId": "TASK_ID_FROM_SUBMIT" }'
# -> { "success": true, "data": { "status": "...", "gifUrl": "https://..." } }

