---
title: "Get a video"
description: "The video's status and, once it is `done`, a download link. The link\nis valid for a short time: fetch the video again for a new one.\nNeeds the `videos:read` permission.\n"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.mosio.me/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Mosio REST API › Videos

`GET /v1/videos/{id}`

The video's status and, once it is `done`, a download link. The link
is valid for a short time: fetch the video again for a new one.
Needs the `videos:read` permission.

## Authentication

- `apiKey`, apiKey, in header, header `x-api-key`

## Path parameters

- `id` (`getVideo.path.id`; string, required) — The video id, such as `vid_6f1c…`.

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://app.mosio.me/v1/videos/<id>' \
  --header 'x-api-key: <x-api-key>'
```

### TypeScript

```typescript
const url = 'https://app.mosio.me/v1/videos/<id>';
const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://app.mosio.me/v1/videos/<id>"

headers = {"x-api-key": "<x-api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

The video.

#### Example

```json
{
  "id": "vid_6f1c2b9e-0c1a-4b7e-9d0e-2f3a4b5c6d7e",
  "status": "queued",
  "template": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "finished_at": "2019-08-24T14:15:22Z",
  "duration_seconds": 0,
  "output_url": "string",
  "error": {
    "code": "string",
    "message": "string"
  }
}
```

- `id` (`getVideo.response.200.id`; string, required)
  - example `"vid_6f1c2b9e-0c1a-4b7e-9d0e-2f3a4b5c6d7e"`
- `status` (`getVideo.response.200.status`; string, required)
  - one of `"queued"`, `"rendering"`, `"done"`, `"failed"`, `"canceled"`
- `template` (`getVideo.response.200.template`; string, required) — The template id, `composition` for a rendered composition, or `studio` for a Studio project.
- `created_at` (`getVideo.response.200.created_at`; string, required)
  - format `date-time`
- `finished_at` (`getVideo.response.200.finished_at`; string | null, required)
  - format `date-time`
- `duration_seconds` (`getVideo.response.200.duration_seconds`; number | null, required) — Length of the finished video.
- `output_url` (`getVideo.response.200.output_url`; string | null, required) — Short-lived link to the MP4 once `status` is `done`.
- `error` (`getVideo.response.200.error`; object | null, required) — Why the render failed, when `status` is `failed`. Failed videos spend no credits.
  - `code` (`getVideo.response.200.error.code`; string, optional)
  - `message` (`getVideo.response.200.error.message`; string, optional)

### 401

The API key is missing or not valid.

#### Example

```json
{
  "error": "unauthorized",
  "message": "Kirim API key di header x-api-key."
}
```

- `error` (`getVideo.response.401.error`; string, required) — A stable error code.
  - one of `"unauthorized"`, `"invalid_api_key"`, `"insufficient_scope"`, `"forbidden"`, `"invalid_input"`, `"unknown_template"`, `"invalid_variables"`, `"invalid_composition"`, `"idempotency_conflict"`, `"quota_exceeded"`, `"insufficient_credits"`, `"too_many_active_renders"`, `"duration_too_long"`, `"not_found"`, `"internal_error"`
- `message` (`getVideo.response.401.message`; string, required) — A message for people, in Indonesian.
- `details` (`getVideo.response.401.details`; unknown, optional) — More about the error, such as the fields to fix.

### 404

No such template or video in this workspace.

#### Example

```json
{
  "error": "unauthorized",
  "message": "string",
  "details": null
}
```

- `error` (`getVideo.response.404.error`; string, required) — A stable error code.
  - one of `"unauthorized"`, `"invalid_api_key"`, `"insufficient_scope"`, `"forbidden"`, `"invalid_input"`, `"unknown_template"`, `"invalid_variables"`, `"invalid_composition"`, `"idempotency_conflict"`, `"quota_exceeded"`, `"insufficient_credits"`, `"too_many_active_renders"`, `"duration_too_long"`, `"not_found"`, `"internal_error"`
- `message` (`getVideo.response.404.message`; string, required) — A message for people, in Indonesian.
- `details` (`getVideo.response.404.details`; unknown, optional) — More about the error, such as the fields to fix.


Source: https://docs.mosio.me/api/videos/retrieve/index.md
