---
title: "List videos"
description: "The workspace's most recent videos, newest first. Needs the `videos:read` permission."
---

> 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`

The workspace's most recent videos, newest first. Needs the `videos:read` permission.

## Authentication

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

## Query parameters

- `limit` (`listVideos.query.limit`; integer, optional) — How many videos to return (1–100).
  - min 1; max 100; default `20`

## Code samples

### cURL

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

### TypeScript

```typescript
const url = 'https://app.mosio.me/v1/videos';
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"

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

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

print(response.text)
```

## Responses

### 200

The videos.

#### Example

```json
{
  "videos": [
    {
      "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"
      }
    }
  ]
}
```

- `videos` (`listVideos.response.200.videos`; array<object>, required)
  - `id` (`listVideos.response.200.videos.id`; string, required)
    - example `"vid_6f1c2b9e-0c1a-4b7e-9d0e-2f3a4b5c6d7e"`
  - `status` (`listVideos.response.200.videos.status`; string, required)
    - one of `"queued"`, `"rendering"`, `"done"`, `"failed"`, `"canceled"`
  - `template` (`listVideos.response.200.videos.template`; string, required) — The template id, `composition` for a rendered composition, or `studio` for a Studio project.
  - `created_at` (`listVideos.response.200.videos.created_at`; string, required)
    - format `date-time`
  - `finished_at` (`listVideos.response.200.videos.finished_at`; string | null, required)
    - format `date-time`
  - `duration_seconds` (`listVideos.response.200.videos.duration_seconds`; number | null, required) — Length of the finished video.
  - `output_url` (`listVideos.response.200.videos.output_url`; string | null, required) — Short-lived link to the MP4 once `status` is `done`.
  - `error` (`listVideos.response.200.videos.error`; object | null, required) — Why the render failed, when `status` is `failed`. Failed videos spend no credits.
    - `code` (`listVideos.response.200.videos.error.code`; string, optional)
    - `message` (`listVideos.response.200.videos.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` (`listVideos.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` (`listVideos.response.401.message`; string, required) — A message for people, in Indonesian.
- `details` (`listVideos.response.401.details`; unknown, optional) — More about the error, such as the fields to fix.


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