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": "把 @video_1 里的红色马克杯换成 @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": "把 @video_1 里的红色马克杯换成 @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: "把 @video_1 里的红色马克杯换成 @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 对象替换
Higgsfield Genjutsu 对象替换使用 1–10 张参考图局部替换 4–30 秒源 MP4 视频中的物体或商品,支持 480p / 720p / 1080p。
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": "把 @video_1 里的红色马克杯换成 @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": "把 @video_1 里的红色马克杯换成 @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: "把 @video_1 里的红色马克杯换成 @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"
}
}必须通过
video_urls 传入恰好 1 段公开 HTTPS MP4 源视频(4–30 秒),并通过 image_urls 传入 1–10 张替换物参考图。提示词可省略(上限 5000 字符),建议用 @video_1 与 @image_1 指明源视频与替换图。支持 480p、720p(默认)、1080p,成片时长与画幅跟随源视频。请求体
application/json
此页面对您有帮助吗?