---
title: "Download a video (OpenAI Videos)"
description: "Downloads a finished video's bytes. Returns `409` until the job is `completed`, so poll Get a video first. Served for Gemini (Omni), OpenRouter and DeepInfra jobs; MiniMax, Qwen, Z.ai, Together AI and EmpirioLabs jobs answer `400`, and the video is fetched from the URL in the job. Download within 3 days of creating the job. A job is bound to your organization and the provider key it was made on for 3 days; another organization's ID returns `404`."
---

**GET** `https://gateway.respan.ai/v1/videos/{id}/content`

Downloads a finished video's bytes. Returns `409` until the job is `completed`, so poll Get a video first. Served for Gemini (Omni), OpenRouter and DeepInfra jobs; MiniMax, Qwen, Z.ai, Together AI and EmpirioLabs jobs answer `400`, and the video is fetched from the URL in the job. Download within 3 days of creating the job. A job is bound to your organization and the provider key it was made on for 3 days; another organization's ID returns `404`.

## Servers

`https://gateway.respan.ai`: Respan gateway

## Authentication

### RespanApiKey

Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer &lt;RESPAN_API_KEY&gt;. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -&gt; Providers or respan_params.credential_override in the request body, not in this authentication field.

HTTP scheme: `bearer`; format: `Respan API key`.


```http
Authorization: Bearer $RESPAN_API_KEY
```


## Path parameters


| Parameter | Type | Required | Description and constraints |
| --- | --- | --- | --- |
| `id` | `string` | Required | The video job ID returned by Create a video.<br />Example: `"video_7c1e2f9a4b3d4c5e"` |


## Examples

### Download a video

#### Headers


```json
{
  "Authorization": "Bearer YOUR_RESPAN_API_KEY"
}
```


#### Path parameters


```json
{
  "id": "video_7c1e2f9a4b3d4c5e"
}
```


#### cURL


```bash
curl --request GET 'https://gateway.respan.ai/v1/videos/video_7c1e2f9a4b3d4c5e/content' \
  --header "Authorization: Bearer $RESPAN_API_KEY"
```


<details>
<summary>Python</summary>



```python
import json
import os
import urllib.request

request = urllib.request.Request(
    "https://gateway.respan.ai/v1/videos/video_7c1e2f9a4b3d4c5e/content",
    headers={
        "Authorization": f"Bearer {os.environ['RESPAN_API_KEY']}",
    },
    method="GET",
)
with urllib.request.urlopen(request) as response:
    print(response.read().decode())
```


</details>

<details>
<summary>TypeScript</summary>



```typescript
const response = await fetch("https://gateway.respan.ai/v1/videos/video_7c1e2f9a4b3d4c5e/content", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.RESPAN_API_KEY}`,
  },
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.text());
```


</details>

## Responses

### 200

The video bytes.

#### video/mp4


| Field | Type | Requirement | Description and constraints |
| --- | --- | --- | --- |
| `$` | `string` | Body | Format: `binary` |


<details class="api-schema-source">
<summary>OpenAPI response schema</summary>


```json
{
  "type": "string",
  "format": "binary"
}
```

</details>

### 400

The job is from a provider that returns a URL in the job instead (MiniMax, Qwen, Z.ai, Together AI, EmpirioLabs).

#### application/json


| Field | Type | Requirement | Description and constraints |
| --- | --- | --- | --- |
| `$` | `object` | Body | OpenAI-style error written by the gateway.<br />Reference: `#/components/schemas/GatewayError` |
| `error` | `object` | Required in parent | - |
| `error.message` | `string` | Required in parent | - |
| `error.type` | `string` | Optional | - |
| `error.param` | `string or null` | Optional | - |
| `error.code` | `string or null` | Optional | - |


<details class="api-schema-source">
<summary>OpenAPI response schema</summary>


```json
{
  "$ref": "#/components/schemas/GatewayError"
}
```

</details>

### 403

The API key is missing, invalid or expired.

#### application/json


| Field | Type | Requirement | Description and constraints |
| --- | --- | --- | --- |
| `$` | `object` | Body | OpenAI-style error written by the gateway.<br />Reference: `#/components/schemas/GatewayError` |
| `error` | `object` | Required in parent | - |
| `error.message` | `string` | Required in parent | - |
| `error.type` | `string` | Optional | - |
| `error.param` | `string or null` | Optional | - |
| `error.code` | `string or null` | Optional | - |


<details class="api-schema-source">
<summary>OpenAPI response schema</summary>


```json
{
  "$ref": "#/components/schemas/GatewayError"
}
```

</details>

##### Example


```json
{
  "error": {
    "message": "Your API key is invalid or expired, please check your API key in the platform settings.",
    "type": "error",
    "param": null,
    "code": "error"
  }
}
```


### 404

No such job for this organization.

#### application/json


