Skip to main content

Head Swap is SpicyAPI's image head swap. It replaces the whole head in a target image with the head from a reference photo, hairstyle, hair colour and silhouette included, keeping the body, outfit, pose and background. Two URLs and an optional seed.

From $0.013/image

Workbench

Input

Image editing
1/1

Drop files or media links, paste, or browse · 1 file · Max 10 MB · JPG · PNG · WEBP

  • 1
1 / 1 files
The image being changed. Its body, wardrobe, pose, lighting and background are preserved; everything above the neck is replaced. JPEG, PNG and WebP are accepted. AVIF is not: it shares a container format with video, so the input check turns it away as video content, and HEIC or other ISOBMFF files are likely to behave the same way. Convert to JPEG or PNG first. at least 1 characters
1/1

Drop files or media links, paste, or browse · 1 file · Max 10 MB · JPG · PNG · WEBP

  • 1
1 / 1 files
The image supplying the whole head, including its shape, hairstyle and hair colour. Choose one lit from a similar direction and held at a similar angle to the target. JPEG, PNG and WebP are accepted. AVIF is not: it shares a container format with video, so the input check turns it away as video content, and HEIC or other ISOBMFF files are likely to behave the same way. Convert to JPEG or PNG first. at least 1 characters
Seed
Reuse a seed to compare two runs over the same image pair against an identical draw; leave it empty or set 0 for a random draw each time. It is a comparison tool, not a guarantee of an identical result. no lower than 0 · no higher than 2147483647
Safety checkerOff

SpicyAPI does not run a safety checker on this model. Your prompt and media go to the model as written, and the model itself decides what comes back.

Checking your account before enabling submission and pricing.

Output

Ready for a new run
silver-hair-onto-armorExample result

Related models and next tasks

Missing the model you need?

Tell us what to add and where you would use it. Requests go to the people who decide what gets onboarded next.

Two image URLs swap an entire head, no prompt

The Head Swap API takes a target image (image_url) and a reference head photo (reference_image_url), then returns the target with its whole head replaced: face, hairstyle, hair colour and skull shape all come from the reference, while everything below the neck is carried over from the target unchanged. There is no prompt field and no mask; the two images and an optional seed are the only inputs that shape the result.

Open the playground
Two image URLs swap an entire head, no prompt
Required inputs
image_url (target) and reference_image_url (reference head)
Optional input
seed, integer 0 to 2,147,483,647; 0 or omitted draws randomly
Accepted formats
JPEG, PNG or WebP for both image fields
Prompt or mask
Neither exists in this endpoint's schema
Task ceiling
1,800 seconds to reach a terminal state
Content policy
Uncensored: no platform content filter on this endpoint
Scope
The whole head moves, not just the faceHairstyle, hair colour and skull shape transfer along with facial features, which is the detail that separates this endpoint from a face-only swap.
Schema
Two images and an optional seed, nothing elseadditionalProperties is false and the schema lists exactly three fields, so there is no prompt to phrase and no strength dial to tune.
Failure mode
The neck is where a swap holds together or breaksLighting direction, skin tone and head angle between the two source images decide whether the join reads as one photograph.

What the Head Swap API does well

Hair, colour and head shape travel with the face

Hair, colour and head shape travel with the face

image_url supplies the body being kept: wardrobe, pose, lighting and background. reference_image_url contributes everything above the neck: the hairstyle and the hair colour come across with the face. A character can move into a completely different frame while keeping the reference's own hair.

Nothing to phrase or mask

Nothing to phrase or mask

The request body has exactly three fields: image_url, reference_image_url and an optional seed. There is no prompt to word and no region to select, so the work of getting a good output sits entirely in choosing the two photographs, and a stray key copied from another endpoint fails validation instead of being quietly ignored.

  • seed compares runs, it does not lock them

    Passing the same seed with the same image pair keeps two calls on the same draw, which is what makes a change of lighting or angle between two references readable. An identical output is still not guaranteed, and 0 or an omitted seed asks for a fresh draw on every call.

  • One head, one output, per call

    The endpoint assumes a single, clearly visible head in each image. A request returns one output image, billed per image produced, and there is no batch field for several variants in one call; different seeds or reference photos each need their own request.

  • Three ways to hand over an image

    image_url and reference_image_url are strings, not file parts attached to the request. Each one accepts a public HTTPS address, the spicy:// file URI the platform returns after a direct upload, or a Base64 data URI for a small file, so a local photograph can be used without being published on a public host.

  • An asynchronous task with a fixed ceiling

    A call creates a task: submit it, keep the returned task ID, poll until the status settles, then read the output image from platform storage. A task has 1,800 seconds to reach a terminal state before it is marked timed out, so build the polling loop around that ceiling instead of an expected turnaround.

