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

# Video Content

> Serves a video NanoGPT stores. Status responses read by the creating account (or for an x402 job, or through a statusUrl) return these URLs signed (expires, sig), good for 24 hours without an API key; anyone else reading an older job by its ID alone gets none. After that, poll the status again for a fresh one, or fetch it with the creating account's API key or session.

## Overview

Serves a finished video (or a Sora 2 thumbnail or spritesheet) that NanoGPT stores. NanoGPT keeps it on its servers for about a day after storing it, so download the videos you want to keep. You normally don't build these URLs: the status endpoints return them.

In the NanoGPT web app, new generated videos are saved in the browser where they finish when storage space is available. If a video cannot be saved, the app asks you to download it. Clearing browser data removes these saved videos, so download the ones you want to keep for good. API clients must download and store their own copies; this endpoint does not save videos on their devices.

### Access

A status response signs these URLs (`expires`, `sig`) when it is read by the account that created the job, for a job paid anonymously with x402, or through a `statusUrl`; a signed URL works without an API key for 24 hours. Anyone else reading an older job by its ID alone gets no URL: NanoGPT never hands out an unsigned one. After that, poll the status endpoint again for a fresh signed URL, or fetch the URL with the creating account's API key (`x-api-key`) or session.

A URL without a valid signature (unsigned, or past its 24 hours) is served only to the account that created the job, through its API key or session. Anyone else gets `404 Not Found`, as for an unknown job; if the owner check cannot complete, the response is `503` and can be retried.

### Endpoint

```
GET /api/generate-video/content
```

### Query parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `runId` | string | Yes | The job ID (`vid_...`) or provider run ID, as in the URL a status response returned |
| `model` | string | Yes | The model, as in that URL |
| `variant` | string | No | `video` (default); for Sora 2 also `thumbnail` or `spritesheet` |
| `expires`, `sig` | string | No | The signature a status response added; good for 24 hours |

## Usage

```bash theme={null}
curl -s "https://api.nano-gpt.com/api/generate-video/content?runId=RUN_ID&model=sora-2&variant=video" \
  -H "x-api-key: YOUR_API_KEY" | jq .
```


## OpenAPI

````yaml GET /generate-video/content
openapi: 3.1.0
info:
  title: NanoGPT API
  description: >-
    API documentation for the NanoGPT language, image, video, speech-to-text,
    and text-to-speech generation services
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.nano-gpt.com/api
    description: Direct API host
  - url: https://nano-gpt.com/api
    description: Website host, for IPv6-only clients and the routes that name it
security: []
paths:
  /generate-video/content:
    get:
      description: >-
        Serves a video NanoGPT stores. Status responses read by the creating
        account (or for an x402 job, or through a statusUrl) return these URLs
        signed (expires, sig), good for 24 hours without an API key; anyone else
        reading an older job by its ID alone gets none. After that, poll the
        status again for a fresh one, or fetch it with the creating account's
        API key or session.
      parameters:
        - name: runId
          in: query
          description: Run ID returned from the POST /generate-video response
          required: true
          schema:
            type: string
        - name: model
          in: query
          description: The model, as in the URL a status response returned
          required: true
          schema:
            type: string
        - name: variant
          in: query
          description: video (default); for Sora 2 also thumbnail or spritesheet
          required: false
          schema:
            type: string
        - name: expires
          in: query
          description: Expiry (Unix seconds) of the signature a status response added
          required: false
          schema:
            type: string
        - name: sig
          in: query
          description: Signature a status response added; valid until expires
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Content response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          description: Bad Request - Missing or invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - Invalid or missing API key
        '404':
          description: 'Not found: an unknown job'
        '500':
          description: Server Error - Failed to retrieve content
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - apiKeyAuth: []
components:
  schemas:
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.