gemini-omni-1.1-flash-as
gemini-omni-1.1-flash-as
VideoGooglegemini-omni-videogemini-omni-1.1-flash-as
gemini-omni-video
Xác thực
- Base URL
https://api.dreamtoai.com- Authorization
Authorization: Bearer YOUR_API_KEY- Content-Type
application/json- Tên mô hình (model)
gemini-omni-1.1-flash-as
Giao thức tích hợp
Vì sao chọn giao thức này
适合使用 Google Interactions 原生接口提交多模态视频任务并轮询状态的用户。
URL endpoint
POST/v1beta/interactions
Authorization: Bearer YOUR_API_KEYContent-Type: application/jsonJSON yêu cầu / phản hồi
Yêu cầu
{
"model": "gemini-omni-1.1-flash-as",
"background": true,
"input": [
{
"type": "image",
"data": "BASE64_IMAGE_DATA",
"mime_type": "image/jpeg"
},
{
"type": "text",
"text": "让参考图中的主体自然运动,保持外观一致,使用单一连续镜头。"
}
],
"generation_config": {
"video_config": {
"task": "image_to_video"
}
},
"response_format": {
"type": "video",
"aspect_ratio": "16:9",
"delivery": "uri"
}
}Phản hồi
{
"id": "interaction_example",
"object": "interaction",
"status": "completed",
"model": "gemini-omni-1.1-flash-as",
"steps": [
{
"type": "model_output",
"content": [
{
"type": "video",
"mime_type": "video/mp4",
"uri": "https://api.dreamtoai.com/v1beta/files/file_example:download"
}
]
}
],
"usage": {
"total_input_tokens": 22,
"total_output_tokens": 58805,
"total_tokens": 59183
}
}Trường yêu cầu / phản hồi
Trường yêu cầu
| Trường | Kiểu | Bắt buộc |
|---|---|---|
| model | string | Y |
| background | boolean | Y |
| input | array | Y |
| input[] | object | Y |
| input[].type | string | Y |
| input[].data | string | Y |
| input[].mime_type | string | Y |
| generation_config | object | Y |
| generation_config.video_config | object | Y |
| generation_config.video_config.task | string | Y |
| response_format | object | Y |
| response_format.type | string | Y |
| response_format.aspect_ratio | string | Y |
| response_format.delivery | string | Y |
Trường phản hồi
| Trường | Kiểu | Bắt buộc |
|---|---|---|
| id | string | Y |
| object | string | Y |
| status | string | Y |
| model | string | Y |
| steps | array | Y |
| steps[] | object | Y |
| steps[].type | string | Y |
| steps[].content | array | Y |
| steps[].content[] | object | Y |
| steps[].content[].type | string | Y |
| steps[].content[].mime_type | string | Y |
| steps[].content[].uri | string | Y |
| usage | object | Y |
| usage.total_input_tokens | integer | Y |
| usage.total_output_tokens | integer | Y |
| usage.total_tokens | integer | Y |
Ví dụ mã
cURLrequest.sh
curl -X POST "https://api.dreamtoai.com/v1beta/interactions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "gemini-omni-1.1-flash-as",
"background": true,
"input": [
{
"type": "image",
"data": "BASE64_IMAGE_DATA",
"mime_type": "image/jpeg"
},
{
"type": "text",
"text": "让参考图中的主体自然运动,保持外观一致,使用单一连续镜头。"
}
],
"generation_config": {
"video_config": {
"task": "image_to_video"
}
},
"response_format": {
"type": "video",
"aspect_ratio": "16:9",
"delivery": "uri"
}
}'
# cURL để kiểm tra trạng thái
# Thay interaction_example bằng interaction_id do phản hồi submit trả về.
curl -X GET "https://api.dreamtoai.com/v1beta/interactions/interaction_example" \
-H "Authorization: Bearer YOUR_API_KEY"