> ## Documentation Index
> Fetch the complete documentation index at: https://doc.octopusx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Query Task

> Use `GET /v1/video/query` to query the status and result of Veo unified video tasks.

# Query Task

After a Veo unified video task is submitted, use `GET /v1/video/query` to check its progress and result. The query parameter uses `id`, whose value is the task ID returned by [Create Video](./unified-generation).

* The route entry is `GET /v1/video/query`.
* The task ID is passed in via the `id` query parameter.
* While processing, statuses such as `pending` or `processing` are commonly returned; after completion, `video_url` will include an accessible address.

## Method and Path

```http theme={null}
GET /v1/video/query?id={task_id}
```

## Request Example

<CodeGroup>
  ```bash theme={null}
  curl "https://octopusx.ai/v1/video/query?id=sora-2:task_01k74ynm13exf9ha36zz7820hv" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Accept: application/json"
  ```

  ```python theme={null}
  import requests

  resp = requests.get(
      "https://octopusx.ai/v1/video/query",
      params={"id": "sora-2:task_01k74ynm13exf9ha36zz7820hv"},
      headers={
          "Authorization": "Bearer YOUR_API_KEY",
          "Accept": "application/json",
      },
      timeout=30,
  )
  print(resp.json())
  ```

  ```javascript theme={null}
  const params = new URLSearchParams({
    id: "sora-2:task_01k74ynm13exf9ha36zz7820hv",
  });

  const response = await fetch(
    `https://octopusx.ai/v1/video/query?${params.toString()}`,
    {
      headers: {
        Authorization: "Bearer YOUR_API_KEY",
        Accept: "application/json",
      },
    }
  );

  console.log(await response.json());
  ```
</CodeGroup>

## Response Example

<ResponseExample>
  ```json 200 - Processing theme={null}
  {
    "id": "task_01k6x15vhrff09dkkqjrzwhm60",
    "status": "pending",
    "video_url": null,
    "enhanced_prompt": "",
    "status_update_time": 1759763621142
  }
  ```

  ```json 200 - Completed theme={null}
  {
    "id": "task_01k6x15vhrff09dkkqjrzwhm60",
    "status": "completed",
    "video_url": "https://example.com/output.mp4",
    "enhanced_prompt": "make animate",
    "status_update_time": 1759763651908
  }
  ```
</ResponseExample>

Some channels also return a more complete `detail` structure when `pending` or `completed` (including upstream task metadata, thumbnails, progress percentage, and more). Please parse compatibly according to the actual response.

## Authentication

```http theme={null}
Authorization: Bearer YOUR_API_KEY
```

## Query Parameters

<ParamField query="id" type="string" required>
  Task ID, consistent with the `id` returned by the create interface.
</ParamField>

## Response

<ResponseField name="id" type="string">
  Task ID.
</ResponseField>

<ResponseField name="status" type="string">
  Task status; common values include `pending`, `processing`, `completed`, and `failed`.
</ResponseField>

<ResponseField name="video_url" type="string | null">
  The video result URL. It may be `null` when the task is not yet complete.
</ResponseField>

<ResponseField name="enhanced_prompt" type="string">
  The enhanced prompt; may be an empty string if enhancement is not enabled.
</ResponseField>

<ResponseField name="status_update_time" type="integer">
  The most recent status update time (Unix timestamp, in milliseconds or seconds depending on the upstream source; please refer to the actual response).
</ResponseField>

## Related Interfaces

* [Veo Video Overview](./overview)
* [Create Video](./unified-generation)
* [Veo Task Query (OpenAI Format)](./query)
