# Query Video Generation Task Status

> Video Generation

Query the execution status and result of an asynchronous video generation task.
After submitting an async task, poll this endpoint to check the task status until it becomes `completed` or `failed`.
The JSON structure returned by the query is consistent with the synchronous execution success response.

**Request Example**

**Query Task Status**

```bash
curl -X GET "https://api.modelverse.cn/v1beta/models/interactions/{id}" \
  -H "Authorization: Bearer $MODELVERSE_API_KEY"
```

Replace `{id}` with the task ID returned when submitting the async task.

**Response Examples**

**1. Task In Progress**

```json
{
  "id": "video-ea2b5872-12eb-452f-96d5-d6abf1ee25da",
  "status": "in_progress",
  "role": "model",
  "steps": [
    {
      "type": "user_input",
      "content": [
        {
          "text": "Introduce the history of the Forbidden City in a video",
          "type": "text"
        }
      ]
    }
  ],
  "object": "interaction",
  "model": "gemini-omni-flash-preview"
}
```

**2. Task Completed**

```json
{
  "id": "video-088fa9f5-81bd-419c-95bb-4ee03b28fc5d",
  "status": "completed",
  "usage": {
    "total_tokens": 116229,
    "total_input_tokens": 57815,
    "input_tokens_by_modality": [
      {
        "modality": "text",
        "tokens": 215
      }
    ],
    "total_output_tokens": 57920,
    "output_tokens_by_modality": [
      {
        "modality": "video",
        "tokens": 57920
      }
    ]
  },
  "role": "model",
  "created": "2026-07-07T06:20:37Z",
  "updated": "2026-07-07T06:25:12Z",
  "steps": [
    {
      "content": [
        {
          "mime_type": "video/mp4",
          "data": "base64 encoded MP4 video data",
          "type": "video"
        }
      ],
      "type": "model_output"
    }
  ],
  "object": "interaction",
  "model": "gemini-omni-flash-preview"
}
```

**3. Task Failed**

```json
{
  "id": "video-088fa9f5-81bd-419c-95bb-4ee03b28fc5d",
  "status": "failed"
}
```

## Endpoint

`GET https://api.modelverse.cn/v1beta/models/interactions/{id}`

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| id | path | string | Yes | Task ID (the id returned when submitting async) |

## Responses

- **200** — Task status query successful.
- **404** — Task not found.
- **default** — Error response.

## OpenAPI Definition

