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

# Video Extend

> Use `POST /v1/video/extend` to extend segments of an existing Grok task via the unified video format.

# Video Extend

The Grok unified video extend endpoint is `POST /v1/video/extend`. Unlike [OpenAI-format Video Extend](./extend), the original task ID is passed in the Body via `task_id`.

* The route endpoint is `POST /v1/video/extend`.
* Required: `model`, `prompt`, `task_id`.
* You can specify which second of the original video to start extending from with `start_time`.

## Method and Path

```http theme={null}
POST /v1/video/extend
```

## Request Example

<CodeGroup>
  ```bash theme={null}
  curl -X POST https://octopusx.ai/v1/video/extend \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{
      "model": "grok-video-3",
      "prompt": "play with another white cat",
      "task_id": "grok:2d8ef725-c4a9-46e0-b133-eca6c297e830",
      "start_time": 4,
      "aspect_ratio": "3:2",
      "size": "1080P",
      "upscale": true
    }'
  ```

  ```python theme={null}
  import requests

  resp = requests.post(
      "https://octopusx.ai/v1/video/extend",
      headers={
          "Authorization": "Bearer YOUR_API_KEY",
          "Content-Type": "application/json",
          "Accept": "application/json",
      },
      json={
          "model": "grok-video-3",
          "prompt": "play with another white cat",
          "task_id": "grok:2d8ef725-c4a9-46e0-b133-eca6c297e830",
          "start_time": 4,
          "aspect_ratio": "3:2",
          "size": "1080P",
          "upscale": True,
      },
      timeout=60,
  )
  print(resp.json())
  ```

  ```javascript theme={null}
  const response = await fetch("https://octopusx.ai/v1/video/extend", {
    method: "POST",
    headers: {
      Authorization: "Bearer YOUR_API_KEY",
      "Content-Type": "application/json",
      Accept: "application/json",
    },
    body: JSON.stringify({
      model: "grok-video-3",
      prompt: "play with another white cat",
      task_id: "grok:2d8ef725-c4a9-46e0-b133-eca6c297e830",
      start_time: 4,
      aspect_ratio: "3:2",
      size: "1080P",
      upscale: true,
    }),
  });

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

## Response Example

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "grok:48a67431-0708-46d1-9ab9-83cb84700153",
    "status": "processing",
    "status_update_time": 1762685256
  }
  ```
</ResponseExample>

## Authentication

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

## Body

<ParamField body="model" type="string" required>
  Model name, for example `grok-video-3`.
</ParamField>

<ParamField body="prompt" type="string" required>
  Prompt for the extended segment.
</ParamField>

<ParamField body="task_id" type="string" required>
  Original video task ID.
</ParamField>

<ParamField body="images" type="array<string>">
  List of reference image URLs to add visual constraints as needed.
</ParamField>

<ParamField body="size" type="string">
  Resolution specification, pass `720P` or `1080P`.
</ParamField>

<ParamField body="aspect_ratio" type="string">
  Video aspect ratio, for example `3:2`.
</ParamField>

<ParamField body="start_time" type="integer">
  Which second of the original video to start extending from.
</ParamField>

<ParamField body="upscale" type="boolean">
  Whether to apply high-definition enhancement to the output.
</ParamField>

## Response

<ResponseField name="id" type="string">
  New extend task ID.
</ResponseField>

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

<ResponseField name="status_update_time" type="integer">
  Most recent status update time (Unix timestamp).
</ResponseField>

## Related APIs

* [Grok Video Overview](./overview)
* [Create Video](./unified-generation)
* [Video Remix (Unified Video)](./unified-remix)
* [Video Extensions (Unified Video)](./unified-extensions)
* [Query Task](./unified-query)
* [Video Extend (OpenAI Format)](./extend)