Who Head Swap is for

  • One lit plate, a different presenter per version

    Campaign and catalog teams

    One lit plate, a different presenter per version

    A single approved photograph stays in image_url while each version's authorised presenter goes in reference_image_url, one task per pass. Wardrobe, pose, set and colour grade stay identical across the whole set, because the reference head is the only thing that changed between the calls.

  • Take the head from another frame of the same shoot

    Retouch and continuity

    Take the head from another frame of the same shoot

    Nothing in the schema requires the two images to show different people, so the frame with the best body and lighting can go in image_url while a second take of the same person supplies the head. The identity stays put and the pose survives the pass.

  • Combine a generated head with a photographed body

    Synthetic identity work

    Combine a generated head with a photographed body

    A generated portrait is a valid reference_image_url, since the field only asks for an image the endpoint can fetch. That lets a recurring synthetic character take on a photographed set's pose, wardrobe, lighting and background in a single call.

  • A two-field call that slots into any image workflow

    Pipeline engineers

    A two-field call that slots into any image workflow

    Because the schema is two required image fields and an optional seed, this endpoint drops into a pipeline after any image source, a render, a photograph or another editor's output, as long as each image arrives as an HTTPS address, an uploaded file URI or an inline data URI.

How to call the Head Swap API

  1. Give both images an address the endpoint can read

    image_url and reference_image_url take strings, so each image arrives as a public HTTPS link, a spicy:// file URI from the platform's upload flow, or an inline data URI when the file is small. JPEG, PNG and WebP work on both fields.

  2. Match lighting and angle between the two photos

    Pick a reference_image_url lit from roughly the same direction as image_url and held at a similar angle. The neck seam is judged on that match, and a mismatch is the most common cause of a visible join.

  3. Crop group photos down to one subject

    If either source shows more than one person, crop it to the intended subject before sending. The endpoint assumes one head per image, and an uncropped group shot produces an unpredictable result.

  4. Leave seed unset while exploring

    Omit seed or leave it at 0 for a random draw on early calls, then fix a seed once a pairing works so a later comparison call runs against the same draw.

  5. Submit the task and wait for a terminal status

    Send image_url, reference_image_url and the optional seed, save the returned task ID, then poll its status until it settles and fetch the output image from platform storage.

  6. Check the neck first

    Before judging the rest of the image, look at the neck seam. If it reads as one continuous photograph the rest of the transfer usually holds; if it does not, change the lighting or the angle in the source photos instead of resending the identical pair.

Head Swap worked examples

  • Three references over one plate

    One target photograph goes out three times with a different reference_image_url on each pass and seed left unset. The three results differ only in whose head arrived, which makes the neck seam the thing being compared, and the winner is the pass where the join reads as a single photograph.

  • A retry worth putting side by side

    The first call pins seed to a chosen integer. When the reference is then replaced with one lit from the same side as the target, the second call differs by exactly one input, so the two outputs answer the question that was asked. A random draw on each pass would have changed more than the reference did.

  • A group shot cropped down to one subject

    A party photograph with four people in it gives the endpoint no way to know which person is meant, so the target is cropped to the intended subject before it goes into image_url. The crop also keeps that subject's head large in frame, which is what both inputs want.

Head Swap API questions

There is no prompt to phrase, so the two image choices carry the whole result. Pick a reference_image_url lit from roughly the same direction as image_url and held at a similar angle, with one clearly visible head in each frame. Read the neck seam first on every result: if it shows a line, change the lighting or the angle in the source photographs, because no parameter on this endpoint compensates for a mismatch.

Models in this series2

Image models1

  • Head SwapCurrentImage editing$0.013per image