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

# List Videos

> Get all videos from your projects with detailed information including duration, status, and download URLs

## Overview

This endpoint returns all videos extracted from your projects (excludes templates). It intelligently fetches videos from multiple projects until reaching your requested limit. Each video includes detailed metadata like duration in frames, download URL, and processing status.

<Info>
  Videos are extracted from projects in order. The endpoint will fetch videos from multiple projects to reach your requested limit, or return fewer if no more are available.
</Info>

### Query Parameters

<ParamField query="type" type="string" default="all">
  Filter by project/video type:

  * `class`: Educational videos
  * `ugc_ads`: UGC advertising
  * `ugc_video`: UGC videos
  * `script_to_video`: Script to Videos
  * `hook_demo`: Hook + Demo
  * `tiktok_slideshow`: TikTok slideshows
  * `all`: All video types (default)
</ParamField>

<ParamField query="status" type="string">
  Filter by video status:

  * `draft`: Draft videos
  * `processing`: Currently processing
  * `completed`: Completed videos
  * `failed`: Failed videos
</ParamField>

<ParamField query="limit" type="number" default="50">
  Maximum number of videos to return (max: 100). The endpoint will fetch from multiple projects until reaching this limit or until no more videos are available.
</ParamField>

<ParamField query="offset" type="number" default="0">
  Pagination offset for projects
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.slidevid.ai/v1/video/list?type=all&status=completed&limit=50" \
    -H "x-api-key: your_api_key_here"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.slidevid.ai/v1/video/list?type=all&status=completed&limit=50', {
    headers: { 'x-api-key': 'your_api_key_here' }
  });
  const { success, data } = await response.json();
  const { videos, total } = data;
  console.log(`Found ${total} completed videos (showing ${videos.length})`);
  videos.forEach(v => console.log(`${v.name}: ${v.durationInFrames} frames`));
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://api.slidevid.ai/v1/video/list',
      params={'type': 'all', 'status': 'completed', 'limit': 50},
      headers={'x-api-key': 'your_api_key_here'}
  )
  data = response.json()['data']
  videos = data['videos']
  print(f'Found {data["total"]} videos, showing {len(videos)}')
  for video in videos:
      duration_seconds = video['durationInFrames'] / 25  # 25fps
      print(f'{video["name"]}: {duration_seconds}s')
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "videos": [
        {
          "id": "vid_abc123",
          "name": "Product Tutorial",
          "status": "COMPLETED",
          "url": "https://signed-s3-url.example.com/videos/vid_abc123.mp4",
          "durationInFrames": 6250,
          "projectId": "proj_class_001",
          "thumbnail": "https://cdn.slidevid.ai/thumbnails/vid_abc123.jpg",
          "size": 15728640,
          "progress": 100,
          "message": "Video ready",
          "createdAt": "2024-01-15T10:00:00Z",
          "updatedAt": "2024-01-15T10:05:00Z"
        },
        {
          "id": "vid_def456",
          "name": "Social Media Clip",
          "status": "COMPLETED",
          "url": "https://signed-s3-url.example.com/videos/vid_def456.mp4",
          "durationInFrames": 3750,
          "projectId": "proj_ugc_ads_002",
          "thumbnail": "https://cdn.slidevid.ai/thumbnails/vid_def456.jpg",
          "size": 9437184,
          "progress": 100,
          "message": "Video ready",
          "createdAt": "2024-01-15T11:00:00Z",
          "updatedAt": "2024-01-15T11:03:00Z"
        }
      ],
      "total": 2,
      "limit": 50,
      "offset": 0
    }
  }
  ```
</ResponseExample>

## Video Status

Each video has one of these statuses:

<AccordionGroup>
  <Accordion title="draft" icon="file">
    Video is created but not yet processing
  </Accordion>

  <Accordion title="processing" icon="spinner">
    Video is currently being generated (usually 2-5 minutes)
  </Accordion>

  <Accordion title="completed" icon="check">
    Video is ready! Download URL is available
  </Accordion>

  <Accordion title="failed" icon="xmark">
    Video generation failed - check the `message` field for details
  </Accordion>
</AccordionGroup>

## Pagination

For large video lists, use pagination:

```javascript Pagination Example theme={null}
async function getAllVideos() {
  const allVideos = [];
  let offset = 0;
  const limit = 100;
  
  while (true) {
    const response = await fetch(
      `https://api.slidevid.ai/v1/video/list?limit=${limit}&offset=${offset}`,
      { headers: { 'x-api-key': API_KEY } }
    );
    
    const { videos, total } = await response.json().data;
    allVideos.push(...videos);
    
    if (allVideos.length >= total) break;
    offset += limit;
  }
  
  return allVideos;
}
```

## Use Cases

<CardGroup cols={2}>
  <Card title="Dashboard View" icon="table">
    Build a video management dashboard
  </Card>

  <Card title="Status Monitoring" icon="chart-line">
    Track video processing status
  </Card>

  <Card title="Analytics" icon="chart-bar">
    Analyze video creation trends
  </Card>

  <Card title="Bulk Operations" icon="layer-group">
    Manage multiple videos at once
  </Card>
</CardGroup>

## Filtering Examples

<Tabs>
  <Tab title="By Status">
    ```bash theme={null}
    # Get all completed videos
    curl "https://api.slidevid.ai/v1/video/list?status=completed" \
      -H "x-api-key: your_api_key_here"
    ```
  </Tab>

  <Tab title="By Type">
    ```bash theme={null}
    # Get all educational videos
    curl "https://api.slidevid.ai/v1/video/list?type=class" \
      -H "x-api-key: your_api_key_here"
    ```
  </Tab>

  <Tab title="Combined">
    ```bash theme={null}
    # Get completed UGC ads
    curl "https://api.slidevid.ai/v1/video/list?type=ugc_ads&status=completed&limit=20" \
      -H "x-api-key: your_api_key_here"
    ```
  </Tab>
</Tabs>

## Related Endpoints

<CardGroup cols={3}>
  <Card title="Video Details" icon="info" href="/api-reference/video/details">
    Get a specific video's details
  </Card>

  <Card title="Create Video" icon="plus" href="/api-reference/video/create">
    Create a new video
  </Card>

  <Card title="List Templates" icon="clone" href="/api-reference/template/list">
    View your templates
  </Card>
</CardGroup>


## OpenAPI

````yaml GET /v1/video/list
openapi: 3.0.0
info:
  title: SlideVid API
  version: 1.0.0
  description: AI Video Generation API
servers:
  - url: https://api.slidevid.ai
security:
  - ApiKeyAuth: []
paths:
  /v1/video/list:
    get:
      tags: []
      summary: List Videos from Projects
      description: >-
        Get all videos from your projects. Extracts videos from projects
        (excludes templates) and returns them with video details including
        duration, status, and download URLs.
      operationId: listVideos
      parameters:
        - name: type
          in: query
          description: >-
            Filter by project/video type. Use 'all' to get videos from all
            project types.
          required: false
          schema:
            type: string
            enum:
              - class
              - ugc_ads
              - ugc_video
              - script_to_video
              - hook_demo
              - tiktok_slideshow
              - all
            default: all
        - name: status
          in: query
          description: Filter by video status
          required: false
          schema:
            type: string
            enum:
              - draft
              - processing
              - completed
              - failed
        - name: limit
          in: query
          description: >-
            Maximum number of projects to fetch (results will include all videos
            from those projects)
          required: false
          schema:
            type: integer
            default: 50
            maximum: 100
        - name: offset
          in: query
          description: Pagination offset for projects
          required: false
          schema:
            type: integer
            default: 0
      responses:
        '200':
          description: Videos retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      videos:
                        type: array
                        description: List of videos from projects
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: Unique video identifier
                            name:
                              type: string
                              description: Video name/title
                            status:
                              type: string
                              enum:
                                - STARTED
                                - COMPLETED
                                - FAILED
                              description: Current video processing status
                            url:
                              type: string
                              description: >-
                                Signed URL to download the video (only available
                                when status is COMPLETED)
                            durationInFrames:
                              type: integer
                              description: Duration of the video in frames (at 25fps)
                            projectId:
                              type: string
                              description: ID of the project this video belongs to
                            thumbnail:
                              type: string
                              nullable: true
                              description: URL to video thumbnail image
                            size:
                              type: integer
                              description: Video file size in bytes
                            progress:
                              type: integer
                              minimum: 0
                              maximum: 100
                              description: Processing progress percentage (0-100)
                            message:
                              type: string
                              nullable: true
                              description: Status message or error details
                            createdAt:
                              type: string
                              format: date-time
                              description: Video creation timestamp
                            updatedAt:
                              type: string
                              format: date-time
                              description: Last update timestamp
                      total:
                        type: integer
                        description: Total number of videos returned
                      limit:
                        type: integer
                        description: Limit parameter used
                      offset:
                        type: integer
                        description: Offset parameter used
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````