额度查询
查看 AI Studio 密钥状态、本地任务统计和上游余额接口返回。
余额 / 用量返回
Gemini 默认展示本地任务统计;第三方余额可配置 GEMINI_BALANCE_URL。
图生视频
上传图片,填写关键词,系统会自动生成视频提示词并提交任务。
提交结果
视频延长结果
进度查询
查询结果
状态接口默认只返回任务状态和可访问视频 URL,不再返回视频 base64;需要调试上游原始返回时可加 include_raw_response=1。
本地下载测试
任务完成后点击下载,Node 会按项目保存到 public/videos/google 或 public/videos/youtube,并返回可直接给 PHP 访问的本地 URL。
任务列表
| 任务 ID | 状态 | 请求关键词 | 更新时间 | 操作 |
|---|---|---|---|---|
| 暂无任务 | ||||
接口 API Key 配置
Google 项目和 YouTube 项目各自独立配置,PHP 调用时用 project 指定。
接口调用 Token
外部后端调用接口时使用。Token 放在请求 Header 里,不放在 Body。
接口文档
用于外部系统调用图生视频中转接口。
鉴权
Token 在“接口 API Key 配置”模块查看或生成。调用业务接口时放在 Header,不放在 Body。
Header: Authorization: Bearer 你的接口Token 不要放在 JSON Body 里。
项目配置
GET /api/settings/projects
GET /api/settings/environment?project=google
POST /api/settings/environment
{
"project": "youtube",
"provider": "aistudio",
"video_model": "veo-3.1-fast-generate-preview",
"duration_seconds": 8,
"resolution": "720p",
"generate_audio": false,
"aspect_width": 9,
"aspect_height": 16,
"video_extension_enabled": false,
"enterprise_project": "your-project-id",
"enterprise_location": "us-central1",
"enterprise_access_token": "ya29...",
"enterprise_service_account_json": "{\"type\":\"service_account\",...}"
}
Google 和 YouTube 是两套独立配置,PHP 调用时用 project=google 或 project=youtube 指定。YouTube 固定使用 image 首帧模式,不发送 referenceImages 或 lastFrame;旧 use_reference_image 字段仍可传入但会被忽略。
图生视频提交
POST /api/image-to-video
Content-Type: application/json
{
"project": "google",
"description": "咖啡广告、清晨厨房、慢镜头、温暖光线",
"style": "写实商业广告,电影感",
"aspect_width": 16,
"aspect_height": 9,
"image_base64": "图片base64",
"mime_type": "image/png"
}
提交成功代表任务已创建,不代表视频已经生成完成。状态接口默认不返回上游视频 base64。
YouTube 场景模板提交
POST /api/image-to-video
Content-Type: application/json
{
"project": "youtube",
"effect_id": 2,
"gender": 1,
"shot_id": 1,
"description": "",
"style": "",
"image_base64": "图片base64",
"mime_type": "image/jpeg"
}
effect_id 选择场景 Effect;gender=1 表示男,gender=2 表示女;shot_id 选择镜头编号。默认生成术语按“场景 / 男女 / 镜头”分层管理。当前场景只有镜头1时,即使 PHP 传 shot_id=2,Node 也会自动回退使用镜头1。Node 只会把命中的单段提示词提交给上游,不会把整段模板库交给模型判断。Node 不做本地提交队列;多个 POST 请求会独立异步提交上游。
模板选择参数:
effect_id: 可选,效果编号,如 2 / 3 / 4;兼容 filter_id / effect / filter / template_id
gender: 可选,1=男,2=女;也支持 男 / 女 / male / female
shot_id: 可选,镜头编号,如 1 / 2;兼容 camera_id / shot / camera / lens
variant_id: 兼容旧参数,等同 shot_id
固定 Effect2 女 镜头1 示例:
{
"project": "youtube",
"effect_id": 2,
"gender": 2,
"shot_id": 1,
"image_base64": "图片base64",
"mime_type": "image/jpeg"
}
YouTube 默认生成术语模板
下面内容来自仓库 YOUTUBE_PROMPTS.md,可直接复制到 YouTube 项目配置的“默认生成术语”。标题行 Effect、女/男、镜头1/镜头2 必须单独一行。不要为了补结构重复镜头;只有镜头1就只写镜头1。
Effect2 打光 女 镜头1 镜头先全黑,如图的主体人物面部不变,亚洲女生,胖瘦不变,脸部特征与原图一致,与原图一样的脸部和五官,身材不变,发型不变,穿着黑色高定礼裙,双臂配戴了黑色丝绒长款歌剧手套,胸前部分采用抹胸(Strapless)设计,裙身一些部分选用带有高级微光感、质地硬挺的红丝缎(Taffeta/Duchess Satin)面料。腰部向下延伸出立体抓褶与层叠裙幔,在正面形成一个弧形结构,露出了内层的纯黑修身衬裙。,正镜头自然站立红毯场景中(场景背景中间部分为略微虚化的红色帘子,并且背景较为空旷,背景舞台上和地面上有一些白色和少量浅红色色的灯光装置)一束光打在人物身上,人物正对镜头往镜头前走几步停下,随后人物看着镜头自然微笑,同时舞台上方和下方都有浓烈的华丽的正红色和白色灯光轮流在舞台上发散并且左右照射。高帧率感,电影般的大气,场景不变,画面中不要出现其余人,只有主体人物一个人,人物嘴巴一直闭着。人物面部保持与原图高度统一,不要美化,不要化妆,与原图相似度高,五官比例一致。 【人物身份,最高优先级】人物必须是参考图中的同一位真人,并且始终可以立即辨认。严格保持脸型、五官比例、眼睛形状和间距、鼻形、嘴唇、下颌、发际线、肤色、自然皮肤纹理、年龄和发型。禁止替换成相似人物、统一模板脸、网红脸或时尚模特脸;禁止磨皮、美化、浓妆或改变脸部结构。不同输入图片必须生成各自对应的人物。 [Character & Identity] One adult Asian woman, the exact same person as in the reference image. Preserve her body shape, facial identity, facial features, hairstyle, and age appearance. [Costume] She wears a black haute-couture gown with black velvet long opera gloves. The gown has a strapless neckline. Parts of the skirt use stiff, subtly lustrous red taffeta / Duchess satin. From the waist, sculptural pleats and layered drapes form an arc at the front, revealing a fitted pure-black inner skirt. [Scene] A red-carpet setting. The center background is a slightly blurred red curtain, with a spacious stage area. White and a small amount of pale-red lighting fixtures are on the stage and floor. Only the main woman appears in the frame. [Lighting] A spotlight illuminates her. Rich, luxurious crimson-red and white lights above and below the stage alternately spread across the stage and sweep from side to side. [Camera & Action] The video begins in complete black. Cut to a front-facing shot: she stands naturally, walks a few steps toward the camera, stops, looks directly at the camera, and gives a natural, subtle closed-mouth smile. High-frame-rate feel, cinematic and grand atmosphere. Keep the scene unchanged. [Identity Lock — highest priority] Use the reference image as the single source of identity. The generated woman must remain immediately recognizable as the same real person in every frame: preserve the exact facial geometry, face shape, forehead, hairline, eyebrow shape and spacing, eye shape and spacing, nose bridge and tip, lip shape, jawline, chin, ears, skin tone, skin texture, and natural age appearance. Preserve her exact hairstyle and body proportions. Do not replace her face, generate a lookalike, change ethnicity, change age, alter facial proportions, morph the face during camera movement, apply beautification, retouch skin, add makeup, or create a generic fashion-model face. Keep facial identity stable while she walks, stops, smiles, and while lighting changes. 男 镜头1 如图的人物五官不变,亚洲男生,胖瘦不变,穿着黑色高级定制西装,脸部特征与原图一致,身材不变,发型不变,与原图一样的脸部和五官,内搭选择了一款酒红色的纯色翻领衬衫,并配以黑色的窄版领带,正对镜头自然站立红毯场景中(场景背景中间部分为略微虚化的红色帘子,并且背景较为空旷,背景舞台上和地面上有一些白色和少量浅红色色的灯光装置)随后一束光打在人物所站的地上,人物正对镜头并且人物往镜头前走几步停下,随后人物看着镜头自然微笑,同时舞台上方和下方都有浓烈的华丽的浅红色和白色灯光轮流在舞台上发散并且左右移动照射。高帧率感,电影般的大气,场景不变,画面中不要出现其余人,只有主体人物一个人,人物嘴巴一直闭着。人物面部保持与原图高度统一,不要美化,不要化妆,与原图相似度高,五官比例一致。 【人物身份,最高优先级】人物必须是参考图中的同一位真人,并且始终可以立即辨认。严格保持脸型、五官比例、眼睛形状和间距、鼻形、嘴唇、下颌、发际线、肤色、自然皮肤纹理、年龄和发型。禁止替换成相似人物、统一模板脸、网红脸或时尚模特脸;禁止磨皮、美化、浓妆或改变脸部结构。不同输入图片必须生成各自对应的人物。 [Character & Identity] One adult Asian man, the exact same person as in the reference image. Preserve his body shape, facial identity, facial features, hairstyle, and age appearance. [Costume] He wears a black bespoke suit, a solid burgundy collared shirt, and a narrow black tie. [Scene] A red-carpet setting. The center background is a slightly blurred red curtain, with a spacious stage area. White and a small amount of pale-red lighting fixtures are on the stage and floor. Only the main man appears in the frame. [Lighting] A spotlight falls onto the ground where he stands. Rich, luxurious pale-red and white lights above and below the stage alternately spread across the stage and sweep from side to side. [Camera & Action] Front-facing shot. He stands naturally, walks a few steps toward the camera, stops, looks directly at the camera, and gives a natural, subtle closed-mouth smile. High-frame-rate feel, cinematic and grand atmosphere. Keep the scene unchanged. [Identity Lock — highest priority] Use the reference image as the single source of identity. The generated man must remain immediately recognizable as the same real person in every frame: preserve the exact facial geometry, face shape, forehead, hairline, eyebrow shape and spacing, eye shape and spacing, nose bridge and tip, lip shape, jawline, chin, ears, skin tone, skin texture, and natural age appearance. Preserve his exact hairstyle and body proportions. Do not replace his face, generate a lookalike, change ethnicity, change age, alter facial proportions, morph the face during camera movement, apply beautification, retouch skin, add makeup, or create a generic fashion-model face. Keep facial identity stable while he walks, stops, smiles, and while lighting changes. Effect3 烟花 女 镜头1 全景,如图的人物为亚洲女生,胖瘦不变,脸部特征与原图一致,与原图一样的脸部和五官,身材不变,发型不变,穿着黑色搭配深勃艮第红的高级定制抹胸重礼服,裙身主体从抹胸到裙摆的中心纵向区域,采用了极其吸光的高级天鹅绒(Velvet)面料。质感丰厚、细腻,呈现出如深夜般深邃的雾面哑光效果。两侧裙幔:腰部两侧向后延伸的宏大外摆,则拼接了带有柔和水光感、垂坠挺括的重磅真丝缎面(Satin/Silk)面料。缎面的流光溢彩与天鹅绒的内敛吸光形成绝妙的质感对比。剪裁与骨架设计:采用优雅利落的一字抹胸(Strapless)剪裁,完美的贴合身形,勾勒出极简的古典上半身线条。在高腰线的两侧、即缎面外摆的衔接处,精细地镶嵌了两道由细密碎钻或珍珠组成的白色亮片弧形滚边。这两道珠光装饰不仅打破了深红色的沉闷,更在视觉上进一步收窄腰线,强调了巴洛克式的宫廷沙漏廓形,,面对镜头自然站立红毯场景中,正对画面自然站立着,背景为较为空旷城市夜景,不要出现文字,地上有一些氛围感灯光装置,人物站在地上的红毯上,不要出现文字。人物面部与原图保持高度一致,画面中没有其余人,随后人物自然往镜头前自然慢速行走,同时背景远处开始有一些浅金色和浅粉色的烟花正被发射到夜空中绽放,随后人物停下站着,自然看着镜头做单手叉腰动作,随后镜头朝人物脸部推进然后推远,快变慢的运镜速度。人物保持看着镜头,随后镜头缓慢推远至全景。场景保持不变,人物全程不要说话,不要笑。 【人物身份,最高优先级】人物必须是参考图中的同一位真人,并且始终可以立即辨认。严格保持脸型、五官比例、眼睛形状和间距、鼻形、嘴唇、下颌、发际线、肤色、自然皮肤纹理、年龄和发型。禁止替换成相似人物、统一模板脸、网红脸或时尚模特脸;禁止磨皮、美化、浓妆或改变脸部结构。不同输入图片必须生成各自对应的人物。 [Character & Identity] One adult Asian woman, the exact same person as in the reference image. Preserve her body shape, facial identity, facial features, hairstyle, and age appearance. [Costume] She wears a black and deep-burgundy haute-couture strapless gown. The central vertical area from the bodice to the skirt is deep matte velvet with a rich, dense texture. The grand side drapes extending from the waist use heavy satin / silk with a soft watery sheen and structured drape. At the high-waist junction, two white curved trims made of fine crystals or pearls narrow the waist and emphasize a baroque courtly hourglass silhouette. [Scene] Full-body wide shot. She stands naturally on a red carpet in a spacious city night scene with a small amount of architecture. Atmospheric lighting fixtures are on the ground. No text appears anywhere. Only the main woman appears. [Lighting & Fireworks] Soft atmospheric ground lighting. In the distance, pale-gold and pale-pink fireworks are launched into the night sky and bloom. [Camera & Action] She slowly walks naturally toward the camera, stops, looks at the camera, and poses with one hand on her waist. The camera pushes toward her face, then pulls back; the movement begins faster and gradually slows. The camera then slowly pulls back to a wide shot. Keep the scene unchanged. She does not speak and does not smile. [Identity Lock — highest priority] Use the reference image as the single source of identity. The generated woman must remain immediately recognizable as the same real person in every frame: preserve the exact facial geometry, face shape, forehead, hairline, eyebrow shape and spacing, eye shape and spacing, nose bridge and tip, lip shape, jawline, chin, ears, skin tone, skin texture, and natural age appearance. Preserve her exact hairstyle and body proportions. Do not replace her face, generate a lookalike, change ethnicity, change age, alter facial proportions, morph the face during camera push-in or pull-back, apply beautification, retouch skin, add makeup, or create a generic fashion-model face. Keep facial identity stable under night lighting, fireworks, and all camera movements. 男 镜头1 全景,如图的人物为亚洲男生,胖瘦不变,脸部特征与原图一致,与原图一样的脸部和五官,身材不变,发型不变,穿着黑色高级定制西装,内搭选择了一款酒红色的纯色翻领衬衫,并配以黑色的窄版领带,面对镜头自然站立红毯场景中正对画面自然站立着,背景为较为空旷的夜景,有一点点建筑,不要出现文字,地上有一些氛围感灯光装置,人物站在地上的红毯上,不要出现文字。人物面部与原图保持高度一致,画面中没有其余人,随后人物自然往镜头前自然慢速行走,同时背景远处开始有一些浅金色和浅粉色的烟花正被发射到夜空中绽放,随后人物停下自然站着,自然看着镜头做侧身站立姿势,随后镜头朝人物脸部推进2秒然后慢速推远,快变慢的运镜速度。人物保持看着镜头,随后镜头缓慢推远至全景。场景保持不变,人物全程不要说话,不要笑。 【人物身份,最高优先级】人物必须是参考图中的同一位真人,并且始终可以立即辨认。严格保持脸型、五官比例、眼睛形状和间距、鼻形、嘴唇、下颌、发际线、肤色、自然皮肤纹理、年龄和发型。禁止替换成相似人物、统一模板脸、网红脸或时尚模特脸;禁止磨皮、美化、浓妆或改变脸部结构。不同输入图片必须生成各自对应的人物。 [Character & Identity] One adult Asian man, the exact same person as in the reference image. Preserve his body shape, facial identity, facial features, hairstyle, and age appearance. [Costume] He wears a black bespoke suit, a solid burgundy collared shirt, and a narrow black tie. [Scene] Full-body wide shot. He stands naturally on a red carpet in a spacious night scene with a small amount of architecture. Atmospheric lighting fixtures are on the ground. No text appears anywhere. Only the main man appears. [Lighting & Fireworks] Soft atmospheric ground lighting. In the distance, pale-gold and pale-pink fireworks are launched into the night sky and bloom. [Camera & Action] He slowly walks naturally toward the camera, stops, looks at the camera, and adopts a natural side-standing pose. The camera pushes toward his face for two seconds, then slowly pulls back; the movement begins faster and gradually slows. The camera then slowly pulls back to a wide shot. Keep the scene unchanged. He does not speak and does not smile. [Identity Lock — highest priority] Use the reference image as the single source of identity. The generated man must remain immediately recognizable as the same real person in every frame: preserve the exact facial geometry, face shape, forehead, hairline, eyebrow shape and spacing, eye shape and spacing, nose bridge and tip, lip shape, jawline, chin, ears, skin tone, skin texture, and natural age appearance. Preserve his exact hairstyle and body proportions. Do not replace his face, generate a lookalike, change ethnicity, change age, alter facial proportions, morph the face during camera push-in or pull-back, apply beautification, retouch skin, add makeup, or create a generic fashion-model face. Keep facial identity stable under night lighting, fireworks, and all camera movements. Effect4 icon 女 镜头1 全景,如图的主体人物面部不变,亚洲女生,胖瘦不变,脸部特征与原图一致,与原图一样的脸部和五官,身材不变,发型不变,穿着黑色高定礼裙,双臂配戴了黑色丝绒长款歌剧手套,胸前部分采用抹胸(Strapless)设计,裙身一些部分选用带有高级微光感、质地硬挺的红丝缎(Taffeta/Duchess Satin)面料。腰部向下延伸出立体抓褶与层叠裙幔,在正面形成一个弧形结构,露出了内层的纯黑修身衬裙。,面对镜头自然站立红毯场景中(场景背景中间部分为略微虚化的红色帘子,并且背景较为空旷,背景舞台上和地面上有一些白色和少量浅红色色的灯光装置),人物正对镜头缓慢走来,镜头同时慢慢推进到人物的正前方,随后画面上方有一束浅浅的暖光打在人物身上,人物停下随后微微侧身做双手抱臂动作直到结束,同时画面中弹出几个不同的红色亚克力质感的高透明趣味icon(游戏手柄,音符,爱心,星星,笑脸,点赞等,这几个icon边缘为圆角设计,材质清透并且都从人物身后弹到画面中人物的身边附近,趣味感)并且最后漂浮在人身附近的空中,这些icon都是透明红色亚克力材质,同时人物朝镜头微笑,随后镜头缓慢推远。场景保持不变,画面中只有主体人物一个人,人物保持不说话。 【人物身份,最高优先级】人物必须是参考图中的同一位真人,并且始终可以立即辨认。严格保持脸型、五官比例、眼睛形状和间距、鼻形、嘴唇、下颌、发际线、肤色、自然皮肤纹理、年龄和发型。禁止替换成相似人物、统一模板脸、网红脸或时尚模特脸;禁止磨皮、美化、浓妆或改变脸部结构。不同输入图片必须生成各自对应的人物。 [Character & Identity] One adult Asian woman, the exact same person as in the reference image. Preserve her body shape, facial identity, facial features, hairstyle, and age appearance. [Costume] She wears a black haute-couture gown with black velvet long opera gloves. The gown has a strapless neckline. Parts of the skirt use stiff, subtly lustrous red taffeta / Duchess satin. From the waist, sculptural pleats and layered drapes form an arc at the front, revealing a fitted pure-black inner skirt. [Scene] Full-body wide shot in a red-carpet setting. The center background is a slightly blurred red curtain, with a spacious stage area. White and a small amount of pale-red lighting fixtures are on the stage and floor. Only the main woman appears. [Icons & Lighting] A soft warm light from above falls on her. Several playful, highly transparent red acrylic icons — a game controller, music note, heart, star, smiley face, and thumbs-up — pop from behind her into the space near her, then float in the air around her. Every icon has rounded edges, clear translucent red acrylic material, and a playful feeling. [Camera & Action] She slowly walks toward the camera as the camera slowly pushes in from directly in front. She stops, turns slightly sideways, folds both arms, and holds the pose until the end. She smiles at the camera. Then the camera slowly pulls back. Keep the scene unchanged. She does not speak. [Identity Lock — highest priority] Use the reference image as the single source of identity. The generated woman must remain immediately recognizable as the same real person in every frame: preserve the exact facial geometry, face shape, forehead, hairline, eyebrow shape and spacing, eye shape and spacing, nose bridge and tip, lip shape, jawline, chin, ears, skin tone, skin texture, and natural age appearance. Preserve her exact hairstyle and body proportions. Do not replace her face, generate a lookalike, change ethnicity, change age, alter facial proportions, morph the face during camera movement, apply beautification, retouch skin, add makeup, or create a generic fashion-model face. Keep facial identity stable while she walks, changes pose, smiles, and is surrounded by icons. 男 镜头1 全景,镜头对着人物,人物五官不变,亚洲男生,胖瘦不变,身材不变,发型不变,脸部特征与原图一致,与原图一样的脸部和五官,穿着一套高级定制轻薄全黑色燕尾服礼服搭配酒红色领带,主题面料为缎面和真丝素缎,缎面自带细碎流光,面料丝滑通透,轻奢感,胸口有搭配白金胸针,领带搭配金属领带夹,人物保持站立在红毯场景中(场景背景中间部分为略微虚化的红色帘子,并且背景较为空旷,但舞台上方有一些氛围灯光装置),镜头从人物正前方缓慢推进,同时人物朝镜头走来,随后画面上方有一束浅浅的暖光打在人物身上,人物停下随后微微侧身做双手抱臂动作直到结束,同时画面中弹出几个不同的红色亚克力质感的高透明趣味icon(游戏手柄,音符,爱心,星星,笑脸,点赞等,这几个icon边缘为圆角设计,材质清透并且都从人物身后弹到画面中人物的身边附近,趣味感)并且最后漂浮在人身附近的空中,这些icon都是透明红色亚克力材质,同时人物朝镜头微笑,随后镜头缓慢推远。场景保持不变,画面中只有主体人物一个人,人物保持不说话。 【人物身份,最高优先级】人物必须是参考图中的同一位真人,并且始终可以立即辨认。严格保持脸型、五官比例、眼睛形状和间距、鼻形、嘴唇、下颌、发际线、肤色、自然皮肤纹理、年龄和发型。禁止替换成相似人物、统一模板脸、网红脸或时尚模特脸;禁止磨皮、美化、浓妆或改变脸部结构。不同输入图片必须生成各自对应的人物。 [Character & Identity] One adult Asian man, the exact same person as in the reference image. Preserve his body shape, facial identity, facial features, hairstyle, and age appearance. [Costume] He wears a lightweight bespoke all-black tailcoat formal suit with a burgundy tie. The main materials are satin and silk satin with subtle sparkling highlights, smooth and lustrous texture, and a light-luxury feel. He wears a platinum brooch on the chest and a metal tie clip. [Scene] Full-body wide shot in a red-carpet setting. The center background is a slightly blurred red curtain, with a spacious stage area and atmospheric lighting fixtures above. Only the main man appears. [Icons & Lighting] A soft warm light from above falls on him. Several playful, highly transparent red acrylic icons — a game controller, music note, heart, star, smiley face, and thumbs-up — pop from behind him into the space near him, then float in the air around him. Every icon has rounded edges, clear translucent red acrylic material, and a playful feeling. [Camera & Action] The camera slowly pushes in from directly in front as he walks toward it. He stops, turns slightly sideways, folds both arms, and holds the pose until the end. He smiles at the camera. Then the camera slowly pulls back. Keep the scene unchanged. He does not speak. [Identity Lock — highest priority] Use the reference image as the single source of identity. The generated man must remain immediately recognizable as the same real person in every frame: preserve the exact facial geometry, face shape, forehead, hairline, eyebrow shape and spacing, eye shape and spacing, nose bridge and tip, lip shape, jawline, chin, ears, skin tone, skin texture, and natural age appearance. Preserve his exact hairstyle and body proportions. Do not replace his face, generate a lookalike, change ethnicity, change age, alter facial proportions, morph the face during camera movement, apply beautification, retouch skin, add makeup, or create a generic fashion-model face. Keep facial identity stable while he walks, changes pose, smiles, and is surrounded by icons.
进度查询
GET /api/image-to-video/status?task_id=任务ID
任务状态:running 表示生成中;done 表示完成并返回可访问视频 URL;failed 表示生成失败并返回 error。需要调试 raw_response 时加 include_raw_response=1。
下载到本地 public
POST /api/video/download
Content-Type: application/json
{
"task_id": "任务ID",
"postprocess": true
}
任务完成后调用。Node 会按任务所属 project 自动判断目录:Google 保存到 public/videos/google,YouTube 保存到 public/videos/youtube。
下载参数说明: task_id: 必填,任务 ID postprocess: 可选,仅 YouTube 有效 true = 下载 AI 原视频后,再按后台 YouTube 后期配置生成处理后视频 false = 只下载 AI 原视频,不做相框/贴纸/片尾处理 兼容参数: youtube_postprocess: 等同 postprocess allow_postprocess: 等同 postprocess Google 项目会忽略 postprocess / youtube_postprocess / allow_postprocess,只允许直接下载原始视频。
下载返回重点字段: public_video_full_url: 本次请求主视频 URL,PHP 可直接访问 processed_video_full_url: YouTube 处理后视频 URL;postprocess=true 且处理成功时有值 original_video_full_url: AI 原始视频本地 URL raw_public_video_full_url: 兼容旧字段,等同 original_video_full_url postprocess_requested: 本次是否请求 YouTube 后期处理 postprocess_applied: 当前任务是否已经生成过 YouTube 后期处理视频 cached: 是否复用已经下载过的本地文件
视频延长提交
POST /api/image-to-video
Content-Type: application/json
{
"project": "google",
"source_video": "https://generativelanguage.googleapis.com/v1beta/files/xxx:download?alt=media",
"description": "延续上一段视频,镜头继续向前推进",
"style": "保持原视频风格,电影感"
}
需要先在对应项目配置中开启“视频延长”。延长任务不传图片,使用 Google 原始视频 uri。
返回字段说明
ok: 请求是否成功 task_id: 本系统任务 ID,用于查询进度 status: running / done / failed done: 上游任务是否结束 keywords: 提交时填写的关键词 prompt_variant: 模板命中信息,包含 effect_id / gender / shot_id / variant / requested_variant / variant_fallback / label operation_name: Gemini 上游任务名 raw_response: 默认不返回;加 include_raw_response=1 时返回,且会过滤视频 base64 public_video_full_url: 下载接口返回的本地主视频地址 processed_video_full_url: YouTube 后期处理后的视频地址 original_video_full_url: AI 原始视频本地地址 raw_public_video_full_url: 兼容旧字段,等同 original_video_full_url postprocess_requested: 本次是否请求 YouTube 后期处理 postprocess_applied: 当前任务是否已生成 YouTube 后期处理视频 error: 失败原因
任务列表 / 额度查询 / 密钥配置
GET /api/tasks GET /api/balance GET /api/settings/aistudio-key POST /api/settings/aistudio-key