Head Swap API to Replace the Whole Head, Not Just the Face

Send two public image links to POST /api/v1/head-swap: source_img supplies the head, reference_img supplies the body, pose and aspect ratio. The route is prompt-free, so there is no prompt or ratio to tune. Track the job with the returned img_uuid.
Get API Key
Two portrait photographs on a light table connected by a soft beam of light

Two Images In, One Composite Out

The head comes from source_img

The head in source_img, not only the face, is placed into the new picture, which is how this route differs from a face-only swap.
Plaster head sculpture on a pedestal under a spotlight

Pose and framing from reference_img

The body, pose and aspect ratio of reference_img are kept, so the output drops into the same layout as the reference shot.
Mannequin posed on a photo set with a backdrop and studio lights

No prompt to write

The instruction is fixed by the model. A request is just reference_img and source_img, plus an optional custom_callback_url.
Minimal desk with two photo prints and nothing else
Two required image URLs; no model, prompt or ratio fields.

Head Swap Request Fields and Limits

Endpoint

POST /api/v1/head-swap. This route has its own path, so no model field is sent.

reference_img (required)

Publicly accessible image URL. Its body, pose and aspect ratio are kept in the result.

source_img (required)

Publicly accessible image URL. The head is taken from this image.

prompt and ratio

Not accepted. The instruction is fixed and the output follows the framing of reference_img.

custom_callback_url

Optional public HTTPS URL that receives the job-detail body when the status changes.
One flat price per generated image.

Head Swap API Pricing

1 token ($0.02) per image

Each request returns one generated image at this flat rate.

100 swaps: 100 tokens ($2)

Cost scales linearly with the number of requests.

Charged when accepted

The submit response includes the charged cost, which already reflects any discount on your account.

Refunded on failure

If the generation ends in failure, the tokens are returned automatically.

Integrate the Head Swap API

1

1. Create an API key

Generate a key at /keys and call the API from your server with Authorization: Bearer <key>.
2

2. Host both images

Upload the head photo and the body photo to storage that serves them over public URLs without cookies or signed headers.
3

3. Submit the pair

POST {"reference_img": "https://…/body.jpg", "source_img": "https://…/head.jpg"} to /api/v1/head-swap and keep the returned img_uuid.
4

4. Read the image

Poll GET /api/v1/jobs/detail or receive the callback, then copy the generated image to your own storage before the link expires.
Create an API Key
Identity placed into a fixed pose or template, with the subject's consent.

What Developers Build with Head Swap

Template photo products

Put a user's head into prepared costume, sports or fashion templates that keep their pose and crop.

Virtual try-on previews

Show a customer's own head on model shots wearing outfits or accessories.

Avatar and profile creators

Generate stylized full-body avatars from a selfie and a library of posed bodies.

Marketing variations

Reuse one approved campaign layout across several consenting models without a new shoot.
Endpoint, inputs, pricing and results.

Head Swap API FAQ

What is the Head Swap API endpoint?

POST https://api.goenhance.ai/api/v1/head-swap, with reference_img and source_img in the JSON body.

Which image provides what?

source_img provides the head; reference_img provides the body, pose and aspect ratio.

Can I add a prompt or choose a ratio?

No. The route is prompt-free and does not accept prompt or ratio; the output follows reference_img.

How much does a head swap cost?

1 token ($0.02) per image.

How do I get the result?

Poll GET /api/v1/jobs/detail?img_uuid=… or pass custom_callback_url; the finished job contains the generated image.

Whose photos can I use?

Only photos of people who have agreed to have their likeness used this way.

Start Building with the Head Swap API