cURL
curl https://api.apipod.ai/v1/videos/generations \
-H "Authorization: Bearer $APIPOD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "genjutsu-1.0-object-swap",
"video_urls": ["https://cdn.example.com/source-table.mp4"],
"image_urls": ["https://cdn.example.com/ceramic-cup.png"],
"prompt": "Replace the red mug in @video_1 with the ceramic cup from @image_1.",
"resolution": "720p"
}'import os import requests
response = requests.post(
"https://api.apipod.ai/v1/videos/generations",
headers={
"Authorization": f"Bearer {os.environ['APIPOD_API_KEY']}",
"Content-Type": "application/json",
},
json={
"model": "genjutsu-1.0-object-swap",
"video_urls": ["https://cdn.example.com/source-table.mp4"],
"image_urls": ["https://cdn.example.com/ceramic-cup.png"],
"prompt": "Replace the red mug in @video_1 with the ceramic cup from @image_1.",
"resolution": "720p",
},
timeout=60,
) response.raise_for_status() print(response.json())package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.apipod.ai/v1/videos/generations"
payload := strings.NewReader("{\n \"model\": \"genjutsu-1.0-object-swap\",\n \"video_urls\": [\n \"https://cdn.example.com/source-table.mp4\"\n ],\n \"image_urls\": [\n \"https://cdn.example.com/ceramic-cup.png\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}falseconst response = await fetch("https://api.apipod.ai/v1/videos/generations", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.APIPOD_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "genjutsu-1.0-object-swap",
video_urls: ["https://cdn.example.com/source-table.mp4"],
image_urls: ["https://cdn.example.com/ceramic-cup.png"],
prompt: "Replace the red mug in @video_1 with the ceramic cup from @image_1.",
resolution: "720p",
}),
});
if (!response.ok) {
throw new Error(`APIPod request failed: ${response.status} ${await response.text()}`);
}
console.log(await response.json());{
"code": 200,
"message": "success",
"data": {
"task_id": "vid_task_01JEXAMPLE"
}
}Genjutsu
Genjutsu Object Swap
Higgsfield Genjutsu Object Swap replaces a targeted object, product, or element inside a 4-30s source MP4 video using 1-10 reference images while keeping the rest of the shot intact.
POST
https://api.apipod.ai
/
v1
/
videos
/
generations
cURL
curl https://api.apipod.ai/v1/videos/generations \
-H "Authorization: Bearer $APIPOD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "genjutsu-1.0-object-swap",
"video_urls": ["https://cdn.example.com/source-table.mp4"],
"image_urls": ["https://cdn.example.com/ceramic-cup.png"],
"prompt": "Replace the red mug in @video_1 with the ceramic cup from @image_1.",
"resolution": "720p"
}'import os import requests
response = requests.post(
"https://api.apipod.ai/v1/videos/generations",
headers={
"Authorization": f"Bearer {os.environ['APIPOD_API_KEY']}",
"Content-Type": "application/json",
},
json={
"model": "genjutsu-1.0-object-swap",
"video_urls": ["https://cdn.example.com/source-table.mp4"],
"image_urls": ["https://cdn.example.com/ceramic-cup.png"],
"prompt": "Replace the red mug in @video_1 with the ceramic cup from @image_1.",
"resolution": "720p",
},
timeout=60,
) response.raise_for_status() print(response.json())package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.apipod.ai/v1/videos/generations"
payload := strings.NewReader("{\n \"model\": \"genjutsu-1.0-object-swap\",\n \"video_urls\": [\n \"https://cdn.example.com/source-table.mp4\"\n ],\n \"image_urls\": [\n \"https://cdn.example.com/ceramic-cup.png\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}falseconst response = await fetch("https://api.apipod.ai/v1/videos/generations", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.APIPOD_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "genjutsu-1.0-object-swap",
video_urls: ["https://cdn.example.com/source-table.mp4"],
image_urls: ["https://cdn.example.com/ceramic-cup.png"],
prompt: "Replace the red mug in @video_1 with the ceramic cup from @image_1.",
resolution: "720p",
}),
});
if (!response.ok) {
throw new Error(`APIPod request failed: ${response.status} ${await response.text()}`);
}
console.log(await response.json());{
"code": 200,
"message": "success",
"data": {
"task_id": "vid_task_01JEXAMPLE"
}
}Pass exactly 1 public HTTPS MP4 video in
video_urls (4–30s) and 1–10 public HTTPS replacement images in image_urls. Use @video_1 and @image_1 in the optional prompt (up to 5000 characters) to specify what to replace. Supports 480p, 720p (default), and 1080p; output duration and aspect ratio follow the source video.Authorizations
Body
application/json
Was this page helpful?