> ## Documentation Index
> Fetch the complete documentation index at: https://veniceai-mintlify-6ce01df5.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Quote Video Generation

> Quote a video generation request based on pricing inputs (model, duration, resolution, aspect_ratio, audio). Returns the price in USD.

***


## OpenAPI

````yaml POST /video/quote
openapi: 3.0.0
info:
  description: The Venice.ai API.
  termsOfService: https://venice.ai/legal/tos
  title: Venice.ai API
  version: '20260617.063120'
  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 USDC credits 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 any inference endpoint with SIGN-IN-WITH-X header


    **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: 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 any endpoint** — All inference endpoints (chat, image, audio,
      video, embeddings) accept `siwx` as an alternative to `BearerAuth`.
      Charges are deducted from your USDC 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-ai/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. Alternatively, stake DIEM tokens for daily credits (1 DIEM =
      $1/day).
    name: x402
externalDocs:
  description: Venice.ai API documentation
  url: https://docs.venice.ai
paths:
  /video/quote:
    post:
      tags:
        - Video
      summary: /api/v1/video/quote
      description: >-
        Quote a video generation request based on pricing inputs (model,
        duration, resolution, aspect_ratio, audio). Returns the price in USD.
      operationId: quoteVideo
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuoteVideoRequest'
      responses:
        '200':
          description: Video generation price quote
          content:
            application/json:
              schema:
                type: object
                properties:
                  quote:
                    type: number
                required:
                  - quote
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DetailedError'
        '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.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardError'
components:
  schemas:
    QuoteVideoRequest:
      type: object
      properties:
        model:
          type: string
          description: The model to get a price quote for.
          example: seedance-2-0-text-to-video
        duration:
          type: string
          enum:
            - 2s
            - 3s
            - 4s
            - 5s
            - 6s
            - 7s
            - 8s
            - 9s
            - 10s
            - 11s
            - 12s
            - 13s
            - 14s
            - 15s
            - 16s
            - 18s
            - 20s
            - 25s
            - 30s
            - 1 gen
            - Auto
          description: The duration of the video. Available options vary by model.
          example: 10s
        aspect_ratio:
          type: string
          enum:
            - '1:1'
            - '2:3'
            - '3:2'
            - '3:4'
            - '4:3'
            - '4:5'
            - '5:4'
            - '9:16'
            - '9:21'
            - '16:9'
            - '21:9'
          description: >-
            The aspect ratio. Required for some models with megapixel-rate
            pricing.
          example: '16:9'
        resolution:
          type: string
          enum:
            - 256p
            - 360p
            - 480p
            - 540p
            - 580p
            - 720p
            - 1080p
            - 1440p
            - 2160p
            - 4k
            - 2x
            - 4x
            - true_1080p
          description: >-
            The resolution. Required for models with duration-resolution-rate
            pricing.
          example: 720p
        upscale_factor:
          type: integer
          description: For upscale models only.
          enum:
            - 1
            - 2
            - 4
          example: 2
        audio:
          type: boolean
          default: true
          description: >-
            For models which support audio generation and configuration.
            Defaults to true.
          example: true
        video_url:
          type: string
          description: >-
            For upscale models, the video to upscale. Required to auto-detect
            duration for pricing.
          example: data:video/mp4;base64,AAAAFGZ0eXA...
        reference_video_total_duration:
          type: number
          minimum: 0
          description: >-
            For R2V models (e.g. Seedance 2.0 R2V), the aggregate duration in
            seconds of all reference videos to include in the quote (max 45s;
            per-clip 2–15s, total ≤15s for Seedance). When provided, the quote
            reflects the BytePlus 'input with video' rate tier and the
            (input+output)×pixels token formula. When omitted, the quote returns
            the no-reference baseline.
          example: 5
      required:
        - model
        - duration
      description: >-
        Request body for video price quote. Available fields and valid values
        vary by model.
    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
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````