Veo3.1 First Last Frame to Video
集成
veo3.1/first-last-frame-to-video
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/veo3.1/first-last-frame-to-video?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
"end_image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}'
# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY"
const API = "https://api.doitong.com/v1";
const headers = {
"Authorization": "Bearer " + process.env.DOITONG_API_KEY,
"Content-Type": "application/json",
};
// Run the model; wait up to 20 s for the finished result in the same call
let res = await fetch(API + "/run/veo3.1/first-last-frame-to-video?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
"end_image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}),
});
let request = await res.json();
if (!res.ok) throw new Error(request.error.code + ": " + request.error.message);
// Not finished yet: long-poll until it is
while (request.status === "queued" || request.status === "running") {
res = await fetch(API + "/requests/" + request.id + "?wait=20", { headers });
request = await res.json();
}
if (request.status !== "succeeded") throw new Error(JSON.stringify(request.error));
console.log(request.outputs.map((o) => o.url), request.cost.credits + " API credits ($" + request.cost.usd + ")");
import os
import requests
API = "https://api.doitong.com/v1"
headers = {"Authorization": "Bearer " + os.environ["DOITONG_API_KEY"]}
payload = {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
"end_image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/veo3.1/first-last-frame-to-video", params={"wait": 20}, json=payload, headers=headers)
request = r.json()
if not r.ok:
raise RuntimeError(request["error"]["code"] + ": " + request["error"]["message"])
# Not finished yet: long-poll until it is
while request["status"] in ("queued", "running"):
request = requests.get(API + "/requests/" + request["id"], params={"wait": 20}, headers=headers).json()
if request["status"] != "succeeded":
raise RuntimeError(request["error"])
print([o["url"] for o in request["outputs"]], request["cost"]["credits"], "API credits", "$" + request["cost"]["usd"])
# 1. Connect once (Claude Code; Cursor, VS Code, Claude Desktop: https://doitong.com/zh/developers/docs/mcp)
claude mcp add --transport http doitong-models https://api.doitong.com/v1/mcp \
--header "Authorization: Bearer $DOITONG_API_KEY"
# 2. Your agent calls the "run" tool with:
{
"model_id": "veo3.1/first-last-frame-to-video",
"input": {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
"end_image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}
}
通过 Doitong API 调用 Veo3.1 First Last Frame to Video 模型(veo3.1/first-last-frame-to-video)。智能体文档:https://doitong.com/zh/developers/models/veo3.1/first-last-frame-to-video.md
POST https://api.doitong.com/v1/run/veo3.1/first-last-frame-to-video?wait=20
Authorization: Bearer $DOITONG_API_KEY
Content-Type: application/json
{
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
"end_image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}
如果响应状态为 "queued" 或 "running",请轮询 GET https://api.doitong.com/v1/requests/REQUEST_ID?wait=20,直到状态变为 "succeeded";文件位于 outputs[].url。使用相同请求体 POST https://api.doitong.com/v1/quote/veo3.1/first-last-frame-to-video,可在运行前返回确切价格。
此请求: $3.20 3,200 API 积分 在此页面运行
你的新 API 密钥。 它仅在此时显示,并且已填入下方的代码和 API 密钥字段中。请妥善保密:切勿将其放入在浏览器中运行的代码。
在 Doitong 上制作
Doitong 社区使用 Veo 3.1 制作的公开作品。一键复用提示词。
视频
Камера статична, но фокусное расстояние плавно меняется, создавая эффект головокружения. Толпа людей в расфокусе стремительно проходит мимо героев на переднем плане. Прохожие идут уткнувшись в телефоны, не замечая ничего вокруг, иногда грубо задевая героев плечами. Эмоциональный ритм: нарастающее...
视频
Камера статична, но фокусное расстояние плавно меняется, создавая эффект головокружения. Толпа людей в расфокусе стремительно проходит мимо героев на переднем плане. Прохожие идут уткнувшись в телефоны, не замечая ничего вокруг, иногда грубо задевая героев плечами. Эмоциональный ритм: нарастающее...
视频
Камера стремительно наезжает вперед, погружаясь во мрак туннеля вместе с поездом. Вокруг начинают мелькать странные неоновые искры, пространство искажается, а кирпичные стены сменяются пульсирующими световыми полосами. Персонажи инстинктивно прижимаются друг к другу, пытаясь укрыться от...
视频
Камера плавно движется вперед параллельно ходу поезда, создавая ощущение скорости и свободы. Ветер мягко развевает одежду одного персонажа и густую шерсть другого. Деревья на заднем плане быстро проносятся мимо, создавая динамичный фон, а золотые лучи солнца периодически вспыхивают сквозь ветви,...
视频
Камера делает резкий облет вокруг героев на 360 градусов, демонстрируя масштаб огромного современного мегаполиса, внезапно выросшего вокруг них. В воздухе проносятся светящиеся дроны, а внизу по эстакадам непрерывным потоком мчатся автомобили с яркими фарами. Персонажи медленно опускают руки,...
视频
люди спешат с телефонами. Камера кружит вокруг героев. Шок от контраста прошлого и будущего. Off-screen voiceover (all characters have their mouths closed, no one is speaking on screen): Voice: тёплый, ностальгический мужской голос средних лет с мягким темпом и лёгкой грустью. ...оказываются на...
视频
камера статична. гена играет на гармони своей. персонажи чуть улыбаются On-screen dialogue (characters speak with lip-sync): Гена: "мир поменялся. главное что мы остались добрые" No background music.
视频
Art style: Реалистичный кулинарный блог. Камера немного отдаляется, показывая ведущую по пояс. Она активно жестикулирует, призывая зрителей писать комментарии и подписываться. В конце она машет рукой или делает приветственный жест. Ее улыбка сияет, создавая позитивный финал. Свет из окна...
视频
Art style: Реалистичный кулинарный блог. Камера плавно перемещается от рук ведущей к противню. Ведущая совершает мягкие вращательные движения ладонями, формируя шарик теста. Видно, как мягкое тесто податливо меняет форму под ее пальцами. Затем она аккуратно кладет готовый шарик на пергамент рядом...
视频
Art style: Modern Webtoon Illustration. Нари сначала спокойно спит с закрытыми глазами. Затем резко распахивает глаза от осознания, что проспала. Быстрое, выразительное комедийное пробуждение. Голова неподвижна, камера статична. Плавный переход от первого кадра ко второму. Сохранить внешность...
视频
Art style: Реалистичный кулинарный блог. Камера направлена сверху под небольшим углом, создавая детальный крупный план миски. Ложка медленно опускает густой греческий йогурт на поверхность яиц, йогурт плавно соскальзывает и ложится плотной массой. Яичные желтки слегка подрагивают от движения...
Марк резко стартует с места, его кроссовки громко стучат по брусчатке, камера быстро движется за ним на уровне земли, создавая эффект скорости. На заднем плане размываются стены старого города. Пыль слегка поднимается из-под ног, передавая энергию и суету гиперактивного туриста. Off-screen...
Кинематографичная сцена в современном офисном коридоре. Огромная дверь с надписью «Фарм» резко открыта, изнутри виден пиксельный мир в стиле Minecraft: квадратные фермы, зелёные блоки, механизмы, лёгкое зелёное и тёплое свечение. Из двери выходит главный герой — толстый, неприятного вида, немного...
Кинематографичная сцена: главный герой открывает дверь и попадает в бесконечный тёмный мир серверов. Камера медленно движется вперёд, показывая бесконечные серверные стойки, мигающие лампы и холодный неоновый свет. Из темноты появляется глава разработки — абсурдно огромный качок с идеальной...
Главный герой открывает дверь и попадает в розовый сказочный HR-мир. Камера показывает пони, сердечки, блестящие облачка, розовый свет и всё вокруг как будто сделано из милоты. В центре появляется бимбо-глава HR — очень гламурная, в розовом, с идеальной внешностью и ярким макияжем. Она дружелюбно...
Главный герой открывает дверь и оказывается в гигантском мире Minecraft-like. Камера показывает бесконечные фермы, механизмы, падающие ресурсы, мобов, редстоун и автоматизацию. На переднем плане стоит глава отдела фарма — квадратный парень с мотыгой в руках. Он разворачивается к герою и жестом...
构建请求
控件根据模型架构生成。更改控件时,代码和价格会同步更新。
/run/veo3.1/first-last-frame-to-video?wait=20
报价 → $3.20
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/veo3.1/first-last-frame-to-video?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
"end_image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}'
# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY"
const API = "https://api.doitong.com/v1";
const headers = {
"Authorization": "Bearer " + process.env.DOITONG_API_KEY,
"Content-Type": "application/json",
};
// Run the model; wait up to 20 s for the finished result in the same call
let res = await fetch(API + "/run/veo3.1/first-last-frame-to-video?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
"end_image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}),
});
let request = await res.json();
if (!res.ok) throw new Error(request.error.code + ": " + request.error.message);
// Not finished yet: long-poll until it is
while (request.status === "queued" || request.status === "running") {
res = await fetch(API + "/requests/" + request.id + "?wait=20", { headers });
request = await res.json();
}
if (request.status !== "succeeded") throw new Error(JSON.stringify(request.error));
console.log(request.outputs.map((o) => o.url), request.cost.credits + " API credits ($" + request.cost.usd + ")");
import os
import requests
API = "https://api.doitong.com/v1"
headers = {"Authorization": "Bearer " + os.environ["DOITONG_API_KEY"]}
payload = {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
"end_image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/veo3.1/first-last-frame-to-video", params={"wait": 20}, json=payload, headers=headers)
request = r.json()
if not r.ok:
raise RuntimeError(request["error"]["code"] + ": " + request["error"]["message"])
# Not finished yet: long-poll until it is
while request["status"] in ("queued", "running"):
request = requests.get(API + "/requests/" + request["id"], params={"wait": 20}, headers=headers).json()
if request["status"] != "succeeded":
raise RuntimeError(request["error"])
print([o["url"] for o in request["outputs"]], request["cost"]["credits"], "API credits", "$" + request["cost"]["usd"])
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "run",
"arguments": {
"model_id": "veo3.1/first-last-frame-to-video",
"input": {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
"end_image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
},
"wait_seconds": 20
}
}
}
关于 Veo3.1 First Last Frame to Video
创建连接 `first_frame_url` 和 `last_frame_url` 的视频,由最多 20000 个字符的 `prompt` 引导。可选择 4s、6s 或 8s 时长,720p、1080p 或 4k 分辨率,以及 auto、16:9 或 9:16 宽高比。支持生成音频,并接受 `negative_prompt` 和 `seed`;这是标准的非快速版本。
参数
发送规范名称或原生名称之一,不要同时发送两者。 规范名称
prompt必填
aspect_ratio可选
duration可选
negative_prompt可选
resolution可选
generate_audio可选
seed可选
auto_fix可选
safety_tolerance可选
first_frame_url必填
image
last_frame_url必填
end_image
输出
{
"id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
"object": "request",
"model": "veo3.1/first-last-frame-to-video",
"status": "succeeded",
"created_at": "2026-10-20T12:00:00Z",
"started_at": "2026-10-20T12:00:02Z",
"completed_at": "2026-10-20T12:00:09Z",
"queue_position": null,
"cost": {
"credits": 3200,
"usd": "3.20",
"charged": 3200,
"refunded": 0
},
"input": {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"first_frame_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
"last_frame_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
},
"output": {
"video": {
"url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
"content_type": "video/mp4",
"file_name": "0-output.mp4",
"file_size": 1843200
}
},
"outputs": [
{
"type": "video",
"url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
"content_type": "video/mp4",
"file_size": 1843200,
"width": 1280,
"height": 720,
"duration": 5,
"stored": true
}
],
"error": null,
"metrics": {
"inference_seconds": 6.8
},
"urls": {
"self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
"cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
}
}
输出字段
- video
- object {url, content_type, file_name, file_size}模型生成的视频。
其他 Veo 3.1 变体
更多模型:图生视频
对于 AI 代理:此页面的 Markdown 版本位于 https://doitong.com/zh/developers/models/veo3.1/first-last-frame-to-video.md. 所有模型和指南: https://doitong.com/developers/llms.txt