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
/v1/media/queueOverview
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.
| Property | Value |
|---|---|
| Model ID | higgsfield/genjutsu-object-swap |
| Provider | Higgsfield |
| Inputs | source video |
| Resolutions | 720p, 480p, 1080p |
| Source Video | Public MP4 or MOV URL, at least 4 seconds |
| Billing | Per job — priced when queued, charged only on success |
| Pricing | from $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 resultscurl -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 completedcurl https://api.yepapi.com/v1/media/status/JOB_ID \
-H "x-api-key: YOUR_API_KEY"Request Body
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
model | string | Yes | higgsfield/genjutsu-object-swap | — |
prompt | string | Yes | Short instruction for the swap | — |
options.resolution | string | No | 720p, 480p, 1080p | 720p |
options.referenceVideoUrl | string | Yes | Public MP4 or MOV URL of the source video | — |
imageData.mimeType | string | Yes | MIME type of input image (image/png, image/jpeg, image/webp) | — |
imageData.base64 | string | Yes | Base64-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
| Resolution | Cost 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.
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.
The source video must be reachable at a public URL (MP4 or MOV). Pricing follows the source video's length, not the output.
Powered by Higgsfield's Genjutsu Object Swap via our AI provider.
Genjutsu Motion Transfer
Genjutsu Motion Transfer API by Higgsfield. AI motion transfer: take the motion from a source video and apply it to the character in your reference image.
Genjutsu Light Motion Transfer
Genjutsu Light Motion Transfer API by Higgsfield. Lower-cost AI motion transfer: apply a source video's motion (first 15 s) to your reference image.