SwitchX overview
SwitchX by Beeble
No green screen, no manual masking, no separate relighting pass. Works for both video and image input.
SwitchX specs
- Model ID
beeble/switchx-video-to-video- Developer
- Beeble
- Input
- Text, Image, Video
- Output
- Image, Video
- Endpoint
POST https://api.aimlapi.com/v2/video/generations
What Is SwitchX?
A lot of video work runs into the same wall: the footage itself is fine, but the setting is wrong. The shot was filmed in a spare room that needs to look like a studio. The lighting doesn't match the rest of the campaign. Or the same take has to work across five markets with five different backdrops, and reshooting five versions isn't realistic.
SwitchX works out where the subject sits in every frame, lifts it out at the pixel level, places it onto the new background, and adjusts the lighting on the subject so it looks like it was actually filmed there. Hair, motion blur, soft edges, and shadows are preserved rather than rebuilt, which is what keeps the result from looking like a cutout pasted on top of a photo.
How SwitchX Works
Three parts of the model do most of the work, and they're worth understanding before you build around it.
Automatic Subject Detection
alpha_mode: auto
Most compositing setups need either a green screen or someone tracing a mask by hand. With alpha_mode set to auto, SwitchX looks at the footage and works out what the subject is, a person, a product, an animal, whatever's in frame, and generates the alpha matte itself, including the fine detail around hair and semi-transparent edges that's normally the hardest part to get right. Footage shot in an ordinary room under ordinary light works fine; there's nothing special to rig on set.
First-Frame Mask Propagation
Generating one accurate mask is one thing. Keeping it accurate across hundreds of frames as the subject moves, turns, or is briefly blocked by something passing through the shot is the part that normally eats up an editor's afternoon. SwitchX defines the subject mask on the first frame and then propagates it through the rest of the clip, tracking the subject frame to frame so the mask holds up through motion and partial occlusion without being redrawn by hand.
Relighting to Match the Reference
Swapping the background is the easy half. The harder half is that the subject was lit for the old scene, and against a new one it'll look pasted-in unless the lighting agrees too. SwitchX reads the lighting cues in the reference image, color temperature, direction, intensity, and adjusts how the subject is lit in the output so it sits in the new scene the way it would have if the camera had actually been rolling there.
Where SwitchX Fits
A few situations where this kind of compositing tends to come up.
Use cases
SwitchX is documented as being suited to background replacement, relighting scenes, and virtual production. It is also described as useful for targeted changes such as swapping an outfit or doing inpainting with masked element selection. Another documented use case is VFX work with external compositing software.
SwitchX API pricing
| Usage | Price | Unit |
|---|---|---|
| Video generation | $0.1 | per second |
| Additional | $0.13 | per generation |
Prices from the AI/ML API price list, checked on Nov 4, 2026.
SwitchX vs other video models: prices
AI/ML API rates for 5 models, per second.
| Model | Per second |
|---|---|
| $0.1 | |
| $0.1 | |
| $0.1 | |
| $0.1 | |
| $0.1 |
How to use the SwitchX API
View docsBuild with your agent
Give your agent the model details, code and documentation.
1Get your API key
Create API keyexport AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"2Make your first request
curl 'https://api.aimlapi.com/v2/video/generations' \
-H "Authorization: Bearer $AIMLAPI_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "beeble/switchx-video-to-video",
"video_url": "https://example.com/input.mp3"
}'import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['AIMLAPI_KEY']}",
"Content-Type": "application/json",
}
payload = {
"model": "beeble/switchx-video-to-video",
"video_url": "https://example.com/input.mp3"
}
response = requests.post("https://api.aimlapi.com/v2/video/generations", headers=headers, json=payload, timeout=120)
response.raise_for_status()
print(response.json())const response = await fetch("https://api.aimlapi.com/v2/video/generations", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "beeble/switchx-video-to-video",
"video_url": "https://example.com/input.mp3"
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());The request returns a generation id. Poll GET https://api.aimlapi.com/v2/video/generations?generation_id=<id> until the status is completed.
SwitchX FAQ
How much does SwitchX cost?
SwitchX costs $0.1 per second on AI/ML API, billed as you go with no subscription.
Who created SwitchX?
SwitchX was built by Beeble.
What is the SwitchX model ID?
Use beeble/switchx-video-to-video as the model parameter. Requests go to https://api.aimlapi.com/v2/video/generations with your AI/ML API key.