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

# Video download URL (Beta)

> Issue a temporary signed download URL for a completed video generation.

Returns a short-lived signed URL for downloading rendered video content without streaming the binary through the API response body.

Use this when you need a temporary direct download link for a completed video job. Optional request fields let you choose:

* `ttl_seconds` for link lifetime
* `disposition` as `attachment` or `inline`
* `index` when a generation has multiple outputs

The response returns:

* `download_url`
* `expires_at`

This is the preferred path for handing completed video output to browsers or external download clients.


## OpenAPI

````yaml POST /videos/{video_id}/download_url
openapi: 3.0.3
info:
  title: AI Stats Gateway API
  description: >-
    A gateway API for accessing various AI models with OpenAI-compatible
    endpoints.
  version: 1.0.0
  contact:
    name: AI Stats
    url: https://docs.ai-stats.phaseo.app
    email: danielbutler500@gmail.com
servers:
  - url: https://api.phaseo.app/v1
security:
  - BearerAuth: []
tags:
  - name: Gateway
    description: Core AI Stats Gateway operations.
paths:
  /videos/{video_id}/download_url:
    post:
      tags:
        - Gateway
      summary: Create a signed video download URL
      description: Returns a signed first-party download URL for a rendered video.
      operationId: createVideoDownloadUrl
      parameters:
        - name: video_id
          in: path
          required: true
          description: The ID of the video generation request.
          schema:
            type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  minimum: 0
                ttl_seconds:
                  type: integer
                  minimum: 1
                disposition:
                  type: string
                  enum:
                    - attachment
                    - inline
      responses:
        '200':
          description: Signed download URL
          content:
            application/json:
              schema:
                type: object
                properties:
                  download_url:
                    type: string
                  expires_at:
                    type: integer
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication

````