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

# Retrieve video generation status

> Retrieve the current status for a video generation request. The response status is `pending`, `failed`, or `completed`.




## OpenAPI

````yaml /openapi.yaml get /v2/videos/generations/{id}
openapi: 3.1.0
info:
  title: getimg.ai API
  version: 2.0.0
  description: |
    The getimg.ai API for image and video generation.

    Authenticate with a bearer token in the format `sk_<secret>`.
servers:
  - url: https://api.getimg.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Images
    description: Endpoints for image generation.
  - name: Models
    description: Endpoints for listing available developer models.
  - name: Videos
    description: Endpoints for video generation.
paths:
  /v2/videos/generations/{id}:
    get:
      tags:
        - Videos
      summary: Retrieve video generation status
      description: >
        Retrieve the current status for a video generation request. The response
        status is `pending`, `failed`, or `completed`.
      operationId: getVideoGenerationStatus
      parameters:
        - $ref: '#/components/parameters/GenerationIdPathParam'
      responses:
        '200':
          description: Current video generation status.
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoGenerationStatusResponse'
              examples:
                pending:
                  summary: Pending status
                  value:
                    id: req-01HXYZVIDEO1234
                    status: pending
                failed:
                  summary: Failed status
                  value:
                    id: req-01HXYZVIDEO1234
                    status: failed
                    error:
                      message: Upstream provider request timed out.
                      code: server_error
                completed:
                  summary: Completed video generation
                  value:
                    id: req-01HXYZVIDEO1234
                    status: completed
                    model: seedance-v1-pro
                    data:
                      - url: >-
                          /v2/downloads/req-01HXYZVIDEO1234/0?exp=1760000000&sig=ca4f0f5a5f7d2ca9bc9c7b53b2432d7840a971c11c9161d3d2f29e1cb6e77f8f
                        width: 1920
                        height: 1080
                        duration: 10
                        fps: 24
                        has_sound: true
                        mime_type: video/mp4
                        deletes_at: '2026-05-02T12:30:00.000Z'
                    usage:
                      total_cost: 5
                      billable_unit: video_second
                      unit_price: 0.5
                      quantity: 10
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitError'
        '500':
          $ref: '#/components/responses/ServerError'
      x-codeSamples:
        - lang: javascript
          label: Node.js
          source: >
            import GetimgAI from "getimg-ai";


            const client = new GetimgAI();


            const result = await
            client.videos.generations.retrieve("req-01HXYZVIDEO1234");
        - lang: python
          label: Python
          source: |
            from getimg import GetimgAI

            client = GetimgAI()

            result = client.videos.generations.retrieve("req-01HXYZVIDEO1234")
