auto-save 2026-05-14 07:23 (~4)
This commit is contained in:
@@ -57,11 +57,32 @@ export interface ImageRef {
|
||||
label?: string
|
||||
}
|
||||
|
||||
export interface ProductFusionRegion {
|
||||
x: number
|
||||
y: number
|
||||
w: number
|
||||
h: number
|
||||
}
|
||||
|
||||
export interface ProductFusionShot {
|
||||
id: string
|
||||
product_image?: ImageRef | null
|
||||
person_image?: ImageRef | null
|
||||
product_region?: ProductFusionRegion | null
|
||||
scene_image?: ImageRef | null
|
||||
action_text?: string
|
||||
duration?: number
|
||||
image_model?: "gpt-image-2"
|
||||
video_model?: "seedance"
|
||||
guide_image?: ImageRef | null
|
||||
}
|
||||
|
||||
export interface StoryboardScene {
|
||||
duration: number
|
||||
first_image?: ImageRef | null
|
||||
last_image?: ImageRef | null
|
||||
product_images?: ImageRef[]
|
||||
product_fusion_shots?: ProductFusionShot[]
|
||||
subject_image?: ImageRef | null
|
||||
scene_image?: ImageRef | null
|
||||
product_image?: ImageRef | null
|
||||
@@ -140,6 +161,22 @@ export async function copyProductLibraryAsset(jobId: string, productId: string):
|
||||
return res.json()
|
||||
}
|
||||
|
||||
export async function createProductFusionGuide(
|
||||
jobId: string,
|
||||
body: ProductFusionShot,
|
||||
): Promise<ImageRef> {
|
||||
const res = await fetch(`${API_BASE}/jobs/${jobId}/product-fusion/guide`, {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify(body),
|
||||
})
|
||||
if (!res.ok) {
|
||||
const txt = await res.text().catch(() => "")
|
||||
throw new Error(`createProductFusionGuide ${res.status} ${txt.slice(0, 300)}`)
|
||||
}
|
||||
return res.json()
|
||||
}
|
||||
|
||||
export interface KeyFrame {
|
||||
index: number
|
||||
timestamp: number
|
||||
|
||||
Reference in New Issue
Block a user