by PopNow

Swap just the face, keep hair, pose and background

popnow/face-swap-v1/edit
Face Swap AI Image Generator online
  • Face Swap

About Face Swap

Swap just the face, keep hair, pose and background.

Call it with the model name popnow/face-swap-v1/edit on POST /jobs/createTask, from $0.013.

Introduction

Face Swap moves the facial features from one image onto the person in another. Only the features travel: the target's hairstyle, hairline, head silhouette, pose, wardrobe, lighting and background all stay as they were, which is what makes the result sit inside the original photograph rather than on top of it.

The request is two image URLs and an optional seed: image_url is the photograph being changed and reference_image_url supplies the face. There is no prompt field to write, and one image comes back per request.

Key features

Preserve the plate, change the identity

This is the narrow choice when the target photo already has the right hair, pose, wardrobe, framing and environment. It transfers facial identity while protecting the rest of the approved composition, so a recast does not become a full image-generation pass.

Built for repeatable paired assets

The workflow is deliberately simple: prepare a cleared target and a cleared reference with compatible angle and lighting, then review the jawline, eyes and skin transition. That makes it useful for controlled avatar, catalogue and campaign variants where the plate must remain recognisable.

Choose the swap scope before you start

Use Face Swap when the target's hairstyle and head silhouette are part of the composition. If the incoming identity must bring its hair and whole head shape into the plate, route the job to Head Swap instead; choosing the right scope avoids an avoidable rerun.

Request parameters

ParameterRequiredDescription
image_urlYesThe picture to start from.
reference_image_urlYesThe picture whose face or look gets carried over.
seedNoUse the same seed and settings for more controlled comparisons. ≥ 0 · ≤ 2147483647

Pricing

Prices are in USD and charged to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your PopNow balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.

OptionUSD per image
Standard$0.013

Send the same request body to POST /jobs/quote to see the estimated and maximum USD charge before running. A quote does not run the task or charge your balance.

Use cases

A new face for a portrait whose hair already works

Use this endpoint when the target photograph's hairstyle, hairline and head silhouette belong to the composition and only the facial features should change. Send the target as image_url and the face as reference_image_url, then compare the eyes and jawline with the source at full size before accepting the result.

Recasting a stock or generated plate

Take a plate whose lighting, pose and set already work and put a different face in it, rather than regenerating the whole frame and losing the composition you had already approved.

Bulk avatar and profile pipelines

With no prompt to write, a list of target-reference pairs can be pushed through the endpoint programmatically. Pin a seed per pair when a retry has to stay comparable with the first run.

Consistent characters across a shoot

Generate a set of scenes with any model, then bring one face across all of them so a series reads as the same person. Because hair and wardrobe stay with each target frame, the variation you generated survives the pass.

Prompt guide & pro tips

Confirm you hold the rights to both faces

Before anything technical: the target and the reference both depict people, and you need authorisation for the likeness you are moving and for the image you are moving it into. Keep the release with the job record.

Host both images and send the pair

image_url is the picture being changed; reference_image_url supplies the face. No prompt is involved — a general editor needs one such as: "Face swap: take the face and hairline of the woman in the second image and place it onto the woman in the first image. Keep the first image's pose, outfit, magazine layout, lighting, framing and colour grade completely unchanged. Match skin tone and lighting so the result reads as one photograph." — this endpoint needs neither.

Check the result before iterating

Both images should show a clearly visible, reasonably frontal, well-lit face; heavy profile angles, motion blur, dense occlusion and very small faces are where the transfer degrades or fails outright. A large mismatch in lighting direction or skin tone between the two images shows at the jawline, so pick a reference whose light roughly matches the target. One face is swapped per image; crop a group shot to the person you want first. There is no prompt, no mask and no strength control: if the result is wrong, the fix is a different input pair, not a reworded request.

API quick start

Call the Face Swap API in three steps

  1. Create an API key. Sign in to PopNow and create a key in the API console. Keys start with sk-popnow-. API calls are billed in USD from your PopNow balance.
  2. Send the request. POST /jobs/createTask with model popnow/face-swap-v1/edit and an input object that follows the parameter table. The response returns a task ID straight away.
  3. Get the result. Poll GET /jobs/recordInfo with the task ID, or pass a callBackUrl and we post the result to it. Download the output links when the task succeeds.
# 1. Create the task. Keep the Idempotency-Key if you retry after a network error.
export IDEMPOTENCY_KEY="$(uuidgen)"
curl -X POST https://api.popnow.ai/api/v1/jobs/createTask \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -d '{
  "model": "popnow/face-swap-v1/edit",
  "input": {
    "image_url": "https://media.popnow.ai/influencer/examples/marco.webp",
    "reference_image_url": "https://media.popnow.ai/influencer/examples/ava.webp"
  }
}'

# 2. Copy data.taskId from the response, then poll until state is succeeded, failed, canceled or expired.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Replace the prompt and any links with your own. The API tab has the response, polling and callback reference.

Face Swap API questions

How much does the Face Swap API cost?

Face Swap costs $0.013 per image. API usage is charged in USD to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your PopNow balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.

What is the model name for Face Swap in the API?

Put popnow/face-swap-v1/edit for Face Swap in the model field of POST /jobs/createTask.

What is Face Swap API designed for?

The base Face Swap body contains image_url, reference_image_url and optional seed, with no mask, strength or prompt to tune.

What is the difference between Face Swap and Head Swap?

Use the base Face Swap for identity changes within an approved composition; replacing the entire head and its hair belongs to Head Swap instead.

Which image should go in image_url?

In the base Face Swap request, image_url is the composition that receives the new face, not the portrait supplying its identity.

Is there a prompt or a mask?

The base Face Swap body contains image_url, reference_image_url and optional seed, with no mask, strength or prompt to tune.

What kind of input photos work best?

For the base edit, use clear, reasonably frontal reference photos and crop group pictures to the intended subject; blur, obstructions and opposing light can spoil the facial boundary.

Can I try Face Swap without writing code?

Run Face Swap in the Playground without an API key, using the same PopNow balance as the website, shown in USD. Each run appears in your developer history with its matching code.

All Face Swap models

More about Face Swap