cURL
curl https://api.apipod.ai/v1/videos/generations \
-H "Authorization: Bearer $APIPOD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "genjutsu-light-1.0-object-swap",
"video_urls": ["https://cdn.example.com/source-walk.mp4"],
"image_urls": ["https://cdn.example.com/sneaker-ref.png"],
"prompt": "把 @video_1 中的运动鞋替换为 @image_1 中的新品。",
"resolution": "1080p"
}'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-light-1.0-object-swap",
"video_urls": ["https://cdn.example.com/source-walk.mp4"],
"image_urls": ["https://cdn.example.com/sneaker-ref.png"],
"prompt": "把 @video_1 中的运动鞋替换为 @image_1 中的新品。",
"resolution": "1080p",
},
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-light-1.0-object-swap\",\n \"video_urls\": [\n \"https://cdn.example.com/source-walk.mp4\"\n ],\n \"image_urls\": [\n \"https://cdn.example.com/sneaker-ref.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-light-1.0-object-swap",
video_urls: ["https://cdn.example.com/source-walk.mp4"],
image_urls: ["https://cdn.example.com/sneaker-ref.png"],
prompt: "把 @video_1 中的运动鞋替换为 @image_1 中的新品。",
resolution: "1080p",
}),
});
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 Light 对象替换
Higgsfield Genjutsu Light 对象替换是更快速、高性价比的对象替换档位,支持 4–30 秒源 MP4 与 1–10 张参考图,输出 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-light-1.0-object-swap",
"video_urls": ["https://cdn.example.com/source-walk.mp4"],
"image_urls": ["https://cdn.example.com/sneaker-ref.png"],
"prompt": "把 @video_1 中的运动鞋替换为 @image_1 中的新品。",
"resolution": "1080p"
}'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-light-1.0-object-swap",
"video_urls": ["https://cdn.example.com/source-walk.mp4"],
"image_urls": ["https://cdn.example.com/sneaker-ref.png"],
"prompt": "把 @video_1 中的运动鞋替换为 @image_1 中的新品。",
"resolution": "1080p",
},
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-light-1.0-object-swap\",\n \"video_urls\": [\n \"https://cdn.example.com/source-walk.mp4\"\n ],\n \"image_urls\": [\n \"https://cdn.example.com/sneaker-ref.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-light-1.0-object-swap",
video_urls: ["https://cdn.example.com/source-walk.mp4"],
image_urls: ["https://cdn.example.com/sneaker-ref.png"],
prompt: "把 @video_1 中的运动鞋替换为 @image_1 中的新品。",
resolution: "1080p",
}),
});
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 张替换物参考图。仅支持 720p(默认)与 1080p(如需 480p 请改用 genjutsu-1.0-object-swap)。提示词可省略,可用 @video_1 与 @image_1 指明替换对象;成片时长与画幅跟随源视频。请求体
application/json
此页面对您有帮助吗?