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

# Fetch Video Batch

> Retrieve every video of a batch at once using the batch ID returned by the Video Batch API.

## Request

Send a `POST` request to below endpoint to return every request of a batch. Where `{id}` is the `batch_id` returned by the [Video Batch](/video-api/video-batch) endpoint. This endpoint does not generate new video, it reports the current state of the batch.

```curl curl theme={"theme":{"light":"github-light","dark":"github-dark"}}
--request POST 'https://modelslab.com/api/v6/video/batch/fetch/{id}' \
```

## Body

```json json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "key": "your_api_key"
}
```

## Response

`status` is `processing` while any request is still running, `success` once every request has succeeded, and `failed` once every request has failed. `output` collects every finished video across the batch, in request order, so it grows as videos land. Each entry in `results` is the same body the single [Fetch Video](/video-api/fetch-video) endpoint returns for that request, plus its `index` and `track_id`.

```json json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "status": "processing",
    "id": 48213,
    "batch_id": 48213,
    "message": "1 of 3 requests still processing. Try Again",
    "tip": "Get 20x faster image generation using enterprise plan. Click here : https://modelslab.com/enterprise",
    "output": [
        "https://cdn2.modelslab.com/generations/48214.mp4"
    ],
    "request_counts": { "total": 3, "processing": 1, "succeeded": 1, "failed": 1 },
    "results": [
        {
            "index": 0,
            "track_id": "shot-1",
            "status": "success",
            "id": 48214,
            "output": ["https://cdn2.modelslab.com/generations/48214.mp4"],
            "proxy_links": {}
        },
        {
            "index": 1,
            "track_id": "shot-2",
            "status": "processing",
            "message": "Try Again",
            "output": "",
            "tip": "Get 20x faster image generation using enterprise plan. Click here : https://modelslab.com/enterprise"
        },
        {
            "index": 2,
            "track_id": "shot-3",
            "status": "failed",
            "id": 48216,
            "message": "Timed out after 8 minutes",
            "output": "",
            "refunded": true
        }
    ]
}
```

A failed entry carries `refunded: true` when its charge was reversed, which is the case for every request the 8-minute batch timeout fails.

An unknown `batch_id`, or one that belongs to another account, answers:

```json json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "status": "failed",
    "id": "",
    "batch_id": "",
    "message": "Batch not found",
    "output": "",
    "results": []
}
```


## OpenAPI

````yaml POST /video/batch/fetch/{id}
openapi: 3.1.0
info:
  title: ModelsLab Video API
  description: >-
    A comprehensive API for AI-driven video generation including text-to-video,
    image-to-video, scene transitions, and video management capabilities
  license:
    name: MIT
  version: 6.0.0
servers:
  - url: https://modelslab.com/api/v6
security: []
paths:
  /video/batch/fetch/{id}:
    post:
      summary: Fetch every video of a batch
      description: >-
        Reports the current state of every request in a batch. status is
        processing while any request is still running, success once all
        succeeded, failed once all failed. output collects every finished video
        across the batch in request order.
      parameters:
        - name: id
          in: path
          description: The batch_id returned by POST /video/batch
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FetchVideoRequest'
      responses:
        '200':
          description: >-
            Batch status. An unknown batch id answers status failed with message
            "Batch not found".
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoBatchResponse'
        '401':
          description: Unauthorized - invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    FetchVideoRequest:
      type: object
      required:
        - key
      properties:
        key:
          type: string
          description: Your API Key used for request authorization
    VideoBatchResponse:
      type: object
      description: >-
        Keyed like a single video response (status, id, output, message, tip)
        with the batch fields on top
      properties:
        status:
          type: string
          enum:
            - processing
            - success
            - failed
          description: >-
            processing on submit and while any request is still running; success
            once all succeeded; failed once all failed
        id:
          type: integer
          description: >-
            The batch id. Same value as batch_id; drawn from the same counter as
            video ids so the two never collide
        batch_id:
          type: integer
        message:
          type: string
        tip:
          type: string
        output:
          type: array
          items:
            type: string
            format: uri
          description: >-
            Every finished video across the batch in request order; empty on
            submit
        future_links:
          type: array
          items:
            type: string
            format: uri
          description: 'On submit: the URL every request will publish to, in request order'
        fetch_result:
          type: string
          format: uri
          description: 'On submit: URL to poll the whole batch'
        eta:
          type: integer
          description: 'On submit: the largest per-request estimate, in seconds'
        meta:
          type: object
          additionalProperties: true
          description: 'On submit: the envelope inputs (model_id, track_id, webhook)'
        timeout_minutes:
          type: integer
          description: 'On submit: requests not finished by then are failed and refunded'
        discount:
          type: number
          description: 'On submit: fraction taken off every request''s single-request price'
        request_counts:
          type: object
          properties:
            total:
              type: integer
            processing:
              type: integer
            succeeded:
              type: integer
            failed:
              type: integer
        results:
          type: array
          items:
            $ref: '#/components/schemas/VideoBatchResult'
    Error:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
          description: Error message description
    VideoBatchResult:
      type: object
      description: >-
        One request of the batch: the same body the single endpoint returns for
        it, plus its position and correlation id
      additionalProperties: true
      properties:
        index:
          type: integer
          description: Position in the submitted requests array
        track_id:
          oneOf:
            - type: string
            - type: 'null'
        status:
          type: string
          enum:
            - processing
            - success
            - failed
            - error
        id:
          type: integer
          description: This request's own video id, usable on /video/fetch/{id}
        output:
          oneOf:
            - type: array
              items:
                type: string
                format: uri
            - type: string
          description: The finished video URL(s); empty until then
        future_links:
          type: array
          items:
            type: string
            format: uri
        fetch_result:
          type: string
          format: uri
        eta:
          type: integer
        message:
          type: string
        refunded:
          type: boolean
          description: 'On a failed result: whether its charge was reversed'

````