```json
{
  "openapi": "3.1.0",
  "x-language": "en-US",
  "info": {
    "title": "gemini-omni-flash-preview Task Status Query API Documentation",
    "version": "1.0.0",
    "description": "This is the API documentation for `gemini-omni-flash-preview` video generation task status query on ModelVerse.\nThe endpoint is `GET /v1beta/models/interactions/{id}`.\n"
  },
  "servers": [
    {
      "url": "https://api.modelverse.cn",
      "description": "ModelVerse API endpoint used in this model documentation."
    }
  ],
  "tags": [
    {
      "name": "gemini-omni-flash-preview",
      "description": "gemini-omni-flash-preview video generation task status query API."
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/v1beta/models/interactions/{id}": {
      "get": {
        "tags": [
          "gemini-omni-flash-preview"
        ],
        "operationId": "getVideoTaskStatus",
        "summary": "Query Video Generation Task Status",
        "description": "Query the execution status and result of an asynchronous video generation task.\nAfter submitting an async task, poll this endpoint to check the task status until it becomes `completed` or `failed`.\nThe JSON structure returned by the query is consistent with the synchronous execution success response.\n\n**Request Example**\n\n**Query Task Status**\n\n```bash\ncurl -X GET \"https://api.modelverse.cn/v1beta/models/interactions/{id}\" \\\n  -H \"Authorization: Bearer $MODELVERSE_API_KEY\"\n```\n\nReplace `{id}` with the task ID returned when submitting the async task.\n\n**Response Examples**\n\n**1. Task In Progress**\n\n```json\n{\n  \"id\": \"video-ea2b5872-12eb-452f-96d5-d6abf1ee25da\",\n  \"status\": \"in_progress\",\n  \"role\": \"model\",\n  \"steps\": [\n    {\n      \"type\": \"user_input\",\n      \"content\": [\n        {\n          \"text\": \"Introduce the history of the Forbidden City in a video\",\n          \"type\": \"text\"\n        }\n      ]\n    }\n  ],\n  \"object\": \"interaction\",\n  \"model\": \"gemini-omni-flash-preview\"\n}\n```\n\n**2. Task Completed**\n\n```json\n{\n  \"id\": \"video-088fa9f5-81bd-419c-95bb-4ee03b28fc5d\",\n  \"status\": \"completed\",\n  \"usage\": {\n    \"total_tokens\": 116229,\n    \"total_input_tokens\": 57815,\n    \"input_tokens_by_modality\": [\n      {\n        \"modality\": \"text\",\n        \"tokens\": 215\n      }\n    ],\n    \"total_output_tokens\": 57920,\n    \"output_tokens_by_modality\": [\n      {\n        \"modality\": \"video\",\n        \"tokens\": 57920\n      }\n    ]\n  },\n  \"role\": \"model\",\n  \"created\": \"2026-07-07T06:20:37Z\",\n  \"updated\": \"2026-07-07T06:25:12Z\",\n  \"steps\": [\n    {\n      \"content\": [\n        {\n          \"mime_type\": \"video/mp4\",\n          \"data\": \"base64 encoded MP4 video data\",\n          \"type\": \"video\"\n        }\n      ],\n      \"type\": \"model_output\"\n    }\n  ],\n  \"object\": \"interaction\",\n  \"model\": \"gemini-omni-flash-preview\"\n}\n```\n\n**3. Task Failed**\n\n```json\n{\n  \"id\": \"video-088fa9f5-81bd-419c-95bb-4ee03b28fc5d\",\n  \"status\": \"failed\"\n}\n```\n",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Task ID (the id returned when submitting async)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Task status query successful.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoGenerateResponse"
                }
              }
            }
          },
          "404": {
            "description": "Task not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API key",
        "description": "API Key authentication, include `Authorization: Bearer {API_KEY}` in the request header."
      }
    },
    "schemas": {
      "VideoGenerateResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "status",
          "role",
          "object",
          "model"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique interaction identifier."
          },
          "status": {
            "type": "string",
            "enum": [
              "completed",
              "failed",
              "in_progress"
            ],
            "description": "Task status."
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          },
          "role": {
            "type": "string",
            "const": "model",
            "description": "Role. Fixed as model."
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "description": "Creation time (ISO 8601 format)."
          },
          "updated": {
            "type": "string",
            "format": "date-time",
            "description": "Update time (ISO 8601 format)."
          },
          "steps": {
            "type": "array",
            "description": "Generation steps list.",
            "items": {
              "$ref": "#/components/schemas/Step"
            }
          },
          "object": {
            "type": "string",
            "const": "interaction",
            "description": "Object type. Fixed as interaction."
          },
          "model": {
            "type": "string",
            "const": "gemini-omni-flash-preview",
            "description": "Model name."
          }
        }
      },
      "Usage": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "total_tokens": {
            "type": "integer",
            "description": "Total token count."
          },
          "total_input_tokens": {
            "type": "integer",
            "description": "Total input token count."
          },
          "input_tokens_by_modality": {
            "type": "array",
            "description": "Input tokens by modality.",
            "items": {
              "$ref": "#/components/schemas/InputModalityTokens"
            }
          },
          "total_output_tokens": {
            "type": "integer",
            "description": "Total output token count."
          },
          "output_tokens_by_modality": {
            "type": "array",
            "description": "Output tokens by modality.",
            "items": {
              "$ref": "#/components/schemas/OutputModalityTokens"
            }
          },
          "total_tool_use_tokens": {
            "type": "integer",
            "description": "Tool use token count."
          },
          "total_thought_tokens": {
            "type": "integer",
            "description": "Thought token count."
          }
        }
      },
      "InputModalityTokens": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "modality": {
            "type": "string",
            "enum": [
              "text",
              "image",
              "video"
            ],
            "description": "Input modality type."
          },
          "tokens": {
            "type": "integer",
            "description": "Token count."
          }
        }
      },
      "OutputModalityTokens": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "modality": {
            "type": "string",
            "enum": [
              "text",
              "video"
            ],
            "description": "Output modality type."
          },
          "tokens": {
            "type": "integer",
            "description": "Token count."
          }
        }
      },
      "Step": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "signature": {
            "type": "string",
            "description": "Signature."
          },
          "summary": {
            "type": "array",
            "description": "Summary list.",
            "items": {
              "$ref": "#/components/schemas/SummaryItem"
            }
          },
          "type": {
            "type": "string",
            "enum": [
              "thought",
              "model_output",
              "user_input"
            ],
            "description": "Step type."
          },
          "content": {
            "type": "array",
            "description": "Output content list (when type is model_output).",
            "items": {
              "$ref": "#/components/schemas/OutputContent"
            }
          }
        }
      },
      "SummaryItem": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "text": {
            "type": "string",
            "description": "Summary text."
          },
          "type": {
            "type": "string",
            "const": "text",
            "description": "Content type."
          }
        }
      },
      "OutputContent": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "mime_type": {
            "type": "string",
            "description": "MIME type.",
            "examples": [
              "video/mp4"
            ]
          },
          "data": {
            "type": "string",
            "description": "Base64 encoded video data."
          },
          "type": {
            "type": "string",
            "enum": [
              "text",
              "video"
            ],
            "description": "Output content type. Supported modalities:\n- `text`: Text (output)\n- `video`: Video (output)\n"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorObject"
          }
        }
      },
      "ErrorObject": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "message",
          "type"
        ],
        "properties": {
          "message": {
            "type": "string",
            "description": "Error message."
          },
          "type": {
            "type": "string",
            "description": "Error type."
          },
          "code": {
            "type": "string",
            "description": "Error code."
          },
          "param": {
            "type": "string",
            "description": "Related request parameter."
          }
        }
      }
    }
  }
}
```
