pixverse/swap
Swap by PixVerse - animate still images into dynamic videos with AI. Transform photos into cinematic clips with natural motion, camera movement, and optional audio generation.
PNG, JPEG, WebP, or GIF · 20 MiB maximum
Example output — click Run to generate your own
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
https://api.sandbase.ai/v1/runpixverse/swapInput Schema
7 parameters · 1 required · 6 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
image | string | Required | URL of the target image for swapping |
seed | integer | Optional | Random seed for generation |
video | string | Optional | URL of the external video to swap |
swap_mode | string | Optional | The swap mode to use · Options: person, object, background · Default: "person" personobjectbackground |
resolution | string | Optional | The output resolution (1080p not supported) · Options: 360p, 540p, 720p · Default: "720p" 360p540p720p |
keyframe_id | integer | Optional | The keyframe ID to use for face/object mapping. The input video is normalized to 24 FPS before processing, so keyframe 1 = first frame, keyframe 24 = 1 second in, etc. Valid range: 1 to (duration_seconds * 24). · Min: 1 · Default: 1 |
original_sound_switch | boolean | Optional | Whether to keep the original audio · Default: true |
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
Async Workflow
This model uses asynchronous execution. Submit a request and poll for the result.
- Submit — POST to /v1/run, receive an
id - Poll — GET /v1/run/{id} until status is
completed,failed, ortimeout - Retrieve — Read
outputsfrom the completed response
Code Examples
Ready-to-run snippets
# Step 1: Submit
curl -X POST https://api.sandbase.ai/v1/run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "pixverse/swap",
"image": "https://static.sandbase.ai/examples/pixverse/swap/input_image_0.jpg",
"video": "https://static.sandbase.ai/examples/pixverse/swap/output_url_1.mp4",
"swap_mode": "person",
"resolution": "720p",
"keyframe_id": 1,
"original_sound_switch": true,
"prompt": "a beautiful sunset over mountains"
}'
# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
-H "Authorization: Bearer YOUR_API_KEY"API README
PixVerse
PixVerse is the PixVerse route for video subject replacement, turning an existing shot and replacement subject into a production-ready result while keeping the operation distinct from neighboring endpoints. Swap by PixVerse - animate still images into dynamic videos with AI. Transform photos into cinematic clips with natural motion, camera movement, and optional audio generation. The workflow is designed for creators who need the model’s specific transformation to remain visible in the request, so the source, intended change, and finished artifact can be reviewed as one coherent creative decision.
In practical use, this route exposes seed, image, video, swap_mode, resolution, keyframe_id, original_sound_switch to shape the exact deliverable. Those controls let a team preserve the important source constraints, state subject behavior or material treatment precisely, choose supported timing or output characteristics, and reproduce successful settings across alternate takes. The result fits an iterative pipeline: establish the core brief, compare controlled variations, then pass the selected asset into editorial, design, localization, visualization, or publishing work.
Highlights
- Targeted subject swap. Replace the selected person or object while retaining the surrounding shot.
- Motion-aware integration. Carry the replacement through the clip so position and movement remain coherent over time.
- Resolution-aware rendering. Select the documented output tier and duration bracket for the intended delivery.
- Existing-shot revision. Revise cast or product presence without regenerating the entire scene from text.
Pricing
| Configuration | Price |
|---|---|
| Up to 5 seconds · 360p/540p | $0.15 |
| Up to 5 seconds · 720p | $0.20 |
| Up to 5 seconds · 1080p | $0.40 |
| More than 5 seconds · 360p/540p | $0.30 |
| More than 5 seconds · 720p | $0.40 |
| More than 5 seconds · 1080p | $0.80 |
When to Use
| Scenario | Why it fits |
|---|---|
| Exact workflow fit | Choose this route when the required deliverable is video subject replacement, rather than a related route with different source media. |
| Directed creative iteration | Use it when subject, motion, material, speech, framing, or finish should be expressed explicitly and compared across controlled variants. |
| Existing-asset continuity | Use it when supplied images, video, audio, references, or styles must remain the anchor for the generated result. |
| Repeatable production | Use it when successful inputs need to be saved and rerun across a campaign, asset set, localization pass, or batch. |
| Pipeline handoff | Use it when the returned artifact will move into editorial, compositing, visualization, review, storage, or publishing. |
Prompt Guide
Start with the source or subject, then describe the intended transformation, movement or behavior, camera and composition, and the desired finish. Keep media URLs reachable, use only fields documented for this exact route, and change one major control at a time when comparing results. For source-led tasks, describe what should change as well as what must remain recognizable.
{
"image": "https://static.sandbase.ai/examples/pixverse/swap/input_image_0.jpg",
"resolution": "720p"
}
Technical Specs
| Property | Value |
|---|---|
| Model ID | pixverse/swap |
| Execution mode | async |
| Required inputs | image |
seed | integer |
image | string |
video | string |
swap_mode | string; options: person, object, background; default: person |
resolution | string; options: 360p, 540p, 720p; default: 720p |
keyframe_id | integer; minimum: 1; default: 1 |
original_sound_switch | boolean; default: true |
Related Models
pixverse/extendpixverse/lipsyncpixverse/sound-effectspixverse/c1/image-to-video

