> This page is for Gateway.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# List videos

GET https://api-gateway.merge.dev/v1/videos

List video jobs submitted in the last 24 hours, newest first. Each entry shows the status from the job's last poll.

Reference: https://docs.merge.dev/merge-gateway/api-overview/videos/list

## Authentication

- `Authorization` header (bearer token, required) — Your production key sent as a bearer token.

## Request

### Query parameters

- `limit` (integer, optional, default: 20) — Videos per page; values outside 1 to 100 are clamped.
- `after` (string, optional) — Return videos after this video ID (the previous page's `last_id`).
- `order` (enum, optional, default: desc) — `desc` for newest first, `asc` for oldest first.
  - Allowed values: `asc`, `desc`

## Response

### 200

A page of video jobs.

- `data` (list of VideoJobSchema, required)
- `object` ("list", optional, default: list)
- `first_id` (string, optional, nullable) — ID of the first video on this page.
- `last_id` (string, optional, nullable) — ID of the last video on this page; pass it as `after` to get the next page.
- `has_more` (boolean, optional, default: false) — Whether more videos follow this page.

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### VideoJobSchema

An asynchronous video generation job.

- `id` (string, required) — Video job ID.
- `status` (string, required) — Job status, starting at `queued`; poll until it is `completed` or `failed`.
- `model` (string, required) — Model running the job.
- `object` ("video", optional, default: video)
- `seconds` (string, optional, nullable) — Clip length in seconds.
- `size` (string, optional, nullable) — Output resolution.
- `created_at` (integer, optional, nullable) — Unix timestamp in seconds.
- `progress` (integer, optional, nullable) — Progress percentage, when the provider reports it.
- `error` (map from string to any, optional, nullable) — Error details for a failed job.
- `cost` (double, optional, nullable) — Cost of the job in USD, set once it completes; failed jobs are not billed.

### ValidationError

Single field-level validation error. `loc` is the JSON path to the offending field, `msg` is a human-readable explanation, and `type` is a stable machine-readable error code.

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)
- `input` (any, optional)
- `ctx` (ValidationErrorCtx, optional)

### ValidationErrorLocItems

### ValidationErrorCtx

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "string",
      "status": "string",
      "model": "string",
      "object": "video",
      "seconds": "string",
      "size": "string",
      "created_at": 1,
      "progress": 1,
      "error": {},
      "cost": 1.1
    }
  ],
  "object": "list",
  "first_id": "string",
  "last_id": "string",
  "has_more": false
}
```

**SDK Code**

```python
import requests

url = "https://api-gateway.merge.dev/v1/videos"

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript
const url = 'https://api-gateway.merge.dev/v1/videos';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api-gateway.merge.dev/v1/videos"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api-gateway.merge.dev/v1/videos")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api-gateway.merge.dev/v1/videos")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-gateway.merge.dev/v1/videos', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api-gateway.merge.dev/v1/videos");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-gateway.merge.dev/v1/videos")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```