YepAPI
AI Models

Genjutsu Object Swap

Genjutsu Object Swap API by Higgsfield. Replace an object, character or clothing in a source video using a reference image.

Pricing, live playground and model overview: Genjutsu Object Swap API on YepAPI

POST/v1/media/queue
from $0.636/source second

Overview

Higgsfield's Genjutsu Object Swap — replace an object, character or piece of clothing in a source video with the one in your reference image, keeping the original motion and camera. Async operation — submit a job, poll for completion.

PropertyValue
Model IDhiggsfield/genjutsu-object-swap
ProviderHiggsfield
Inputssource video
Resolutions720p, 480p, 1080p
Source VideoPublic MP4 or MOV URL, at least 4 seconds
BillingPer job — priced when queued, charged only on success
Pricingfrom $0.636/source second

Usage

All media models use the async job queue. Submit a job, then poll for the result.

Step 1: Submit Job

Source video + reference image

Send the source video as a public MP4 or MOV URL in options.referenceVideoUrl, and the reference image (the object, character or clothing to swap in) in imageData. Both are required.

const res = await fetch('https://api.yepapi.com/v1/media/queue', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    model: 'higgsfield/genjutsu-object-swap',
    prompt: 'Replace the jacket in the video with the jacket in the reference image',
    options: {
      resolution: '720p',
      referenceVideoUrl: 'https://example.com/source.mp4', // public MP4 or MOV URL
    },
    imageData: {
      mimeType: 'image/png',
      base64: '...', // Base64-encoded image
    },
  }),
});
const { data } = await res.json();
// data.jobId — use this to poll for results
curl -X POST https://api.yepapi.com/v1/media/queue \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "higgsfield/genjutsu-object-swap", "prompt": "Replace the jacket in the video with the jacket in the reference image", "options": {"resolution": "720p", "referenceVideoUrl": "https://example.com/source.mp4"}, "imageData": {"mimeType": "image/png", "base64": "..."}}'

Step 2: Poll for Result

const status = await fetch(`https://api.yepapi.com/v1/media/status/${data.jobId}`, {
  headers: { 'x-api-key': 'YOUR_API_KEY' },
});
const { data: job } = await status.json();
// job.status — "pending" | "processing" | "completed" | "failed"
// job.result.video — { mimeType, base64 } when completed
curl https://api.yepapi.com/v1/media/status/JOB_ID \
  -H "x-api-key: YOUR_API_KEY"

Request Body

ParameterTypeRequiredDescriptionDefault
modelstringYeshiggsfield/genjutsu-object-swap—
promptstringYesShort instruction for the swap—
options.resolutionstringNo720p, 480p, 1080p720p
options.referenceVideoUrlstringYesPublic MP4 or MOV URL of the source video—
imageData.mimeTypestringYesMIME type of input image (image/png, image/jpeg, image/webp)—
imageData.base64stringYesBase64-encoded reference image (object, character or clothing to swap in)—

Options are validated when you submit: an unsupported duration, resolution or value returns 400 naming the allowed values.

Features

  • Source video via options.referenceVideoUrl
  • Replacement object, character or clothing from imageData
  • 480p, 720p or 1080p
  • Billed per second of source video

Pricing

ResolutionCost per second of source video
480p$0.636
720p$1.362
1080p$3.264

Billed on the source video's length, rounded up to whole seconds. Example: 10-second source at 720p = 10 × $1.362 = $13.62. Each job is priced when it's queued and charged only if it succeeds — failed or moderated jobs are free. Use Genjutsu Light for a lower-cost version.

Info

Video jobs can take several minutes to complete. When capacity is busy, jobs wait in the queue (status stays pending or processing) — no action needed. Results retained for 1 hour.

Warning

The source video must be reachable at a public URL (MP4 or MOV). Pricing follows the source video's length, not the output.

Under the Hood

Powered by Higgsfield's Genjutsu Object Swap via our AI provider.

On this page