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

> ## Agent Instructions
> The Deepshi API is an OpenAI-compatible gateway. Base URL: https://api.deepshi.ai/v1. API keys start with sk-bf- and go in the Authorization: Bearer header. Prefer the official OpenAI SDKs pointed at the Deepshi base URL. Model ids are clean with no provider prefix (e.g. deepshi-3.0, claude-opus-4.8, gpt-5.5). Chat and image requests are synchronous; video and music requests are asynchronous job APIs (create, then poll). Every synchronous response carries usage.cost.total_cost in USD. Do not reference the internal /api/* admin plane or virtual keys.

# Retrieve a video job

> Poll a job for its status and result. When `status` is `completed`, the finished video is under `videos[]`. A video id is scoped to the key that created it.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/videos/{video_id}
openapi: 3.1.0
info:
  title: Deepshi API
  description: >-
    OpenAI-compatible REST API for Deepshi's own models and leading third-party
    models. Authenticate with your Deepshi API key as a bearer token, and
    reference a model by its id (e.g. `deepshi-3.0`, `gpt-4o`) in the `model`
    field.
  version: 1.0.0
servers:
  - url: https://api.deepshi.ai
    description: Deepshi API
security:
  - BearerAuth: []
paths:
  /v1/videos/{video_id}:
    get:
      tags:
        - Videos
      summary: Retrieve a video job
      description: >-
        Poll a job for its status and result. When `status` is `completed`, the
        finished video is under `videos[]`. A video id is scoped to the key that
        created it.
      operationId: getVideo
      parameters:
        - name: video_id
          in: path
          required: true
          schema:
            type: string
          description: The job id returned by `POST /v1/videos`.
      responses:
        '200':
          description: The video job.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoJob'
              example:
                id: vid_a1b2c3
                object: video
                model: grok-imagine-video
                status: completed
                size: 480p
                seconds: '4'
                created_at: 1783695957
                videos:
                  - type: url
                    url: https://media.cdn-deepshi.com/videos/019f4c8f-....mp4
                    content_type: video/mp4
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/VideoNotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    VideoJob:
      type: object
      description: A video generation job.
      properties:
        id:
          type: string
          description: The job id. Pass it to the retrieve, content, and delete endpoints.
        object:
          type: string
          description: Object type, always `video`.
          example: video
        model:
          type: string
          description: The video model id you requested.
        status:
          type: string
          enum:
            - queued
            - in_progress
            - completed
            - failed
          description: Lifecycle state of the job.
        size:
          type: string
          description: The resolution the job bills at.
        seconds:
          type: string
          description: The clip length the job bills at, in seconds.
        created_at:
          type: integer
          format: int64
          description: Unix timestamp when the job was created.
        completed_at:
          type: integer
          format: int64
          nullable: true
          description: Unix timestamp when the job completed.
        videos:
          type: array
          items:
            $ref: '#/components/schemas/VideoOutput'
          description: The generated video, present when `status` is `completed`.
        error:
          type: object
          nullable: true
          description: >-
            Present when `status` is `failed`. Explains the failure; the job is
            not charged.
          properties:
            code:
              type: string
            message:
              type: string
    VideoOutput:
      type: object
      properties:
        type:
          type: string
          description: Output kind, always `url`.
          example: url
        url:
          type: string
          description: Direct link to the finished `.mp4`.
        content_type:
          type: string
          description: Media type, always `video/mp4`.
    Error:
      type: object
      description: Error envelope, matching the OpenAI shape.
      required:
        - error
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: Human-readable description of the error.
            type:
              type: string
              description: >-
                Error category, e.g. `invalid_request_error` or
                `insufficient_quota`.
            code:
              type: string
              nullable: true
              description: >-
                Machine-readable error code, e.g. `invalid_api_key`,
                `model_not_found`, `insufficient_quota` (may be null).
            param:
              type: string
              nullable: true
              description: The request parameter the error relates to, when applicable.
  responses:
    Unauthorized:
      description: Missing, malformed, or unknown API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: Incorrect API key provided.
              type: invalid_request_error
              code: invalid_api_key
              param: null
    Forbidden:
      description: The key is revoked, or not permitted to use the requested model.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: The model does not exist or you do not have access to it.
              type: invalid_request_error
              code: model_not_found
              param: null
    VideoNotFound:
      description: No video with that id exists for your key, or the id is invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: Video not found.
              type: invalid_request_error
              code: video_not_found
              param: video_id
    RateLimited:
      description: Too many requests. Back off and retry.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: Rate limit reached. Please retry after a short delay.
              type: rate_limit_error
              code: rate_limit_exceeded
              param: null
    InternalError:
      description: Temporary server error. Retry with backoff.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: >-
                The server had an error while processing your request. Please
                retry.
              type: api_error
              code: null
              param: null
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'Your Deepshi API key, sent as `Authorization: Bearer <key>`.'

````