components:
  parameters:
    GenerationIdPathParam:
      name: id
      in: path
      required: true
      description: Generation request ID.
      schema:
        type: string
        minLength: 1
  headers:
    X-RateLimit-Limit:
      description: Maximum requests allowed in the current rate-limit window.
      schema:
        type: string
        pattern: ^[0-9]+$
      example: '60'
    X-RateLimit-Remaining:
      description: Remaining requests in the current rate-limit window.
      schema:
        type: string
        pattern: ^[0-9]+$
      example: '59'
    X-RateLimit-Reset:
      description: Unix timestamp (seconds) when the current rate-limit window resets.
      schema:
        type: string
        pattern: ^[0-9]+$
      example: '1760000042'
    Retry-After:
      description: Number of seconds to wait before retrying.
      schema:
        type: string
        pattern: ^[0-9]+$
      example: '42'
  schemas:
    VideoGenerationStatusResponse:
      oneOf:
        - $ref: '#/components/schemas/VideoGenerationPendingResponse'
        - $ref: '#/components/schemas/VideoGenerationFailedResponse'
        - $ref: '#/components/schemas/VideoGenerationCompletedResponse'
      discriminator:
        propertyName: status
        mapping:
          pending:
            $ref: '#/components/schemas/VideoGenerationPendingResponse'
          failed:
            $ref: '#/components/schemas/VideoGenerationFailedResponse'
          completed:
            $ref: '#/components/schemas/VideoGenerationCompletedResponse'
    VideoGenerationPendingResponse:
      type: object
      required:
        - id
        - status
      properties:
        id:
          type: string
          description: The ID of the generation request.
        status:
          description: The status of the generation request.
          type: string
          const: pending
    VideoGenerationFailedResponse:
      type: object
      required:
        - id
        - status
        - error
      properties:
        id:
          type: string
          description: The ID of the generation request.
        status:
          type: string
          const: failed
          description: The status of the generation request.
        error:
          $ref: '#/components/schemas/VideoGenerationFailedError'
    VideoGenerationCompletedResponse:
      type: object
      required:
        - id
        - status
        - model
        - data
      properties:
        id:
          type: string
          description: The ID of the generation request.
        status:
          type: string
          const: completed
          description: The status of the generation request.
        model:
          type: string
          description: The model used for the generation.
        data:
          type: array
          description: The media items for the generation.
          items:
            $ref: '#/components/schemas/VideoDataItem'
        usage:
          $ref: '#/components/schemas/Usage'
    PublicApiError:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
            - type
            - param
            - code
          properties:
            message:
              type: string
            type:
              type: string
              const: invalid_request_error
            param:
              anyOf:
                - type: string
                - type: 'null'
            code:
              type: string
              enum:
                - invalid_api_key
                - parameter_missing
                - invalid_parameter
                - quota_exceeded
                - rate_limit
                - content_policy_violation
                - not_found
                - server_error
            doc_url:
              type: string
              format: uri
    VideoGenerationFailedError:
      type: object
      required:
        - message
        - code
      properties:
        message:
          type: string
          description: The error message.
        code:
          type: string
          description: The error code.
    VideoDataItem:
      type: object
      required:
        - url
        - mime_type
        - deletes_at
      properties:
        url:
          type: string
          description: Signed temporary download URL.
        width:
          anyOf:
            - type: integer
            - type: 'null'
          description: The width of the video in pixels.
        height:
          anyOf:
            - type: integer
            - type: 'null'
          description: The height of the video in pixels.
        duration:
          anyOf:
            - type: number
            - type: 'null'
          description: The duration of the video in seconds.
        fps:
          anyOf:
            - type: number
            - type: 'null'
          description: The frame rate of the video.
        has_sound:
          type: boolean
          description: Whether the video has and audio track.
        mime_type:
          type: string
          description: The MIME type of the video.
        deletes_at:
          type: string
          format: date-time
          description: The date and time the video will be deleted.
    Usage:
      type: object
      required:
        - total_cost
        - billable_unit
        - unit_price
        - quantity
      properties:
        total_cost:
          type: number
          description: Total cost of the generation.
        billable_unit:
          type: string
          description: The unit of the cost.
        unit_price:
          type: number
          description: The price of the unit.
        quantity:
          type: number
          description: The quantity of the generation.
  responses:
    BadRequestError:
      description: The request payload or parameters are invalid.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicApiError'
          examples:
            invalid_parameter:
              value:
                error:
                  message: Unsupported resolution '4K' for model 'seedream-5-lite'.
                  type: invalid_request_error
                  param: resolution
                  code: invalid_parameter
            parameter_missing:
              value:
                error:
                  message: Required parameter 'prompt' is missing.
                  type: invalid_request_error
                  param: prompt
                  code: parameter_missing
    UnauthorizedError:
      description: Authentication failed due to a missing or invalid API key.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicApiError'
          examples:
            invalid_api_key:
              value:
                error:
                  message: >-
                    Incorrect API key provided. You can manage your API keys at
                    https:/getimg.ai/developer/api-keys
                  type: invalid_request_error
                  param: null
                  code: invalid_api_key
                  doc_url: https://docs.getimg.ai/#topic-authentication
    NotFoundError:
      description: The requested resource was not found.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicApiError'
          examples:
            not_found:
              value:
                error:
                  message: The resource doesn't exist.
                  type: invalid_request_error
                  param: null
                  code: not_found
    RateLimitError:
      description: A rate or concurrency limit was exceeded.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicApiError'
          examples:
            rate_limited:
              value:
                error:
                  message: Too many requests hit the API too quickly.
                  type: invalid_request_error
                  param: null
                  code: rate_limit
    ServerError:
      description: An unexpected server error occurred.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicApiError'
          examples:
            server_error:
              value:
                error:
                  message: Something went wrong on our end.
                  type: invalid_request_error
                  param: null
                  code: server_error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: |
        Send your API key as a bearer token:
        `Authorization: Bearer sk_<secret>`.

````