Skip to main content

Video Head Swap by SpicyAPI replaces the heads you picked from an analysis with one to three reference photos each, up to 10 heads per request. Body, motion and the original audio stay as shot; the resolution must match the analysis.

From $0.064/s

Workbench

Input

Video editing
1

Step 1 — Find the people in your clip

This model works in two passes. The first one watches your clip and returns a cropped preview of everyone it tracked; you then choose who gets replaced.

1/1

Drop a video here, or browse · 1 file · Max 90 MB · MP4

  • 1
1 / 1 files
Optional. Leave it out and the video from the analysis is used. If you do send it, it has to be the same URL: a different clip is rejected, because the tracking data belongs to the original one. It has to be a direct link to the video file itself — a page that plays the video hands us HTML instead, the input check reads no duration from it, and the call fails with the charge refunded. Uploading the file is the most reliable route. at least 1 characters
Must match the resolution the analysis ran at. This is also the field that sets the price tier.

Pricing this pass…

The first pass is a model call of its own and carries its own price. The edit below is quoted separately.

2

Step 2 — Choose who to replace

Run the first pass and everyone it tracked shows up here.

Seed
Random seed; zero requests a random seed. The same seed makes a fair comparison when you change one other thing, it does not promise an identical frame-for-frame 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
Example 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.

Track every head in the clip, then swap only the ones you name

Video Head Swap runs in two calls. The first analyses a clip of 5 to 30 seconds and returns one numbered preview still per head it found, in a fixed order. The second takes that analysis, the positions you picked and one to three reference photos for each, and returns the clip with those heads replaced. Hair travels with the head; the body, the wardrobe and the motion below the neck stay exactly as shot, and the original audio comes back with them.

Open the playground
Call one
video-analyze: video_url plus a tracking resolution, 480p or 720p
Call two
video-edit: analysis_task_id, swap_targets, and the same resolution
Targets per call
1 to 10 swap_targets, each with 1 to 3 reference photos
What transfers
Face, hairstyle, hair colour and head shape; the body is untouched
Analysis shelf life
24 hours; one analysis can feed several swap calls
Content policy
Uncensored: no platform content filter on either call
Scope
Hair comes across, the body does notThe reference supplies everything above the neck, including hairstyle and hair colour. Wardrobe, build and the way the person moves belong to the footage and stay there.
Why two calls
You see which heads were found before paying for the swapThe analysis returns a preview still per head. Picking by position off those stills costs a flat fee and removes the ambiguity a text description would leave.
Where it breaks
The neck seam decides whether it reads as one shotLighting direction and head angle between the reference photos and the footage are what the join is judged on, and no parameter on this endpoint compensates for a mismatch.

What the Video Head Swap API does well

  • Hairstyle and hair colour move with the face

    This is the line between a head swap and a face swap. A face swap borrows features and leaves the target's own hair in place; here the reference's hairstyle, hair colour and skull shape arrive together, so a character can keep their own look while inheriting the footage's body and motion.

  • Numbered targets instead of guesswork

    The analysis returns the detected heads in a fixed order, and swap_targets addresses them by object_index starting at zero. There is no prompt describing who you mean and no region to draw: position zero is the first preview still that came back.

  • Swap some heads, keep the rest

    Only the positions listed in swap_targets change. In a scene with several people on screen you can replace one and leave the others exactly as shot, which is what makes this usable on footage that is already cut.

  • One analysis, several swaps

    The tracking result stays usable for 24 hours, so the same analysis_task_id can feed one swap call after another. Trying a different reference photograph does not mean paying to track the clip again.

  • One to three references per head

    Each target takes an image_urls array of one to three photographs of the same person. Extra angles help the model hold the head together as it turns; all of them should show the same person, because the array describes one identity rather than a set of options.

  • seed compares runs, it does not lock them

    seed takes any integer from 0 to 2,147,483,647. Passing the same one across two calls keeps them on the same draw so a change of reference photograph is the only difference between the outputs. An identical result is still not promised, and 0 or an omitted seed draws fresh.

Who Video Head Swap is for

  • Continuity and post

    Carry a look across takes that were shot apart

    When a performer's hair changed between shooting days, the head from the correct day can be carried onto the take with the better performance. The body, the wardrobe and the blocking come from the footage, so only the thing that was wrong changes.

  • Campaign versioning

    One filmed body, several presenters

    A single approved take is analysed once, then each authorised presenter's photographs go out as their own swap call. Wardrobe, set, camera move and grade are identical across the set because nothing below the neck was touched.

  • Synthetic talent

    A recurring character on a photographed body

    Nothing in the schema asks whether the reference photographs are of a real person, so a consistent generated head — hair and all — can be carried onto filmed motion and inherit its lighting and pacing.

  • Pipeline engineers

    A cheap checkpoint between two steps

    The analysis is a flat-rate call whose output is small and inspectable. A pipeline can put a reviewer or a rule between the calls: look at which heads were found, decide, then pay for the swap only once the targets are right.

How to call the Video Head Swap API

  1. Send the clip to the analysis call

    video_url takes a public HTTPS address, a spicy:// file URI from the platform's upload flow, or a data URI for a small file. Choose the tracking resolution now — the swap call has to repeat it, and it sets the price tier.

  2. Read the preview stills in order

    The analysis returns one still per head it found, and their order is the numbering: the first still is object_index 0. Keep that order alongside the task ID, because the next call addresses it.

  3. Pick references lit like the footage

    Choose photographs lit from roughly the direction the shot is lit from, with the head at a similar angle. The neck seam is judged on that match, and it is the most common reason a swap reads as a composite.

  4. Name the positions and submit

    Build swap_targets with one entry per head you are changing, pass the same resolution and the analysis_task_id, and leave video_url out to reuse the analysed source. Save the returned task ID and poll until it settles.

  5. Check the neck before anything else

    On the result, look at the join first. If it reads as one continuous shot the rest usually holds; if it does not, change the reference photographs rather than resending the identical pair — the analysis is still warm for 24 hours.

Video Head Swap worked examples

  • Two heads in frame, one of them replaced

    The analysis returns two stills. swap_targets carries one entry, object_index 0, with three photographs of the replacement at different angles so the head holds together as it turns. The second person is absent from the array and comes back untouched.

  • Same analysis, two lighting choices

    The first swap uses a studio portrait lit from the front and shows a visible neck line against a side-lit shot. The second call, against the same analysis_task_id and the same seed, uses a reference lit from the same side. Exactly one input changed, so the comparison says something.

  • A rush trimmed before it is sent

    A 45-second take is cut to the 7 seconds that matter before the analysis. That brings it inside the 5 to 30 second window the tracker wants, keeps each head large in frame, and bills the swap on 7 seconds instead of 45.

Video Head Swap API questions

There is no prompt here, so the clip and the reference photographs carry the whole result. Trim the footage to the section that matters and keep each head reasonably large and reasonably continuous in frame — long full occlusions are what tracking loses. Then pick references lit from roughly the same direction as the shot and held at a similar angle, because the neck seam is judged on that match. Read the preview stills before spending on the swap: if the head you wanted is not among them, no reference photograph will fix it.

Models in this series2

Video models1

  • Video Head SwapCurrentVideo editingFrom $0.064per output second