veo-3.1-fast
veo-3.1-fast
วีดีโอGoogleVeo 3.1veo-3.1-fast
Veo 3.1 是一种用于生成 8 秒视频(720p、1080p 或 4k)的模型,可原生生成音频。
การยืนยันตัวตน
- Base URL
https://api.dreamtoai.com- Authorization
Authorization: Bearer YOUR_API_KEY- Content-Type
application/json- ชื่อโมเดล (model)
veo-3.1-fast
โปรโตคอลการเชื่อมต่อ
ทำไมต้องเลือกโปรโตคอลนี้
适合需要提交任务并轮询状态的图像、视频、音频生成工作流。
URL เอนด์พอยต์
POST/v1/jobs
Authorization: Bearer YOUR_API_KEYContent-Type: application/jsonJSON คำขอและการตอบกลับ
คำขอ
{
"model": "veo-3.1-fast",
"input": {
"prompt": "一段自然纪录片风格的雪山航拍镜头",
"image": "https://example.com/image.png",
"lastframe": [
"https://example.com/ref.png"
],
"referenceImages": [
"https://example.com/ref.png"
],
"video": [
"https://example.com/ref.mp4"
],
"aspectratio": "16:9,9:16",
"resolution": "720p,1080p,4k",
"generate_audio": false,
"negative_prompt": "低清晰度、闪烁、变形",
"durationseconds": "4,6,8"
}
}การตอบกลับ
{
"id": "job_example",
"object": "job",
"status": "processing",
"model": "veo-3.1-fast",
"created": 1710000000,
"request_id": "req_example"
}ฟิลด์คำขอและการตอบกลับ
ฟิลด์คำขอ
| ฟิลด์ | ประเภท | จำเป็น |
|---|---|---|
| prompt | string | Y |
| image | image | N |
| lastframe | image | N |
| referenceImages | string | N |
| video | video | N |
| aspectratio | string | Y |
| resolution | string | Y |
| generate_audio | boolean | N |
| negative_prompt | string | N |
| durationseconds | string | Y |
ฟิลด์การตอบกลับ
| ฟิลด์ | ประเภท | จำเป็น |
|---|---|---|
| task_id | string | N |
| status | enum | N |
ตัวอย่างโค้ด
cURLrequest.sh
curl -X POST "https://api.dreamtoai.com/v1/jobs" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "veo-3.1-fast",
"input": {
"prompt": "一段自然纪录片风格的雪山航拍镜头",
"image": "https://example.com/image.png",
"lastframe": [
"https://example.com/ref.png"
],
"referenceImages": [
"https://example.com/ref.png"
],
"video": [
"https://example.com/ref.mp4"
],
"aspectratio": "16:9,9:16",
"resolution": "720p,1080p,4k",
"generate_audio": false,
"negative_prompt": "低清晰度、闪烁、变形",
"durationseconds": "4,6,8"
}
}'
# cURL สำหรับตรวจสอบสถานะ
# แทนที่ job_example ด้วย task_id ที่ได้จากการตอบกลับเมื่อส่งงาน
curl -X GET "https://api.dreamtoai.com/v1/jobs/job_example" \
-H "Authorization: Bearer YOUR_API_KEY"