| Field | Type | Requirement | Description and constraints |
| --- | --- | --- | --- |
| `$` | `object` | Body | OpenAI-style error written by the gateway.<br />Reference: `#/components/schemas/GatewayError` |
| `error` | `object` | Required in parent | - |
| `error.message` | `string` | Required in parent | - |
| `error.type` | `string` | Optional | - |
| `error.param` | `string or null` | Optional | - |
| `error.code` | `string or null` | Optional | - |


<details class="api-schema-source">
<summary>OpenAPI response schema</summary>


```json
{
  "$ref": "#/components/schemas/GatewayError"
}
```

</details>

### 409

The job isn't `completed` yet.

#### application/json


| Field | Type | Requirement | Description and constraints |
| --- | --- | --- | --- |
| `$` | `object` | Body | OpenAI-style error written by the gateway.<br />Reference: `#/components/schemas/GatewayError` |
| `error` | `object` | Required in parent | - |
| `error.message` | `string` | Required in parent | - |
| `error.type` | `string` | Optional | - |
| `error.param` | `string or null` | Optional | - |
| `error.code` | `string or null` | Optional | - |


<details class="api-schema-source">
<summary>OpenAPI response schema</summary>


```json
{
  "$ref": "#/components/schemas/GatewayError"
}
```

</details>

## OpenAPI source

The operation and referenced components below retain the complete OpenAPI definitions, including constraints and examples.

<!-- openapi-operation:start -->
<details class="api-schema-source">
<summary>OpenAPI operation</summary>


```json
{
  "summary": "Download a video (OpenAI Videos)",
  "operationId": "downloadVideoContent",
  "tags": [
    "Gateway"
  ],
  "description": "Downloads a finished video's bytes. Returns `409` until the job is `completed`, so poll Get a video first. Served for Gemini (Omni), OpenRouter and DeepInfra jobs; MiniMax, Qwen, Z.ai, Together AI and EmpirioLabs jobs answer `400`, and the video is fetched from the URL in the job. Download within 3 days of creating the job. A job is bound to your organization and the provider key it was made on for 3 days; another organization's ID returns `404`.",
  "servers": [
    {
      "url": "https://gateway.respan.ai",
      "description": "Respan gateway"
    }
  ],
  "security": [
    {
      "RespanApiKey": []
    }
  ],
  "parameters": [
    {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string"
      },
      "description": "The video job ID returned by Create a video.",
      "example": "video_7c1e2f9a4b3d4c5e"
    }
  ],
  "responses": {
    "200": {
      "description": "The video bytes.",
      "content": {
        "video/mp4": {
          "schema": {
            "type": "string",
            "format": "binary"
          }
        }
      }
    },
    "400": {
      "description": "The job is from a provider that returns a URL in the job instead (MiniMax, Qwen, Z.ai, Together AI, EmpirioLabs).",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/GatewayError"
          }
        }
      }
    },
    "403": {
      "description": "The API key is missing, invalid or expired.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/GatewayError"
          },
          "example": {
            "error": {
              "message": "Your API key is invalid or expired, please check your API key in the platform settings.",
              "type": "error",
              "param": null,
              "code": "error"
            }
          }
        }
      }
    },
    "404": {
      "description": "No such job for this organization.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/GatewayError"
          }
        }
      }
    },
    "409": {
      "description": "The job isn't `completed` yet.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/GatewayError"
          }
        }
      }
    }
  },
  "x-fern-examples": [
    {
      "name": "Download a video",
      "headers": {
        "Authorization": "Bearer YOUR_RESPAN_API_KEY"
      },
      "path-parameters": {
        "id": "video_7c1e2f9a4b3d4c5e"
      }
    }
  ]
}
```

</details>
<!-- openapi-operation:end -->

<!-- openapi-path-item:start -->
<details class="api-schema-source">
<summary>OpenAPI path metadata</summary>


```json
{}
```

</details>
<!-- openapi-path-item:end -->

<!-- openapi-components:start -->
<details class="api-schema-source">
<summary>Referenced OpenAPI components</summary>


```json
{
  "schemas": {
    "GatewayError": {
      "type": "object",
      "required": [
        "error"
      ],
      "description": "OpenAI-style error written by the gateway.",
      "properties": {
        "error": {
          "type": "object",
          "required": [
            "message"
          ],
          "properties": {
            "message": {
              "type": "string"
            },
            "type": {
              "type": "string"
            },
            "param": {
              "type": "string",
              "nullable": true
            },
            "code": {
              "type": "string",
              "nullable": true
            }
          }
        }
      }
    }
  },
  "securitySchemes": {
    "RespanApiKey": {
      "type": "http",
      "scheme": "bearer",
      "bearerFormat": "Respan API key",
      "description": "Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.",
      "x-fern-bearer": {
        "name": "respanApiKey",
        "env": "RESPAN_API_KEY"
      }
    }
  }
}
```

</details>
<!-- openapi-components:end -->
