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

# Get Video Status

> Retrieves the current status of a video generation run by passing in the Run ID returned from the `POST /short` endpoint. Can be polled periodically to check if the video is completed.

## Base URL

```bash theme={null}
https://longstories.ai/api/v1
```


## OpenAPI

````yaml GET /short
openapi: 3.0.3
info:
  title: Video Generation API
  version: 1.0.0
  description: >-
    Generate AI-powered videos (up to 10 minutes) from text prompts or existing
    scripts.
servers:
  - url: https://longstories.ai/api/v1
    description: Production API Server
security: []
paths:
  /short:
    get:
      summary: Get Video Generation Status
      description: >-
        Retrieves the current status of a video generation run by passing in the
        Run ID returned from the `POST /short` endpoint. Can be polled
        periodically to check if the video is completed.
      operationId: getShortVideoStatus
      parameters:
        - name: runId
          in: query
          required: true
          description: The generation run ID previously returned by the POST /short call.
          schema:
            type: string
      responses:
        '200':
          description: >-
            Successfully retrieved the run's current status and, if complete,
            the video download URL and size.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessResponse'
                  - properties:
                      data:
                        $ref: '#/components/schemas/ShortGenerationStatusResponse'
              example:
                data:
                  status: COMPLETED
                  isCompleted: true
                  isSuccess: true
                  output:
                    url: https://storage.example.com/videos/abc123.mp4
                    size: 15728640
                  error: null
                  projectId: proj_123abc
                requestId: req_123abc
        '400':
          description: Invalid request or missing `runId` query parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: VAL_MISSING_FIELD
                  message: Required field is missing
                  details:
                    field: runId
                    reason: Run ID is required
                  requestId: req_901stu
        '401':
          description: 'Unauthorized: invalid or missing API key.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: No generation run found with the specified `runId`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: BIZ_RESOURCE_NOT_FOUND
                  message: Run not found
                  requestId: req_567yz
                  details:
                    runId: invalid-run-id
        '429':
          description: >-
            Rate limit exceeded (too many requests). Slow down polling frequency
            if you receive this often.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: >-
            Internal server error or unexpected error encountered while
            retrieving status.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    SuccessResponse:
      type: object
      description: Generic success envelope containing data and a request identifier.
      properties:
        data:
          type: object
          description: The primary payload returned by the endpoint (if applicable).
        requestId:
          type: string
          description: >-
            Unique identifier associated with the request for
            debugging/tracking.
      required:
        - data
    ShortGenerationStatusResponse:
      type: object
      description: Describes the current progress or final result of a video generation.
      properties:
        status:
          type: string
          enum:
            - WAITING_FOR_DEPLOY
            - QUEUED
            - EXECUTING
            - REATTEMPTING
            - FROZEN
            - COMPLETED
            - CANCELED
            - FAILED
            - CRASHED
            - INTERRUPTED
            - SYSTEM_FAILURE
            - TIMED_OUT
            - DELAYED
            - EXPIRED
          description: >-
            Indicates the generation state. Will be 'COMPLETED' if success, or
            'FAILED'/'CRASHED' if error encountered.
        isCompleted:
          type: boolean
          description: True if the run is finished (either successfully or with an error).
        isSuccess:
          type: boolean
          description: >-
            True only if the final status was a successful generation (e.g.,
            'COMPLETED').
        output:
          type: object
          nullable: true
          properties:
            url:
              type: string
              description: Link to the final MP4 video if `status` is 'COMPLETED'.
            size:
              type: integer
              description: Size of the generated video in bytes.
          description: Contains the final video details if generation was successful.
        error:
          type: object
          nullable: true
          description: >-
            Provides an error message and additional context if the run ended
            with a failure.
          properties:
            message:
              type: string
            details:
              type: object
        projectId:
          type: string
          description: Unique identifier for the project associated with this generation.
    ErrorResponse:
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: >-
                Short code describing the error type (e.g., VAL_INVALID_FORMAT,
                AUTH_INVALID_KEY).
            message:
              type: string
              description: Human-readable explanation of the error.
            details:
              type: object
              description: >-
                Additional diagnostic info, such as which field is invalid or
                how many credits are needed.
            requestId:
              type: string
              description: >-
                Unique identifier for debugging. Provided in logs for
                cross-reference.
          required:
            - code
            - message
      required:
        - error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your API key for authenticating requests. Example: 'x-api-key:
        MY_SECRET_KEY'

````