VidMage

VidMage is an AI video and image creation platform for creators. Turn your ideas and images into videos and fresh visuals.

Open the creator tools
Explore APIs
AI Video APIsAI Image APIsAI Audio APIsAI 3D APIsAI Face Swap APIsAI Effects APIs
Build with VidMage
QuickstartAPI keysVidMage MCPError reference
Your account
Developer consoleAbout VidMagePlans and creditsAPI billingContact support
© 2026 VidMage. All rights reserved.
Privacy PolicyTerms of ServiceReport Abuse
Skip to content
VidMage/Developers
Overview
APIs
All APIsAI Video APIsAI Image APIsAI Audio APIsAI 3D APIsAI Face Swap APIsAI Effects APIs
DocumentationVidMage MCPOpen console
Developers/Documentation/Multiple Face Swap Video API documentation
Start here
DocumentationQuickstartAuthentication
Core workflows
File uploadsTask lifecycleCredits and billingErrors and recoveryVidMage MCP
Browse documentation
All API documentation
Video documentation 36AI Video Head SwapAI Video Face SwapAI Multiple Face Swap VideoAI Text to VideoAI Image to VideoAI Video to VideoAI Video ExtenderAI Video to Anime ConverterAI Video Background RemoverAI Video Watermark RemoverSora Link Watermark RemoverSora 2 Video GeneratorAI Photo DanceAI Motion ControlAI Talking PhotoAI Lip SyncAI Subtitle GeneratorAI Video UpscalerKling AI Video GeneratorPixVerse AI Video GeneratorHailuo AI Video GeneratorMiniMax H3 AI Video GeneratorGrok Video GeneratorSora 2 AI Video GeneratorWan AI Video GeneratorWan 3.0 AI Video GeneratorSeedance 2.0 AI Video GeneratorSeedance 2.5 AI Video GeneratorSeedance AI Video GeneratorMidjourney Video GeneratorVidu AI Video GeneratorVeo 3.1 AI Video GeneratorKling 3.0 AI Video GeneratorSkyReels AI Video GeneratorHappyHorse AI ModelRunway AI Video Generator
Image documentation 24AI Photo Face SwapAI Head SwapAI Multiple Face SwapAI Text to ImageAI Image to ImageAI Girl GeneratorAI Hairstyle ChangerAI Clothes ChangerAI Object RemoverAI Image Watermark RemoverAI Image UpscalerGPT Image 2 Image to ImageAI GIF Face SwapMidjourney AI Image GeneratorGrok AI Image GeneratorNano Banana AI Image GeneratorGPT Image GeneratorSeedream AI Image GeneratorZ-Image AI ModelWan Image GeneratorQwen Image GeneratorQwen 3.0 Image GeneratorGPT Image 2 GeneratorGPT Image 2.5 Generator
Audio documentation 3AI Voice CloneAI Voice DesignAI Text to Music
3d documentation 3AI Image to 3DAI Four-View to 3DAI Text to 3D

Multiple Face Swap Video API documentation

Replace up to four distinct tracked faces in one target video in a single operation. Detection runs inside the task and returns NEEDS_INPUT when selections are required. Billing is based on video duration and is not multiplied by mapped-face count.

On this page01 / 07
01Endpoints02Parameters and input rules03Measured media limits04Example request05Task results and recovery06Credits07Integration guides

Endpoints

Contract itemValue
Capabilitymultiple-face-swap-video
SubmitPOST https://vidmage.ai/api/v1/multiple-face-swap-video/submit
QueryPOST https://vidmage.ai/api/v1/multiple-face-swap-video/query
Task identifiertaskId
Result fieldvideoUrl

Authenticate with Authorization: Bearer YOUR_API_KEY. Save the task identifier and query the same capability. Use a stable Idempotency-Key for submission retries.

Product guide: AI Multi Face Swap API for Photos and Videos

Parameters and input rules

FieldTypeRequiredDefaultMeaning and limits
targetVideoUrlstringYesNot specifiedTarget-video fileUrl returned by upload_files.
faceMappingsobject[]YesNot specifiedOne to four reference mappings. Omit indexes until get_task_result returns indexed previews, or provide explicit stable indexes.
Minimum items: 1
Maximum items: 4

faceMappings item fields

FieldTypeRequiredDefaultMeaning and limits
targetFaceIndexintegerNoNot specifiedOptional explicit zero-based tracked target face index.
Minimum: 0
Maximum: 99
referenceFaceImageUrlstringYesNot specifiedPublicly reachable reference-face image URL.
referenceFaceIndexintegerNoNot specifiedOptional explicit face index in the reference image.
Minimum: 0
Maximum: 99

Measured media limits

InputRule
targetVideoUrlThe server measures this media for billing. Maximum 300 seconds. Do not send videoDuration in the submission body.

Example request

{
  "targetVideoUrl": "https://vidmage.ai/assets/models/hailuo-ai-video-generator/skincare-ad.mp4",
  "faceMappings": [
    {
      "referenceFaceImageUrl": "https://vidmage.ai/assets/images/samples/smiling-man-sweater.webp"
    }
  ]
}
# 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-video/submit" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: ${VIDMAGE_IDEMPOTENCY_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"targetVideoUrl":"https://vidmage.ai/assets/models/hailuo-ai-video-generator/skincare-ad.mp4","faceMappings":[{"referenceFaceImageUrl":"https://vidmage.ai/assets/images/samples/smiling-man-sweater.webp"}]}'
# -> { "success": true, "taskId": "...", "creditsRequired": ..., "creditsConsumed": 0, "usageDeferred": true }

Task results and recovery

URL of the completed video with all requested face mappings applied. Read videoUrl from the completed query response. Preserve taskId while the task is running.

curl -X POST "https://vidmage.ai/api/v1/multiple-face-swap-video/query" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "taskId": "TASK_ID_FROM_SUBMIT" }'
# -> { "success": true, "data": { "status": "...", "videoUrl": "https://..." } }

Submission authorizes this task; provider work and billing can advance during queries. Initial creditsConsumed: 0 does not mean the task is free. A timeout is not a confirmed failure. Recover the existing task instead of resubmitting.

For face selection and error recovery, follow Task lifecycle. MCP uses the normalized taskId argument in get_task_result, including capabilities whose REST identifier is requestId.

Credits

Component / optionRateMinimum
Video duration1 credits / second—

The example uses the duration shown above. The server measures uploaded media for billing; this duration is only supplied to the estimate.

Duration × rate is rounded up to whole credits; the applicable minimum charge is enforced.

Use the Playground or the MCP credit estimator for your exact inputs. Credits and billing.

Integration guides

Authentication · File uploads · Task lifecycle · Error recovery · MCP

Reference generated from the current API contractDocumentation home ↗