gemini-omni-1.1-flash-as
gemini-omni-1.1-flash-as
VídeoGooglegemini-omni-videogemini-omni-1.1-flash-as
gemini-omni-video
Autenticación
- Base URL
https://api.dreamtoai.com- Authorization
Authorization: Bearer YOUR_API_KEY- Content-Type
application/json- Nombre del modelo (model)
gemini-omni-1.1-flash-as
Protocolo de integración
Por qué elegir este protocolo
适合使用 Google Interactions 原生接口提交多模态视频任务并轮询状态的用户。
URL del endpoint
POST/v1beta/interactions
Authorization: Bearer YOUR_API_KEYContent-Type: application/jsonJSON de solicitud y respuesta
Solicitud
{
"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"
}
}Respuesta
{
"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
}
}Campos de solicitud y respuesta
Campos de solicitud
| Campo | Tipo | Obligatorio |
|---|---|---|
| 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 |
Campos de respuesta
| Campo | Tipo | Obligatorio |
|---|---|---|
| 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 |
Ejemplos de código
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 para consultar el estado
# Sustituye interaction_example por el interaction_id que devuelve la respuesta de envío.
curl -X GET "https://api.dreamtoai.com/v1beta/interactions/interaction_example" \
-H "Authorization: Bearer YOUR_API_KEY"