POST
/api/projects
创建项目
在生成帧之前创建项目记录,返回可跨接口使用的 projectId。
{
"title": "Product teaser",
"textPrompt": "Hero stands on cliff at dawn",
"description": "Keep outfit consistent with uploaded still"
}API 文档
使用 Supabase 会话令牌进行身份验证。所有响应都采用 { success: boolean, data, error } 结构,便于界面保持一致。
/api/projects
在生成帧之前创建项目记录,返回可跨接口使用的 projectId。
{
"title": "Product teaser",
"textPrompt": "Hero stands on cliff at dawn",
"description": "Keep outfit consistent with uploaded still"
}/api/projects/generate/first-frame
启动 AI 生成,需要 projectId,可选参考图路径。
{
"projectId": "<projectId>",
"referenceImagePath": "projects/ref.png"
}/api/projects/generate/:step?predictionId=<id>&projectId=<id>
轮询预测结果。步骤:first-frame、last-frame、video。
在仪表板中配置 Webhook URL。事件使用可轮换的 HMAC 密钥签名。
generation.succeeded
帧或视频处理完成。
generation.failed
Replicate 或内部队列出错,请检查 payload.error 后重试。
project.created
确认元数据已写入 Supabase,可用于 CRM 同步。