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

> ## Agent Instructions
> The Venice API is OpenAI-compatible: use any OpenAI SDK with the base URL `https://api.venice.ai/api/v1` and a Venice API key, or pay per request from a USDC wallet through x402 with no account.
> Read model IDs from `GET /models` or `GET /models/traits` at runtime instead of hardcoding them from memory or from these pages. Models are added and retired often.
> Every model's price is in https://docs.venice.ai/pricing.md. Quote video and audio jobs with `POST /video/quote` or `POST /audio/quote` before you queue them.
> Search these docs from an MCP client at https://docs.venice.ai/mcp. The full agent guide is https://docs.venice.ai/agents.md.

# Retrieve Video

> Retrieve a video generation result. Returns the video file if completed, or a status if the request is still processing.

If the `/video/queue` response included a `download_url`, download the finished file from that URL (not as binary from this endpoint). Otherwise, this endpoint returns the video. See [Private download links](https://docs.venice.ai/guides/media/video-generation.md#private-download-links) for how the link works, retries, and optional `DELETE`.

***


## OpenAPI

````yaml POST /video/retrieve
openapi: 3.0.0
info:
  description: The Venice.ai API.
  termsOfService: https://venice.ai/legal/tos
  title: Venice.ai API
  version: '20261130.171848'
  x-guidance: >-
    Venice.ai is an OpenAI-compatible inference API supporting text, image,
    audio, and video generation.


    **Authentication options:**

    - API Key: Use Bearer token in Authorization header

    - x402 Wallet: Use a prepaid x402 credit balance via EVM or Solana wallet
    (no account required)


    **For x402 wallet access:**

    1. POST /x402/top-up without headers to get payment requirements

    2. Choose one of the returned Base or Solana payment options and sign a USDC
    payment using the x402 SDK

    3. POST /x402/top-up with PAYMENT-SIGNATURE header to add credits

    4. Call a chat, image, audio or embeddings endpoint with SIGN-IN-WITH-X
    header (video and voice changer require an API key)


    **Pricing:** Prepaid credits consumed per request. Check /models for
    available models and their capabilities.
servers:
  - url: https://api.venice.ai/api/v1
security:
  - BearerAuth: []
tags:
  - description: >-
      Generate speech/audio, transcribe audio, and manage asynchronous audio
      generation jobs.
    name: Audio
  - description: >-
      Given a list of messages comprising a conversation, the model will return
      a response. Supports multimodal inputs including text, images, audio
      (input_audio), and video (video_url) for compatible models.
    name: Chat
  - description: >-
      Create vector embeddings from text. `input` must be a string or an array
      of strings. Token arrays are not supported. LangChain OpenAIEmbeddings
      must set `check_embedding_ctx_length=False` to send text instead of
      tiktoken IDs.
    name: Embeddings
  - description: >-
      Evaluate a state against typed questions and get structured answers
      (yes/no probabilities, option picks with distributions, rubric scores).
      **Beta**: This API is currently in beta and may be unstable.
      Request/response schemas and behavior may change without notice.
    name: Decisions
  - description: List and describe the various models available in the API.
    name: Models
  - description: Generate and manipulate images using AI models.
    name: Image
  - description: Generate videos using AI models.
    name: Video
  - description: List and retrieve character information for use in completions.
    name: Characters
  - description: >-
      Billing and usage analytics. **Beta**: This API is currently in beta and
      may be unstable. Endpoints, request/response schemas, and behavior may
      change without notice.
    name: Billing
  - description: Proxy JSON-RPC requests to blockchain nodes. Billed per credit.
    name: Crypto RPC
  - description: >-
      Wallet-based API access using the x402 protocol. No API key required —
      authenticate with an EVM or Solana wallet.


      **How it works:**

      1. **Authenticate** — Send a `SIGN-IN-WITH-X` header (base64-encoded
      signed SIWX payload) with any request. EVM wallets sign an EIP-4361 SIWE
      message; Solana wallets sign the Solana SIWX message with Ed25519. See the
      `siwx` security scheme for the exact format.

      2. **Top up** — `POST /x402/top-up` without a payment header returns an
      `accepts` array with Base and Solana USDC payment options. Choose one
      entry, sign it using the x402 SDK (`npm install x402`), and re-submit with
      the `PAYMENT-SIGNATURE` header (the legacy `X-402-Payment` and `X-PAYMENT`
      names are also accepted).

      3. **Use an inference endpoint** — Chat, image, audio and embeddings
      endpoints accept `siwx` as an alternative to `BearerAuth`; video and voice
      changer require `BearerAuth`. Charges are deducted from your x402 credit
      balance.

      4. **Monitor balance** — `GET /x402/balance/{walletAddress}` returns your
      current balance. The `X-Balance-Remaining` response header on inference
      calls also reports it.


      **Quick start (5 lines):**

      ```

      import { VeniceClient } from 'venice-x402-client'

      const venice = new VeniceClient(process.env.WALLET_KEY)

      await venice.topUp(10) // $10 USDC on a supported x402 rail

      const res = await venice.chat({ model: 'zai-org-glm-5-1', messages: [{
      role: 'user', content: 'Hello!' }] })

      ```


      **Payment:** USDC on Base (chain ID 8453) or Solana mainnet. Minimum
      top-up: $5.
    name: x402
externalDocs:
  description: Venice.ai API documentation
  url: https://docs.venice.ai
paths:
  /video/retrieve:
    post:
      tags:
        - Video
      summary: /api/v1/video/retrieve
      description: >-
        Retrieve a video generation result. Returns the video file if completed,
        or a status if the request is still processing.
      operationId: retrieveVideo
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RetrieveVideoRequest'
      responses:
        '200':
          description: Video file if completed, or processing status if still in progress
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - PROCESSING
                      - COMPLETED
                    description: The status of the video generation request.
                    example: PROCESSING
                  average_execution_time:
                    type: number
                    description: >-
                      The estimated execution time of the video generation
                      request in milliseconds (P80).
                    example: 145000
                  execution_duration:
                    type: number
                    description: >-
                      The current duration of the video generation request in
                      milliseconds.
                    example: 53200
                  is_draft:
                    type: boolean
                    description: Present and true when this request is a draft.
                    example: true
                  draft_task_id:
                    type: string
                    description: >-
                      Pass as draft_task_id on a new queue request to upgrade
                      this draft to 1080p or 4k.
                    example: 123e4567-e89b-12d3-a456-426614174000
                  draft_expires_at:
                    type: string
                    description: >-
                      ISO timestamp after which the draft can no longer be
                      upgraded.
                    example: '2026-10-20T08:00:00.000Z'
                  can_upgrade_to_hd:
                    type: boolean
                    description: Whether the draft can be upgraded to HD right now.
                    example: false
                required:
                  - status
                  - average_execution_time
                  - execution_duration
            video/mp4:
              schema:
                type: string
                format: binary
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DetailedError'
        '401':
          description: |-
            - Authentication failed
            - This model is only available to Pro users
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardError'
        '403':
          description: >-
            The specified model is unavailable in your region. Use of Tor, VPNs,
            proxies, or other means to circumvent this restriction is a
            violation of our Terms of Service.


            This API key is restricted to configured IP addresses, and this
            request's source IP is not allowed
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/StandardError'
                  - $ref: '#/components/schemas/ApiKeyIpRestrictedError'
        '404':
          description: >-
            Media could not be found. Request may may be invalid, expired, or
            deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardError'
        '422':
          description: >-
            The selected model provider rejected this request due to its content
            policies.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProviderContentPolicyError'
        '500':
          description: Inference processing failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardError'
        '503':
          description: The model is at capacity. Please try again later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardError'
components:
  schemas:
    RetrieveVideoRequest:
      type: object
      properties:
        model:
          type: string
          description: Ignored. The queued video identifies its own model.
          deprecated: true
          example: video-model-123
        queue_id:
          type: string
          description: The ID of the video generation request.
          example: 123e4567-e89b-12d3-a456-426614174000
        delete_media_on_completion:
          type: boolean
          default: false
          description: >-
            If true, the video media will be deleted from storage after the
            request is completed. If false, you can use the complete endpoint to
            remove the media once you have successfully downloaded the video. A
            draft created with `draft` is kept until its HD upgrade window ends.
          example: false
      required:
        - queue_id
      additionalProperties: false
    DetailedError:
      type: object
      properties:
        details:
          type: object
          properties: {}
          description: Details about the incorrect input
          example:
            _errors: []
            field:
              _errors:
                - Field is required
        error:
          type: string
          description: A description of the error
      required:
        - error
    StandardError:
      type: object
      properties:
        error:
          type: string
          description: A description of the error
      required:
        - error
    ApiKeyIpRestrictedError:
      type: object
      properties:
        error:
          type: string
          enum:
            - >-
              This API key is restricted to configured IP addresses, and this
              request's source IP is not allowed
          description: A description of the error
          example: >-
            This API key is restricted to configured IP addresses, and this
            request's source IP is not allowed
      required:
        - error
    ProviderContentPolicyError:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: >-
                A human-readable explanation of the provider content policy
                rejection and the recommended next action.
              example: >-
                The selected model provider rejected this request due to its
                content policies. Credits have been refunded. Try using
                wan-2-7-text-to-video instead.
            type:
              type: string
              enum:
                - provider_content_policy
              description: >-
                Machine-readable error type for provider content policy
                rejections.
              example: provider_content_policy
            recommended_model:
              type: string
              description: >-
                A model ID that can be used as an alternative when a
                recommendation is available.
              example: wan-2-7-text-to-video
            credits_refunded:
              type: boolean
              description: Whether credits were refunded for the rejected generation.
              example: true
          required:
            - message
            - type
            - credits_refunded
      required:
        - error
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````

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