> ## 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.

# Doubao Task Status Query

> Use `GET /v1/videos/{task_id}` to query Doubao video task status and results.

# Doubao Task Status Query

After submitting a Doubao series task, query it via `GET /v1/videos/{task_id}`.

* The query path is `GET /v1/videos/{task_id}`.
* A successful response returns an OpenAI-style `video` object.
* After the task is completed, the result can be read from `video_url`.

## Method and Path

```http theme={null}
GET /v1/videos/{task_id}
```

## Request Example

<CodeGroup>
  ```bash theme={null}
  curl https://octopusx.ai/v1/videos/video_bbfbc1d2-ab22-44ca-b9dd-bc16983acac2 \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```python theme={null}
  import requests

  resp = requests.get(
      "https://octopusx.ai/v1/videos/video_bbfbc1d2-ab22-44ca-b9dd-bc16983acac2",
      headers={"Authorization": "Bearer YOUR_API_KEY"},
      timeout=30,
  )
  print(resp.json())
  ```

  ```javascript theme={null}
  const response = await fetch(
    "https://octopusx.ai/v1/videos/video_bbfbc1d2-ab22-44ca-b9dd-bc16983acac2",
    {
      headers: {
        Authorization: "Bearer YOUR_API_KEY",
      },
    }
  );

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

## Response Example

<ResponseExample>
  ```json 200 - processing theme={null}
  {
    "id": "video_bbfbc1d2-ab22-44ca-b9dd-bc16983acac2",
    "object": "video",
    "model": "doubao-seedance-1-5-pro_720p",
    "status": "processing",
    "progress": 50,
    "created_at": 1761635478,
    "seconds": "5",
    "size": "720x720"
  }
  ```

  ```json 200 - completed theme={null}
  {
    "id": "video_bbfbc1d2-ab22-44ca-b9dd-bc16983acac2",
    "object": "video",
    "model": "doubao-seedance-1-5-pro_720p",
    "status": "completed",
    "progress": 100,
    "created_at": 1761635478,
    "completed_at": 1761635600,
    "expires_at": 1761722000,
    "seconds": "5",
    "size": "720x720",
    "video_url": "https://example.com/video/output.mp4"
  }
  ```

  ```json 200 - failed theme={null}
  {
    "id": "video_bbfbc1d2-ab22-44ca-b9dd-bc16983acac2",
    "object": "video",
    "model": "doubao-seedance-1-5-pro_720p",
    "status": "failed",
    "progress": 0,
    "created_at": 1761635478,
    "completed_at": 1761635500,
    "expires_at": 1761721900,
    "seconds": "5",
    "size": "720x720",
    "error": {
      "message": "Generation failed, please try again",
      "code": "GENERATION_FAILED"
    }
  }
  ```
</ResponseExample>

## Authentication

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

## Path Parameters

<ParamField path="task_id" type="string" required>
  Task ID, consistent with the `id` returned by the generation endpoint.
</ParamField>

## Response

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

<ResponseField name="object" type="string">
  Fixed as `video`.
</ResponseField>

<ResponseField name="model" type="string">
  Model name.
</ResponseField>

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

<ResponseField name="progress" type="integer">
  Progress percentage (0-100).
</ResponseField>

<ResponseField name="created_at" type="integer">
  Creation time (Unix timestamp).
</ResponseField>

<ResponseField name="completed_at" type="integer">
  Completion time (Unix timestamp), returned only when the task is completed or failed.
</ResponseField>

<ResponseField name="expires_at" type="integer">
  Expiration time (Unix timestamp).
</ResponseField>

<ResponseField name="seconds" type="string">
  Video duration (seconds).
</ResponseField>

<ResponseField name="size" type="string">
  Video dimensions, for example `720x720`.
</ResponseField>

<ResponseField name="video_url" type="string">
  Video download URL, returned only when the status is `completed`.
</ResponseField>

<ResponseField name="remixed_from_video_id" type="string">
  Source video ID for remixing, if any.
</ResponseField>

<ResponseField name="error" type="object">
  Error information, returned only when the status is `failed`.
</ResponseField>

<ResponseField name="error.message" type="string">
  Error message.
</ResponseField>

<ResponseField name="error.code" type="string">
  Error code.
</ResponseField>

## Related Endpoints

* [Doubao Video Overview](./overview)
* [Doubao Video Generation](./doubao-generation)
