externalDocs:
  description: Venice.ai API documentation
  url: https://docs.venice.ai
info:
  description: The Venice.ai API.
  termsOfService: https://venice.ai/legal/tos
  title: Venice.ai API
  version: "20260818.121409"
  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.
openapi: 3.0.0
security:
  - BearerAuth: []
servers:
  - url: https://api.venice.ai/api/v1
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: 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
components:
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http
    siwx:
      description: >-
        Wallet-based authentication using the x402 protocol (Sign-In-With-X).
        Supports EVM SIWE signatures on Base and Ed25519 signatures on Solana
        mainnet.


        **Header format:** Base64-encoded JSON object with the following fields:

        - `address` — EVM or Solana wallet address

        - `message` — Signed SIWX message. EVM wallets use EIP-4361 SIWE; Solana
        wallets use the Solana SIWX message format.

        - `signature` — Signature of the message, signed by the wallet's private
        key. EVM signatures are hex; Solana signatures may be base58 or base64.

        - `timestamp` — Unix timestamp in milliseconds

        - `chainId` — Chain identity. Use `8453`, `"8453"`, or `"eip155:8453"`
        for Base; use `"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"` for Solana.

        - `type` — Optional signature type. Use `"ed25519"` for Solana. Omitted
        means EVM/EIP-191 for backward compatibility.


        **EVM SIWE message fields:**

        - `domain`: `api.venice.ai`

        - `uri`: `https://api.venice.ai`

        - `version`: `"1"`

        - `chainId`: `8453`

        - `nonce`: Random 16-character hex string

        - `issuedAt` / `expirationTime`: ISO timestamps (recommended TTL: 10
        minutes)

        - `statement`: `"Sign in to Venice API"`


        **Example (TypeScript):**

        ```

        import { Wallet } from 'ethers'

        import { SiweMessage } from 'siwe'


        const wallet = new Wallet(PRIVATE_KEY)

        const msg = new SiweMessage({ domain: 'api.venice.ai', address:
        wallet.address, statement: 'Sign in to Venice API', uri:
        'https://api.venice.ai', version: '1', chainId: 8453, nonce:
        crypto.randomUUID().replace(/-/g, '').slice(0, 16), issuedAt: new
        Date().toISOString(), expirationTime: new Date(Date.now() +
        600000).toISOString() })

        const signature = await wallet.signMessage(msg.prepareMessage())

        const header = btoa(JSON.stringify({ address: wallet.address, message:
        msg.prepareMessage(), signature, timestamp: Date.now(), chainId: 8453
        }))

        // Set header: SIGN-IN-WITH-X: <header>

        ```


        **Solana message fields:** The signed message starts with `<domain>
        wants you to sign in with your Solana account:`, followed by the wallet
        address and the standard `URI`, `Version`, `Chain ID`, `Nonce`, `Issued
        At`, and optional `Expiration Time` fields. Use `type: "ed25519"` and
        `chainId: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"` in the encoded JSON
        payload.


        **SDK:** `npm install @venice-ai/x402-client` provides `VeniceClient`
        and `createAuthFetch` which handle this automatically.


        **Billing:** x402 users pay from a prepaid USDC credit balance. Top up
        via `POST /x402/top-up`. When balance is insufficient, endpoints return
        `402` with structured top-up instructions.
      in: header
      name: SIGN-IN-WITH-X
      type: apiKey
  schemas:
    StandardError:
      type: object
      properties:
        error:
          type: string
          description: A description of the error
      required:
        - error
    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
    ContentViolationError:
      type: object
      properties:
        error:
          type: string
          description: A description of the error
        suggested_prompt:
          type: string
          description: An optional provider-suggested replacement prompt that complies
            with content policy.
          example: A cinematic instrumental track inspired by stormy weather and dramatic
            tension.
      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
    PayloadTooLargeError:
      type: object
      properties:
        code:
          type: string
          enum:
            - PAYLOAD_TOO_LARGE
          description: Machine-readable error code.
          example: PAYLOAD_TOO_LARGE
        error:
          type: string
          description: A description of the error
          example: File exceeds the maximum allowed size of 25 MB.
      required:
        - code
        - error
    X402InferencePaymentRequired:
      anyOf:
        - type: object
          properties:
            x402Version:
              type: number
              description: x402 protocol version.
              example: 2
            error:
              type: string
              description: Human-readable payment requirement message.
              example: Payment required
            resource:
              type: object
              properties:
                url:
                  type: string
                  description: Protected resource URL.
                  example: https://api.venice.ai/api/v1/chat/completions
                description:
                  type: string
                  description: Human-readable resource description.
                  example: Venice API
                mimeType:
                  type: string
                  description: Resource MIME type.
                  example: application/json
              required:
                - url
                - description
                - mimeType
              additionalProperties: false
            accepts:
              type: array
              items:
                type: object
                properties:
                  scheme:
                    type: string
                    enum:
                      - exact
                    description: x402 payment scheme.
                    example: exact
                  network:
                    type: string
                    description: Payment network for this requirement.
                    example: solana
                  asset:
                    type: string
                    description: USDC token address or mint for the selected network.
                    example: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                  amount:
                    type: string
                    description: Required payment amount in base units (USDC has 6 decimals).
                    example: "10000000"
                  payTo:
                    type: string
                    description: Receiver wallet address for the selected network.
                    example: 8qUL23aSj7mDWdoLMXGHFvnVCT9wd7jXcysiekroADEL
                  maxTimeoutSeconds:
                    type: number
                    description: Maximum time allowed for payment settlement.
                    example: 300
                  extra:
                    type: object
                    properties: {}
                    description: Network-specific x402 metadata. Solana requirements include a
                      feePayer.
                    example:
                      name: USD Coin
                      version: "2"
                      feePayer: BFK9TLC3edb13K6v4YyH3DwPb5DSUpkWvb7XnqCL9b4F
                required:
                  - scheme
                  - network
                  - asset
                  - amount
                  - payTo
                  - maxTimeoutSeconds
                  - extra
                additionalProperties: false
              description: Protocol payment requirements. Clients should choose one entry,
                such as Base or Solana, and sign exactly that requirement.
            extensions:
              type: object
              properties: {}
              description: Protocol extensions. Inference 402 responses include
                `sign-in-with-x` with a SIWX challenge for wallet-credit
                authentication.
            authOptions:
              type: object
              properties:
                apiKey:
                  type: object
                  properties:
                    header:
                      type: string
                      description: API key authentication header format.
                      example: "Authorization: Bearer YOUR_API_KEY"
                    getKey:
                      type: string
                      description: Where to create or manage API keys.
                      example: https://venice.ai/settings/api
                    docs:
                      type: string
                      description: API key documentation URL.
                      example: https://docs.venice.ai/api-reference
                  required:
                    - header
                    - getKey
                    - docs
                  additionalProperties: false
                x402Wallet:
                  type: object
                  properties:
                    header:
                      type: string
                      description: Header used for Sign-In-With-X wallet authentication.
                      example: SIGN-IN-WITH-X
                    legacyHeader:
                      type: string
                      description: Legacy Sign-In-With-X header accepted during migration.
                      example: X-Sign-In-With-X
                    topUp:
                      type: string
                      description: Endpoint used to discover and submit x402 top-up payments.
                      example: POST /api/v1/x402/top-up
                    docs:
                      type: string
                      description: x402 top-up API documentation URL.
                      example: https://docs.venice.ai/api-reference/endpoint/x402/top-up
                  required:
                    - header
                    - legacyHeader
                    - topUp
                    - docs
                  additionalProperties: false
              required:
                - apiKey
                - x402Wallet
              additionalProperties: false
          required:
            - x402Version
            - resource
            - accepts
            - authOptions
          additionalProperties: false
          description: Returned when an inference request has no API key or wallet
            authentication. The JSON body includes x402 discovery requirements
            and authentication options.
        - type: object
          properties:
            error:
              type: string
              enum:
                - Payment required
              description: Error message indicating payment is required.
            code:
              type: string
              enum:
                - PAYMENT_REQUIRED
              description: Machine-readable error code.
            reason:
              type: string
              enum:
                - insufficient_balance
              description: Reason the x402-authenticated request could not proceed.
            message:
              type: string
              description: Human-readable context about the payment requirement.
              example: Insufficient x402 balance
            currentBalanceUsd:
              type: number
              description: Current x402 credit balance for the wallet.
              example: 0.01
            minimumBalanceUsd:
              type: number
              description: Minimum x402 credit balance required before the request can run.
              example: 0.1
            description:
              type: string
              description: Protected resource description.
              example: Venice API
            suggestedTopUpUsd:
              type: number
              description: Suggested amount to top up in USD.
              example: 10
            minimumTopUpUsd:
              type: number
              description: Minimum allowed top-up amount in USD.
              example: 5
            supportedTokens:
              type: array
              items:
                type: string
              description: List of supported token symbols for payment.
              example:
                - USDC
            supportedChains:
              type: array
              items:
                type: string
              description: List of supported top-up rails.
              example:
                - base
                - solana
            topUpInstructions:
              type: object
              properties:
                step1:
                  type: string
                  description: "First step: get payment requirements."
                  example: POST /api/v1/x402/top-up with no payment header to get payment
                    requirements
                step2:
                  type: string
                  description: "Second step: sign the payment."
                  example: Choose a payment option from accepts and sign a USDC transfer
                    authorization using the x402 SDK (createPaymentHeader)
                step3:
                  type: string
                  description: "Third step: submit the payment."
                  example: POST /api/v1/x402/top-up with the signed PAYMENT-SIGNATURE header
                receiverWallet:
                  type: string
                  description: Legacy Base receiver wallet address. Prefer the selected accepts
                    entry from /x402/top-up for network-specific payTo values.
                  example: <RECEIVER_WALLET_ADDRESS>
                tokenAddress:
                  type: string
                  description: Legacy Base USDC token address. Prefer the selected accepts entry
                    from /x402/top-up for network-specific assets.
                  example: <USDC_TOKEN_ADDRESS>
                tokenDecimals:
                  type: number
                  description: Token decimal places.
                  example: 6
                network:
                  type: string
                  description: Legacy Base target network. Prefer the selected accepts entry from
                    /x402/top-up for network-specific values.
                  example: eip155:8453
                minimumAmountUsd:
                  type: number
                  description: Minimum top-up amount in USD.
                  example: 5
              required:
                - step1
                - step2
                - step3
                - receiverWallet
                - tokenAddress
                - tokenDecimals
                - network
                - minimumAmountUsd
              additionalProperties: false
            siwxChallenge:
              type: object
              properties:
                info:
                  type: object
                  properties:
                    domain:
                      type: string
                      description: Domain for the SIWX challenge.
                      example: api.venice.ai
                    uri:
                      type: string
                      description: Resource URI for the challenge.
                      example: https://api.venice.ai/api/v1/chat/completions
                    version:
                      type: string
                      description: SIWX version.
                      example: "1"
                    nonce:
                      type: string
                      description: Unique nonce for replay protection.
                      example: "{{nonce}}"
                    issuedAt:
                      type: string
                      description: ISO timestamp when the challenge was issued.
                      example: 2026-04-09T12:00:00.000Z
                    expirationTime:
                      type: string
                      description: ISO timestamp when the challenge expires.
                      example: 2026-04-09T12:05:00.000Z
                    statement:
                      type: string
                      description: Human-readable statement for the signature.
                      example: Sign in to Venice AI
                  required:
                    - domain
                    - uri
                    - version
                    - nonce
                    - issuedAt
                    - expirationTime
                    - statement
                  additionalProperties: false
                supportedChains:
                  type: array
                  items:
                    type: object
                    properties:
                      chainId:
                        type: string
                        description: Supported chain identity.
                        example: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
                      type:
                        type: string
                        enum:
                          - eip191
                          - eip1271
                          - ed25519
                        description: Signature type accepted for this chain.
                        example: ed25519
                    required:
                      - chainId
                      - type
                    additionalProperties: false
                  description: Supported SIWX chains and signature types.
              required:
                - info
                - supportedChains
              additionalProperties: false
          required:
            - error
            - code
            - reason
            - suggestedTopUpUsd
            - minimumTopUpUsd
            - supportedTokens
            - supportedChains
            - topUpInstructions
            - siwxChallenge
          additionalProperties: false
    ChatCompletionRequest:
      type: object
      properties:
        frequency_penalty:
          type: number
          maximum: 2
          minimum: -2
          default: 0
          description: Number between -2.0 and 2.0. Positive values penalize new tokens
            based on their existing frequency in the text so far, decreasing the
            model's likelihood to repeat the same line verbatim.
        logprobs:
          type: boolean
          description: Whether to include log probabilities in the response. This is not
            supported by all models.
          example: true
        top_logprobs:
          type: integer
          minimum: 0
          description: The number of highest probability tokens to return for each token
            position.
          example: 1
        max_completion_tokens:
          type: integer
          description: An upper bound for the number of tokens that can be generated for a
            completion, including visible output tokens and reasoning tokens.
        max_temp:
          type: number
          minimum: 0
          maximum: 2
          description: Maximum temperature value for dynamic temperature scaling.
          example: 1.5
        max_tokens:
          type: integer
          description: The maximum number of tokens that can be generated in the chat
            completion. This value can be used to control costs for text
            generated via API. Values of 0 or less are ignored and the model
            will use its default maximum. This value is now deprecated in favor
            of max_completion_tokens.
        messages:
          type: array
          items:
            anyOf:
              - type: object
                properties:
                  content:
                    anyOf:
                      - type: string
                        title: String
                      - type: array
                        items:
                          oneOf:
                            - type: object
                              properties:
                                cache_control:
                                  type: object
                                  properties:
                                    ttl:
                                      type: string
                                      description: Optional TTL for extended cache duration. Beta feature requiring
                                        special header.
                                      example: 1h
                                    type:
                                      type: string
                                      enum:
                                        - ephemeral
                                      description: The type of cache control. Currently only "ephemeral" is supported.
                                      example: ephemeral
                                  required:
                                    - type
                                  description: Optional cache control for prompt caching on supported providers.
                                  example:
                                    type: ephemeral
                                  title: Cache Control
                                text:
                                  type: string
                                  minLength: 1
                                  description: The prompt text of the message. Must be at-least one character in
                                    length
                                  example: Why is the sky blue?
                                  title: Text Content Object
                                type:
                                  type: string
                                  enum:
                                    - text
                                  title: Text Content String
                              required:
                                - text
                                - type
                              description: Text message type. Supports optional cache_control for prompt
                                caching on supported providers.
                              example:
                                text: Why is the sky blue?
                                type: text
                              title: text
                            - type: object
                              properties:
                                cache_control:
                                  type: object
                                  properties:
                                    ttl:
                                      type: string
                                      description: Optional TTL for extended cache duration. Beta feature requiring
                                        special header.
                                      example: 1h
                                    type:
                                      type: string
                                      enum:
                                        - ephemeral
                                      description: The type of cache control. Currently only "ephemeral" is supported.
                                      example: ephemeral
                                  required:
                                    - type
                                  description: Optional cache control for prompt caching on supported providers.
                                  example:
                                    type: ephemeral
                                  title: Cache Control
                                image_url:
                                  type: object
                                  properties:
                                    url:
                                      type: string
                                      description: The URL of the image. Can be a data URL with a base64 encoded image
                                        or a public URL. URL must be publicly
                                        accessible. Image must pass validation
                                        checks and be >= 64 pixels square.
                                      format: uri
                                  required:
                                    - url
                                  description: Object containing the image URL information
                                  title: Image URL Object
                                type:
                                  type: string
                                  enum:
                                    - image_url
                              required:
                                - image_url
                                - type
                              description: Image URL message type. Supports optional cache_control for prompt
                                caching on supported providers.
                              title: image_url
                            - type: object
                              properties:
                                cache_control:
                                  type: object
                                  properties:
                                    ttl:
                                      type: string
                                      description: Optional TTL for extended cache duration. Beta feature requiring
                                        special header.
                                      example: 1h
                                    type:
                                      type: string
                                      enum:
                                        - ephemeral
                                      description: The type of cache control. Currently only "ephemeral" is supported.
                                      example: ephemeral
                                  required:
                                    - type
                                  description: Optional cache control for prompt caching on supported providers.
                                  example:
                                    type: ephemeral
                                  title: Cache Control
                                input_audio:
                                  type: object
                                  properties:
                                    data:
                                      type: string
                                      description: Base64-encoded audio data. Direct URLs are not supported for audio
                                        content.
                                    format:
                                      type: string
                                      enum:
                                        - wav
                                        - mp3
                                        - aiff
                                        - aac
                                        - ogg
                                        - flac
                                        - m4a
                                        - pcm16
                                        - pcm24
                                      default: wav
                                      description: The format of the audio file. Common formats include wav, mp3, aac,
                                        ogg, flac, m4a. Defaults to wav.
                                      example: wav
                                  required:
                                    - data
                                  description: Object containing the base64-encoded audio data and format
                                  title: Input Audio Object
                                type:
                                  type: string
                                  enum:
                                    - input_audio
                              required:
                                - input_audio
                                - type
                              description: Audio input message type for models that support audio analysis.
                                Audio must be base64-encoded.
                              example:
                                input_audio:
                                  data: <base64-encoded-audio>
                                  format: wav
                                type: input_audio
                              title: input_audio
                            - type: object
                              properties:
                                cache_control:
                                  type: object
                                  properties:
                                    ttl:
                                      type: string
                                      description: Optional TTL for extended cache duration. Beta feature requiring
                                        special header.
                                      example: 1h
                                    type:
                                      type: string
                                      enum:
                                        - ephemeral
                                      description: The type of cache control. Currently only "ephemeral" is supported.
                                      example: ephemeral
                                  required:
                                    - type
                                  description: Optional cache control for prompt caching on supported providers.
                                  example:
                                    type: ephemeral
                                  title: Cache Control
                                type:
                                  type: string
                                  enum:
                                    - video_url
                                video_url:
                                  type: object
                                  properties:
                                    url:
                                      type: string
                                      description: "The URL of the video. Can be a direct URL (including YouTube links
                                        for some providers), or a base64-encoded
                                        data URL (e.g.,
                                        data:video/mp4;base64,...). Supported
                                        formats: mp4, mpeg, mov, webm. Remote
                                        URLs must be publicly accessible, must
                                        not redirect, and must return a
                                        permitted video Content-Type. At most 3
                                        videos may be provided in one request."
                                      format: uri
                                  required:
                                    - url
                                  description: Object containing the video URL information
                                  title: Video URL Object
                              required:
                                - type
                                - video_url
                              description: Video URL message type for models that support video analysis.
                                Supports both direct URLs and base64-encoded
                                data URLs.
                              example:
                                type: video_url
                                video_url:
                                  url: https://www.youtube.com/watch?v=dQw4w9WgXcQ
                              title: video_url
                            - type: object
                              properties:
                                cache_control:
                                  type: object
                                  properties:
                                    ttl:
                                      type: string
                                      description: Optional TTL for extended cache duration. Beta feature requiring
                                        special header.
                                      example: 1h
                                    type:
                                      type: string
                                      enum:
                                        - ephemeral
                                      description: The type of cache control. Currently only "ephemeral" is supported.
                                      example: ephemeral
                                  required:
                                    - type
                                  description: Optional cache control for prompt caching on supported providers.
                                  example:
                                    type: ephemeral
                                  title: Cache Control
                                type:
                                  type: string
                                  enum:
                                    - file
                                file:
                                  type: object
                                  properties:
                                    file_data:
                                      type: string
                                      description: "The file content as a data URL (e.g.,
                                        data:application/pdf;base64,...) or a
                                        publicly accessible URL. Supported
                                        formats: PDF, EPUB, DOCX, PPTX, XLSX,
                                        XLS, plain text, Markdown, CSV, JSON,
                                        and most source-code files (e.g., .py,
                                        .js, .ts, .c, .cpp, .java, .go, .rs,
                                        .ps1, .sh, .yaml, .sql)."
                                    filename:
                                      type: string
                                      description: Optional filename for the file. Used for display purposes.
                                      example: document.pdf
                                  required:
                                    - file_data
                                  description: Object containing the file data and optional filename
                                  title: File Object
                              required:
                                - type
                                - file
                              description: File input message type for document processing. Supports PDF,
                                EPUB, DOCX, PPTX, XLSX, plain text, and most
                                source-code files (e.g., .py, .js, .ts, .c,
                                .cpp, .java, .go, .rs, .ps1, .sh, .yaml, .sql).
                                Files are extracted to text before being sent to
                                the model.
                              example:
                                type: file
                                file:
                                  file_data: data:application/pdf;base64,JVBERi0xLjQK...
                                  filename: document.pdf
                              title: file
                        title: Objects
                  name:
                    type: string
                    nullable: true
                  role:
                    type: string
                    enum:
                      - user
                required:
                  - content
                  - role
                description: The user message is the input from the user. It is part of the
                  conversation and is visible to the assistant.
                title: User Message
              - type: object
                properties:
                  content:
                    anyOf:
                      - type: string
                        title: String
                      - type: array
                        items:
                          type: object
                          properties:
                            cache_control:
                              type: object
                              properties:
                                ttl:
                                  type: string
                                  description: Optional TTL for extended cache duration. Beta feature requiring
                                    special header.
                                  example: 1h
                                type:
                                  type: string
                                  enum:
                                    - ephemeral
                                  description: The type of cache control. Currently only "ephemeral" is supported.
                                  example: ephemeral
                              required:
                                - type
                              description: Optional cache control for prompt caching on supported providers.
                              example:
                                type: ephemeral
                              title: Cache Control
                            text:
                              type: string
                              minLength: 1
                              description: The prompt text of the message. Must be at-least one character in
                                length
                              example: Why is the sky blue?
                              title: Text Content Object
                            type:
                              type: string
                              enum:
                                - text
                              title: Text Content String
                          required:
                            - text
                            - type
                          description: Text message type. Supports optional cache_control for prompt
                            caching on supported providers.
                          example:
                            text: Why is the sky blue?
                            type: text
                          title: text
                        title: Objects
                      - nullable: true
                        title: "null"
                  name:
                    type: string
                    nullable: true
                  reasoning_content:
                    type: string
                    nullable: true
                  reasoning_details:
                    type: array
                    items:
                      type: object
                      properties:
                        data:
                          type: string
                        format:
                          type: string
                        id:
                          type: string
                        index:
                          type: number
                        text:
                          type: string
                        type:
                          type: string
                      required:
                        - type
                    description: Reasoning details returned by certain reasoning models that support
                      this feature (e.g., Gemini 3 Pro). Not all reasoning
                      models return this field. For multi-turn conversations
                      with tool calls on supported models, pass back the
                      reasoning_details exactly as received to preserve thought
                      signatures.
                  role:
                    type: string
                    enum:
                      - assistant
                  thought_signature:
                    type: string
                    nullable: true
                    description: Gemini thought signature returned by native GCP transport. For
                      multi-turn conversations (especially with tool calls),
                      pass it back exactly as received to preserve thought
                      signatures.
                  tool_calls:
                    type: array
                    nullable: true
                    items:
                      nullable: true
                required:
                  - role
                description: The assistant message contains the response from the LLM. Must have
                  either content or tool_calls.
                title: Assistant Message
              - type: object
                properties:
                  content:
                    type: string
                  name:
                    type: string
                    nullable: true
                  reasoning_content:
                    type: string
                    nullable: true
                  role:
                    type: string
                    enum:
                      - tool
                  tool_call_id:
                    type: string
                  tool_calls:
                    type: array
                    nullable: true
                    items:
                      nullable: true
                required:
                  - content
                  - role
                  - tool_call_id
                description: The tool message is a special message that is used to call a tool.
                  It is not part of the conversation and is not visible to the
                  user.
                title: Tool Message
              - type: object
                properties:
                  content:
                    anyOf:
                      - type: string
                        title: String
                      - type: array
                        items:
                          type: object
                          properties:
                            cache_control:
                              type: object
                              properties:
                                ttl:
                                  type: string
                                  description: Optional TTL for extended cache duration. Beta feature requiring
                                    special header.
                                  example: 1h
                                type:
                                  type: string
                                  enum:
                                    - ephemeral
                                  description: The type of cache control. Currently only "ephemeral" is supported.
                                  example: ephemeral
                              required:
                                - type
                              description: Optional cache control for prompt caching on supported providers.
                              example:
                                type: ephemeral
                              title: Cache Control
                            text:
                              type: string
                              minLength: 1
                              description: The prompt text of the message. Must be at-least one character in
                                length
                              example: Why is the sky blue?
                              title: Text Content Object
                            type:
                              type: string
                              enum:
                                - text
                              title: Text Content String
                          required:
                            - text
                            - type
                          description: Text message type. Supports optional cache_control for prompt
                            caching on supported providers.
                          example:
                            text: Why is the sky blue?
                            type: text
                          title: text
                        title: Objects
                  name:
                    type: string
                    nullable: true
                  role:
                    type: string
                    enum:
                      - system
                required:
                  - content
                  - role
                description: The system message is a special message that provides context to
                  the model. It is not part of the conversation and is not
                  visible to the user.
                title: System Message
              - type: object
                properties:
                  content:
                    anyOf:
                      - type: string
                        title: String
                      - type: array
                        items:
                          type: object
                          properties:
                            cache_control:
                              type: object
                              properties:
                                ttl:
                                  type: string
                                  description: Optional TTL for extended cache duration. Beta feature requiring
                                    special header.
                                  example: 1h
                                type:
                                  type: string
                                  enum:
                                    - ephemeral
                                  description: The type of cache control. Currently only "ephemeral" is supported.
                                  example: ephemeral
                              required:
                                - type
                              description: Optional cache control for prompt caching on supported providers.
                              example:
                                type: ephemeral
                              title: Cache Control
                            text:
                              type: string
                              minLength: 1
                              description: The prompt text of the message. Must be at-least one character in
                                length
                              example: Why is the sky blue?
                              title: Text Content Object
                            type:
                              type: string
                              enum:
                                - text
                              title: Text Content String
                          required:
                            - text
                            - type
                          description: Text message type. Supports optional cache_control for prompt
                            caching on supported providers.
                          example:
                            text: Why is the sky blue?
                            type: text
                          title: text
                        title: Objects
                  name:
                    type: string
                    nullable: true
                  role:
                    type: string
                    enum:
                      - developer
                required:
                  - content
                  - role
                description: The developer message provides high-level instructions to reasoning
                  models (o1, codex). Semantically similar to system messages
                  but specifically designed for reasoning model workflows.
                title: Developer Message
          minItems: 1
          description: A list of messages comprising the conversation so far. Depending on
            the model you use, different message types (modalities) are
            supported, like text and images. Non-multimodal models reject image
            content. For vision models that support multiple images
            (supportsMultipleImages), images are preserved across all messages
            in the conversation history. For single-image vision models, only
            the last image-containing message retains its images.
        min_p:
          type: number
          minimum: 0
          maximum: 1
          description: Sets a minimum probability threshold for token selection. Tokens
            with probabilities below this value are filtered out.
          example: 0.05
        min_temp:
          type: number
          minimum: 0
          maximum: 2
          description: Minimum temperature value for dynamic temperature scaling.
          example: 0.1
        model:
          type: string
          description: The ID of the model you wish to prompt. May also be a model trait,
            or a model compatibility mapping. See the models endpoint for a list
            of models available to you. You can use feature suffixes to enable
            features from the venice_parameters object. Please see "Model
            Feature Suffix" documentation for more details.
          example: zai-org-glm-5-1
        n:
          type: integer
          default: 1
          description: How many chat completion choices to generate for each input
            message. Note that you will be charged based on the number of
            generated tokens across all of the choices. Keep n as 1 to minimize
            costs.
        presence_penalty:
          type: number
          maximum: 2
          minimum: -2
          default: 0
          description: Number between -2.0 and 2.0. Positive values penalize new tokens
            based on whether they appear in the text so far, increasing the
            model's likelihood to talk about new topics.
        prompt_cache_key:
          type: string
          description: When supplied, this field may be used to optimize conversation
            routing to improve cache performance and thus reduce latency.
          example: random-string
        prompt_cache_retention:
          type: string
          enum:
            - default
            - extended
            - 24h
          description: OpenAI-compatible parameter to control prompt cache retention.
            "extended" or "24h" extends retention to 24 hours for supported
            models.
          example: 24h
        repetition_penalty:
          type: number
          minimum: 0
          description: The parameter for repetition penalty. 1.0 means no penalty. Values
            > 1.0 discourage repetition.
          example: 1.2
        reasoning:
          type: object
          properties:
            effort:
              type: string
              enum:
                - none
                - minimal
                - low
                - medium
                - high
                - xhigh
                - max
              description: Controls the reasoning effort level for supported models. Higher
                effort means more thorough reasoning but increased token usage.
                Defaults to the model configuration if not specified.
              example: medium
            summary:
              type: string
              enum:
                - auto
                - concise
                - detailed
              description: Controls whether and how the model generates a summary of its
                reasoning. "auto" lets the model decide, "concise" requests a
                brief summary, "detailed" requests a thorough summary.
              example: auto
          description: Configuration for reasoning behavior on supported models.
        reasoning_effort:
          type: string
          enum:
            - none
            - minimal
            - low
            - medium
            - high
            - xhigh
            - max
          description: OpenAI-compatible parameter to control reasoning effort level for
            supported models. Takes precedence over reasoning.effort if both are
            provided.
          example: medium
        seed:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: The random seed used to generate the response. This is useful for
            reproducibility.
          example: 42
        stop:
          anyOf:
            - type: string
              title: String
            - type: array
              items:
                type: string
              minItems: 1
              maxItems: 4
              title: Array of Strings
            - nullable: true
              title: "null"
          description: Up to 4 sequences where the API will stop generating further
            tokens. Defaults to null.
        stop_token_ids:
          type: array
          items:
            type: number
          description: Array of token IDs where the API will stop generating further tokens.
          example:
            - 151643
            - 151645
        stream:
          type: boolean
          description: Whether to stream back partial progress. Defaults to false.
          example: true
        stream_options:
          type: object
          properties:
            include_usage:
              type: boolean
              description: Whether to include usage information in the stream.
        temperature:
          type: number
          minimum: 0
          maximum: 2
          description: What sampling temperature to use, between 0 and 2. Higher values
            like 0.8 will make the output more random, while lower values like
            0.2 will make it more focused and deterministic. We generally
            recommend altering this or top_p but not both.
          example: 0.7
        top_k:
          type: integer
          minimum: 0
          description: The number of highest probability vocabulary tokens to keep for
            top-k-filtering.
          example: 40
        top_p:
          type: number
          minimum: 0
          maximum: 1
          description: An alternative to sampling with temperature, called nucleus
            sampling, where the model considers the results of the tokens with
            top_p probability mass. So 0.1 means only the tokens comprising the
            top 10% probability mass are considered.
          example: 0.9
        user:
          type: string
          description: This field is discarded on the request but is supported in the
            Venice API for compatibility with OpenAI clients.
        fallbacks:
          type: array
          items:
            type: object
            properties:
              model:
                type: string
            required:
              - model
          maxItems: 10
          description: Anthropic beta parameter for Claude Fable 5 server-side refusal
            fallback. Forwarded only for direct Anthropic routes; ignored for
            other providers.
          example:
            - model: claude-opus-4-8
        store:
          type: boolean
          description: This field is accepted for OpenAI compatibility but is not used by
            Venice.
        verbosity:
          type: string
          enum:
            - low
            - medium
            - high
            - auto
          description: Controls the verbosity of the text response. Currently supported
            values are `low`, `medium`, and `high`.
          example: low
        text:
          type: object
          properties:
            verbosity:
              type: string
              enum:
                - low
                - medium
                - high
                - auto
              description: Controls the verbosity of the text response.
              example: low
          description: OpenAI-compatible text configuration parameter.
        include:
          type: array
          items:
            type: string
          description: OpenAI-compatible parameter specifying additional data to include
            in the response.
        metadata:
          type: object
          additionalProperties:
            type: string
          description: OpenAI-compatible metadata parameter for request tracking.
        venice_parameters:
          type: object
          properties:
            character_slug:
              type: string
              description: The character slug of a public Venice character. Discoverable as
                the "Public ID" on the published character page.
            strip_thinking_response:
              type: boolean
              default: false
              description: Strip <think></think> blocks from the response. Applicable only to
                reasoning / thinking models. Also available to use as a model
                feature suffix. Defaults to false.
              example: false
            disable_thinking:
              type: boolean
              default: false
              description: On supported reasoning models, will disable thinking and strip the
                <think></think> blocks from the response. Defaults to false.
              example: false
            enable_e2ee:
              type: boolean
              default: true
              description: Enable end-to-end encryption for E2EE-capable models. When true
                (default), E2EE is used if E2EE headers are present. When false,
                the model runs in TEE-only mode even if E2EE headers are
                present. Only applicable to models with E2EE capability.
              example: true
            enable_web_search:
              type: string
              enum:
                - auto
                - off
                - on
              default: off
              description: Enable web search for this request. Defaults to off. On will force
                web search on the request. Auto will enable it based on the
                model's discretion. Citations will be returned either in the
                first chunk of a streaming result, or in the non streaming
                response.
              example: off
            enable_web_scraping:
              type: boolean
              default: false
              description: Enable Venice web scraping of URLs in the latest user message using
                Firecrawl. Off by default.
              example: false
            enable_web_citations:
              type: boolean
              default: false
              description: When web search is enabled, this will request that the LLM cite its
                sources using a ^index^ or ^i,j^ superscript format (e.g., ^1^).
                Defaults to false.
            include_search_results_in_stream:
              type: boolean
              default: false
              description: Experimental feature - When set to true, the LLM will include
                search results in the stream as the first emitted chunk.
                Defaults to false.
            return_search_results_as_documents:
              type: boolean
              description: When set, search results are also surfaced in an OpenAI-compatible
                tool call named "venice_web_search_documents" to ease LangChain
                consumption.
            include_venice_system_prompt:
              type: boolean
              default: true
              description: Whether to include the Venice supplied system prompts along side
                specified system prompts. Defaults to true.
            enable_x_search:
              type: boolean
              default: false
              description: Enable xAI native search (web + X/Twitter) for supported models.
                When enabled, the model performs web and X searches server-side
                instead of Venice search augmentation. Only available on models
                with supportsXSearch capability (e.g., grok-4-20). Additional
                per-search charges apply (~$0.01/search).
              example: true
          description: Unique parameters to Venice's API implementation. Customize these
            to control the behavior of the model.
        parallel_tool_calls:
          type: boolean
          default: true
          description: Whether to enable parallel function calling during tool use.
          example: false
        response_format:
          oneOf:
            - type: object
              properties:
                json_schema:
                  type: object
                  additionalProperties:
                    nullable: true
                type:
                  type: string
                  enum:
                    - json_schema
              required:
                - json_schema
                - type
              additionalProperties: false
              description: The JSON Schema that should be used to validate and format the
                response.
              example:
                json_schema:
                  properties:
                    age:
                      type: number
                    name:
                      type: string
                  required:
                    - name
                    - age
                  type: object
                type: json_schema
              title: json_schema
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - json_object
              required:
                - type
              additionalProperties: false
              description: The response should be formatted as a JSON object. This is a
                deprecated implementation and the preferred use is json_schema.
              title: json_object
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - text
              required:
                - type
              additionalProperties: false
              description: The response should be returned as plain text. This is the default
                behavior.
              title: text
          description: Format in which the response should be returned.
        tool_choice:
          anyOf:
            - type: object
              properties:
                function:
                  type: object
                  properties:
                    name:
                      type: string
                  required:
                    - name
                type:
                  type: string
              required:
                - function
                - type
            - type: string
        tools:
          type: array
          nullable: true
          items:
            anyOf:
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - web_search
                      - x_search
                required:
                  - type
              - type: object
                properties:
                  function:
                    type: object
                    properties:
                      description:
                        type: string
                      name:
                        type: string
                      parameters:
                        type: object
                        additionalProperties:
                          nullable: true
                      strict:
                        type: boolean
                        default: false
                        description: If set to true, the model will follow the exact schema defined in
                          the parameters field. Only a subset of JSON Schema is
                          supported when strict is true.
                        example: false
                    required:
                      - name
                  id:
                    type: string
                  type:
                    type: string
                required:
                  - function
            description: A tool that can be called by the model. Currently, only functions
              are supported as tools.
            title: Tool Call
          description: A list of tools the model may call. Currently, only functions are
            supported as a tool. Use this to provide a list of functions the
            model may generate JSON inputs for.
      required:
        - messages
        - model
      additionalProperties: false
    ChatCompletionContentPartInputAudio:
      type: object
      properties:
        cache_control:
          type: object
          properties:
            ttl:
              type: string
              description: Optional TTL for extended cache duration. Beta feature requiring
                special header.
              example: 1h
            type:
              type: string
              enum:
                - ephemeral
              description: The type of cache control. Currently only "ephemeral" is supported.
              example: ephemeral
          required:
            - type
          description: Optional cache control for prompt caching on supported providers.
          example:
            type: ephemeral
          title: Cache Control
        input_audio:
          type: object
          properties:
            data:
              type: string
              description: Base64-encoded audio data. Direct URLs are not supported for audio
                content.
            format:
              type: string
              enum:
                - wav
                - mp3
                - aiff
                - aac
                - ogg
                - flac
                - m4a
                - pcm16
                - pcm24
              default: wav
              description: The format of the audio file. Common formats include wav, mp3, aac,
                ogg, flac, m4a. Defaults to wav.
              example: wav
          required:
            - data
          description: Object containing the base64-encoded audio data and format
          title: Input Audio Object
        type:
          type: string
          enum:
            - input_audio
      required:
        - input_audio
        - type
      description: Audio input message type for models that support audio analysis.
        Audio must be base64-encoded.
      example:
        input_audio:
          data: <base64-encoded-audio>
          format: wav
        type: input_audio
      title: input_audio
    ChatCompletionContentPartVideoUrl:
      type: object
      properties:
        cache_control:
          type: object
          properties:
            ttl:
              type: string
              description: Optional TTL for extended cache duration. Beta feature requiring
                special header.
              example: 1h
            type:
              type: string
              enum:
                - ephemeral
              description: The type of cache control. Currently only "ephemeral" is supported.
              example: ephemeral
          required:
            - type
          description: Optional cache control for prompt caching on supported providers.
          example:
            type: ephemeral
          title: Cache Control
        type:
          type: string
          enum:
            - video_url
        video_url:
          type: object
          properties:
            url:
              type: string
              description: "The URL of the video. Can be a direct URL (including YouTube links
                for some providers), or a base64-encoded data URL (e.g.,
                data:video/mp4;base64,...). Supported formats: mp4, mpeg, mov,
                webm. Remote URLs must be publicly accessible, must not
                redirect, and must return a permitted video Content-Type. At
                most 3 videos may be provided in one request."
              format: uri
          required:
            - url
          description: Object containing the video URL information
          title: Video URL Object
      required:
        - type
        - video_url
      description: Video URL message type for models that support video analysis.
        Supports both direct URLs and base64-encoded data URLs.
      example:
        type: video_url
        video_url:
          url: https://www.youtube.com/watch?v=dQw4w9WgXcQ
      title: video_url
    ResponsesRequest:
      type: object
      properties:
        model:
          type: string
          description: The ID of the model to use. E2EE-capable models are not supported
            on /api/v1/responses; use /api/v1/chat/completions with the required
            E2EE headers instead.
          example: zai-org-glm-5-1
        input:
          anyOf:
            - type: string
            - type: array
              items:
                anyOf:
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - message
                      role:
                        type: string
                        enum:
                          - user
                          - assistant
                          - system
                          - developer
                      content:
                        anyOf:
                          - type: string
                          - type: array
                            items:
                              oneOf:
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - input_text
                                    text:
                                      type: string
                                  required:
                                    - type
                                    - text
                                  title: Input Text
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - input_image
                                    image_url:
                                      type: object
                                      properties:
                                        url:
                                          type: string
                                        detail:
                                          type: string
                                          enum:
                                            - auto
                                            - low
                                            - high
                                      required:
                                        - url
                                  required:
                                    - type
                                    - image_url
                                  title: Input Image
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - output_text
                                    text:
                                      type: string
                                    annotations:
                                      type: array
                                      items:
                                        nullable: true
                                  required:
                                    - type
                                    - text
                                  title: Output Text (for history)
                      id:
                        type: string
                      status:
                        type: string
                        enum:
                          - completed
                          - in_progress
                    required:
                      - type
                      - role
                      - content
                    title: Input Message
                  - type: object
                    properties:
                      role:
                        type: string
                        enum:
                          - user
                          - assistant
                          - system
                          - developer
                      content:
                        anyOf:
                          - type: string
                          - type: array
                            items:
                              anyOf:
                                - oneOf:
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - input_text
                                        text:
                                          type: string
                                      required:
                                        - type
                                        - text
                                      title: Input Text
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - input_image
                                        image_url:
                                          type: object
                                          properties:
                                            url:
                                              type: string
                                            detail:
                                              type: string
                                              enum:
                                                - auto
                                                - low
                                                - high
                                          required:
                                            - url
                                      required:
                                        - type
                                        - image_url
                                      title: Input Image
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - output_text
                                        text:
                                          type: string
                                        annotations:
                                          type: array
                                          items:
                                            nullable: true
                                      required:
                                        - type
                                        - text
                                      title: Output Text (for history)
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - text
                                    text:
                                      type: string
                                  required:
                                    - type
                                    - text
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - image_url
                                    image_url:
                                      anyOf:
                                        - type: string
                                        - type: object
                                          properties:
                                            url:
                                              type: string
                                            detail:
                                              type: string
                                              enum:
                                                - auto
                                                - low
                                                - high
                                          required:
                                            - url
                                  required:
                                    - type
                                    - image_url
                      id:
                        type: string
                      status:
                        type: string
                        enum:
                          - completed
                          - in_progress
                    required:
                      - role
                      - content
                    title: Input Message (Flexible)
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - reasoning
                      id:
                        type: string
                        nullable: true
                      summary:
                        type: array
                        nullable: true
                        items:
                          type: string
                      content:
                        anyOf:
                          - type: string
                          - type: array
                            items:
                              nullable: true
                          - nullable: true
                            title: "null"
                          - nullable: true
                            title: "null"
                      encrypted_content:
                        type: string
                        nullable: true
                      status:
                        type: string
                        nullable: true
                        enum:
                          - completed
                          - in_progress
                    required:
                      - type
                    title: Reasoning
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - function_call
                      id:
                        type: string
                      call_id:
                        type: string
                      name:
                        type: string
                      arguments:
                        type: string
                      status:
                        type: string
                        enum:
                          - completed
                          - in_progress
                    required:
                      - type
                      - call_id
                      - name
                      - arguments
                    title: Function Call
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - function_call_output
                      call_id:
                        type: string
                      output:
                        anyOf:
                          - type: string
                          - type: array
                            items:
                              nullable: true
                          - type: object
                            additionalProperties:
                              nullable: true
                          - type: number
                          - type: boolean
                          - nullable: true
                            title: "null"
                          - nullable: true
                            title: "null"
                    required:
                      - type
                      - call_id
                      - output
                    title: Function Call Output
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - item_reference
                      id:
                        type: string
                    required:
                      - type
                      - id
                    title: Item Reference
          description: The input to generate a response for. Can be a simple string or an
            array of messages.
        include:
          type: array
          items:
            type: string
          description: Additional response fields to include (OpenAI-compatible).
        max_output_tokens:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: Maximum number of tokens to generate.
        temperature:
          type: number
          minimum: 0
          maximum: 2
          description: Sampling temperature between 0 and 2.
        top_p:
          type: number
          minimum: 0
          maximum: 1
          description: Nucleus sampling parameter.
        fallbacks:
          type: array
          items:
            type: object
            properties:
              model:
                type: string
            required:
              - model
          maxItems: 10
          description: Anthropic beta parameter for Claude Fable 5 server-side refusal
            fallback. Forwarded only for direct Anthropic routes; ignored for
            other providers.
          example:
            - model: claude-opus-4-8
        reasoning:
          type: object
          nullable: true
          properties:
            effort:
              type: string
              enum:
                - none
                - minimal
                - low
                - medium
                - high
                - xhigh
                - max
              description: Controls reasoning effort level for supported models.
            summary:
              type: string
              enum:
                - auto
                - concise
                - detailed
              description: Controls reasoning summary format.
          title: Reasoning Configuration
        tools:
          type: array
          items:
            anyOf:
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - function
                  function:
                    type: object
                    properties:
                      name:
                        type: string
                      description:
                        type: string
                      parameters:
                        type: object
                        additionalProperties:
                          nullable: true
                      strict:
                        type: boolean
                    required:
                      - name
                required:
                  - type
                  - function
                title: Function Tool
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - web_search
                  search_context_size:
                    type: string
                    enum:
                      - low
                      - medium
                      - high
                  user_location:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - approximate
                      city:
                        type: string
                      region:
                        type: string
                      country:
                        type: string
                      timezone:
                        type: string
                required:
                  - type
                title: Web Search Tool
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - x_search
                  allowed_x_handles:
                    type: array
                    items:
                      type: string
                    maxItems: 10
                  excluded_x_handles:
                    type: array
                    items:
                      type: string
                    maxItems: 10
                  from_date:
                    type: string
                  to_date:
                    type: string
                  enable_image_understanding:
                    type: boolean
                  enable_video_understanding:
                    type: boolean
                required:
                  - type
                title: X Search Tool
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - code_interpreter
                  container:
                    type: object
                    properties:
                      image:
                        type: string
                required:
                  - type
                title: Code Interpreter Tool
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - file_search
                  vector_store_ids:
                    type: array
                    items:
                      type: string
                  max_num_results:
                    type: integer
                  ranking_options:
                    type: object
                    properties:
                      ranker:
                        type: string
                      score_threshold:
                        type: number
                required:
                  - type
                title: File Search Tool
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - computer_use_preview
                  display_width:
                    type: integer
                  display_height:
                    type: integer
                  environment:
                    type: string
                required:
                  - type
                title: Computer Use Tool
              - type: object
                properties:
                  type:
                    type: string
                required:
                  - type
                title: Generic Tool
            title: Tool Definition
          description: A list of tools the model may call.
        tool_choice:
          anyOf:
            - type: string
              enum:
                - auto
            - type: string
              enum:
                - none
            - type: string
              enum:
                - required
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - function
                function:
                  type: object
                  properties:
                    name:
                      type: string
                  required:
                    - name
              required:
                - type
                - function
          description: Controls which tool is called by the model.
        web_search:
          type: boolean
          description: Enable web search for this request.
        stream:
          type: boolean
          description: Whether to stream back partial progress.
        venice_parameters:
          type: object
          properties:
            character_slug:
              type: string
              description: The character slug of a public Venice character.
            enable_e2ee:
              type: boolean
              description: Enable end-to-end encryption for E2EE-capable models. When true
                (default), E2EE is used if headers are present. When false,
                TEE-only mode is used.
            enable_web_search:
              type: string
              enum:
                - auto
                - off
                - on
              description: Enable web search for this request.
            enable_web_scraping:
              type: boolean
              description: Enable Venice web scraping of URLs in the latest user message.
            enable_web_citations:
              type: boolean
              description: Request that the LLM cite its sources.
            include_venice_system_prompt:
              type: boolean
              description: Whether to include the Venice supplied system prompts.
            include_search_results_in_stream:
              type: boolean
              description: Include search results in the stream as the first emitted chunk.
          title: Venice Parameters
      required:
        - model
        - input
      description: Request body for the Responses API endpoint. E2EE-capable models
        are not supported on /api/v1/responses; use /api/v1/chat/completions
        with the required E2EE headers instead.
      title: Responses API Request
    ResponsesResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the response.
          example: resp_abc123
        object:
          type: string
          enum:
            - response
          description: The object type.
        created_at:
          type: integer
          description: Unix timestamp of when the response was created.
        model:
          type: string
          description: The model used for the response.
        status:
          type: string
          enum:
            - completed
            - failed
            - in_progress
            - cancelled
          description: The status of the response.
        output:
          type: array
          items:
            anyOf:
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - reasoning
                  id:
                    type: string
                  summary:
                    type: array
                    items:
                      type: string
                  encrypted_content:
                    type: string
                required:
                  - type
                  - id
                title: Reasoning Output
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - message
                  id:
                    type: string
                  status:
                    type: string
                    enum:
                      - completed
                      - in_progress
                      - failed
                  role:
                    type: string
                    enum:
                      - assistant
                  content:
                    type: array
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - output_text
                        text:
                          type: string
                        annotations:
                          type: array
                          items:
                            type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - url_citation
                              url:
                                type: string
                              title:
                                type: string
                              start_index:
                                type: integer
                              end_index:
                                type: integer
                            required:
                              - type
                              - url
                              - start_index
                              - end_index
                            title: URL Citation Annotation
                      required:
                        - type
                        - text
                      title: Output Text
                required:
                  - type
                  - id
                  - status
                  - role
                  - content
                title: Message Output
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - function_call
                  id:
                    type: string
                  call_id:
                    type: string
                  name:
                    type: string
                  arguments:
                    type: string
                  status:
                    type: string
                    enum:
                      - completed
                      - in_progress
                required:
                  - type
                  - id
                  - call_id
                  - name
                  - arguments
                  - status
                title: Function Call Output
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - web_search_call
                  id:
                    type: string
                  status:
                    type: string
                    enum:
                      - completed
                required:
                  - type
                  - id
                  - status
                title: Web Search Call Output
          description: The output items generated by the model.
        usage:
          type: object
          properties:
            input_tokens:
              type: integer
            input_tokens_details:
              type: object
              properties:
                cached_tokens:
                  type: integer
            output_tokens:
              type: integer
            output_tokens_details:
              type: object
              properties:
                reasoning_tokens:
                  type: integer
            total_tokens:
              type: integer
          required:
            - input_tokens
            - output_tokens
            - total_tokens
          description: Token usage statistics.
          title: Usage
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
          description: Error information if the response failed.
          title: Error
      required:
        - id
        - object
        - created_at
        - model
        - status
        - output
      description: Response from the Responses API endpoint.
      title: Responses API Response
    GenerateImageRequest:
      type: object
      properties:
        cfg_scale:
          type: number
          minimum: 0
          exclusiveMinimum: true
          maximum: 20
          description: CFG scale parameter. Higher values lead to more adherence to the
            prompt.
          example: 7.5
        embed_exif_metadata:
          type: boolean
          default: false
          description: Embed prompt generation information into the image's EXIF metadata.
          example: false
        format:
          type: string
          enum:
            - jpeg
            - png
            - webp
          default: webp
          description: "The image format to return. WebP are smaller and optimized for web
            use. PNG are higher quality but larger in file size. "
          example: webp
        height:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          maximum: 1280
          default: 1024
          description: Height of the generated image.
          example: 1024
        hide_watermark:
          type: boolean
          default: false
          description: Whether to hide the Venice watermark. Venice may ignore this
            parameter for certain generated content.
          example: false
        inpaint:
          nullable: true
          description: This feature is deprecated and was disabled on May 19th, 2025. A
            revised in-painting API will be launched in the near future.
          deprecated: true
        lora_strength:
          type: integer
          minimum: 0
          maximum: 100
          description: Lora strength for the model. Only applies if the model uses
            additional Loras.
          example: 50
        model:
          type: string
          description: The model to use for image generation.
          example: grok-imagine-image
        negative_prompt:
          type: string
          maxLength: 7500
          description: A description of what should not be in the image. Character limit
            is model specific and is listed in the promptCharacterLimit
            constraint in the model list endpoint.
          example: Clouds, Rain, Snow
        prompt:
          type: string
          minLength: 1
          maxLength: 7500
          description: The description for the image. Character limit is model specific
            and is listed in the promptCharacterLimit setting in the model list
            endpoint.
          example: A beautiful sunset over a mountain range
        return_binary:
          type: boolean
          default: false
          description: Whether to return binary image data instead of base64.
          example: false
        variants:
          type: integer
          minimum: 1
          maximum: 4
          description: Number of images to generate (1–4). Only supported when
            return_binary is false.
          example: 3
        safe_mode:
          type: boolean
          default: true
          description: Whether to use safe mode. If enabled, this will blur images that
            are classified as having adult content.
          example: false
        seed:
          type: integer
          minimum: -999999999
          maximum: 999999999
          default: 0
          description: Random seed for generation. If not provided, a random seed will be
            used.
          example: 123456789
        steps:
          type: integer
          default: 8
          description: Number of inference steps. This model does not support steps - this
            field is ignored.
          example: 8
        style_preset:
          type: string
          description: An image style to apply to the image. Visit
            https://docs.venice.ai/api-reference/endpoint/image/styles for more
            details.
          example: 3D Model
        aspect_ratio:
          type: string
          description: 'Aspect ratio (utilized by certain image models including Nano
            Banana). Examples: "1:1", "16:9".'
          example: 1:1
        resolution:
          type: string
          description: 'Resolution (utilized by certain image models including Nano
            Banana). Examples: "1K", "2K", "4K".'
          example: 1K
        quality:
          type: string
          enum:
            - low
            - medium
            - high
          description: Output quality for supported models (e.g. GPT Image 2 / GPT Image 2
            Edit). Higher values can increase the final request charge. See the
            model list for supported options.
          example: high
        enable_web_search:
          type: boolean
          description: Enable web search for the image generation task. This will allow
            the model to use the latest information from the web to generate the
            image. Only supported by certain models. If web search is used,
            additional credits are getting charged.
          example: false
        disable_prompt_optimization_thinking:
          type: boolean
          description: Skip the model's prompt-optimization thinking step for faster
            generation. Only supported by models with
            `supportsOptimizePromptThinking`; ignored by others. Omit to use the
            model default.
          example: false
        enhance_prompt:
          type: boolean
          description: Rewrite the prompt before generation to add clarifying visual
            detail. Additional credits are charged when a rewrite is generated.
            Adds up to ~30 seconds before generation starts. When enhancement is
            applied, the final prompt is returned URL-encoded in the
            `x-venice-enhanced-prompt` response header. Defaults to false.
          example: false
        width:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          maximum: 1280
          default: 1024
          description: Width of the generated image.
          example: 1024
        style_references:
          type: array
          items:
            type: object
            properties:
              image:
                anyOf:
                  - type: string
                  - type: string
                    format: uri
                description: A style reference image as a base64-encoded string (raw or data
                  URI) or a URL starting with http:// or https://. Must be less
                  than 8MB.
                example: https://example.com/style-reference.png
              strength:
                type: number
                minimum: 0.1
                maximum: 1
                description: How strongly the reference guides the output (0.1–1). Defaults to
                  0.5. Ignored by models where supportsStyleReferenceStrength is
                  false.
                example: 0.5
            required:
              - image
            additionalProperties: false
          description: "Style reference images that guide the aesthetic of the generated
            image. Only supported by models with `supportsStyleReferences: true`
            (see GET /api/v1/models for the per-model `maxStyleReferences`
            limit)."
          example:
            - image: https://example.com/style-reference.png
              strength: 0.5
      required:
        - model
        - prompt
      additionalProperties: false
    SimpleGenerateImageRequest:
      type: object
      properties:
        background:
          type: string
          nullable: true
          enum:
            - transparent
            - opaque
            - auto
          default: auto
          description: This parameter is not used in Venice image generation but is
            supported for compatibility with OpenAI API
          example: auto
        model:
          type: string
          default: default
          description: The model to use for image generation. Defaults to Venice's default
            image model. If a non-existent model is specified (ie an OpenAI
            model name), it will default to Venice's default image model.
          example: grok-imagine-image
        moderation:
          type: string
          nullable: true
          enum:
            - low
            - auto
          default: auto
          description: auto enables safe venice mode which will blur out adult content.
            low disables safe venice mode.
          example: auto
        n:
          type: integer
          nullable: true
          minimum: 1
          maximum: 1
          default: 1
          description: Number of images to generate. Venice presently only supports 1
            image per request.
          example: 1
        output_compression:
          type: integer
          nullable: true
          minimum: 0
          maximum: 100
          default: 100
          description: This parameter is not used in Venice image generation but is
            supported for compatibility with OpenAI API
        output_format:
          type: string
          enum:
            - jpeg
            - png
            - webp
          default: png
          description: Output format for generated images
          example: png
        prompt:
          type: string
          minLength: 1
          maxLength: 1500
          description: A text description of the desired image.
          example: A beautiful sunset over mountain ranges
        quality:
          type: string
          nullable: true
          enum:
            - auto
            - high
            - medium
            - low
            - hd
            - standard
          default: auto
          description: This parameter is not used in Venice image generation but is
            supported for compatibility with OpenAI API
          example: auto
        response_format:
          type: string
          nullable: true
          enum:
            - b64_json
            - url
          default: b64_json
          description: Response format. URL will be a data URL.
          example: b64_json
        size:
          type: string
          nullable: true
          enum:
            - auto
            - 256x256
            - 512x512
            - 1024x1024
            - 1536x1024
            - 1024x1536
            - 1792x1024
            - 1024x1792
          default: auto
          description: Size of generated images. Default is 1024x1024
          example: 1024x1024
        style:
          type: string
          nullable: true
          enum:
            - vivid
            - natural
          default: natural
          description: This parameter is not used in Venice image generation but is
            supported for compatibility with OpenAI API
          example: natural
        user:
          type: string
          description: This parameter is not used in Venice image generation but is
            supported for compatibility with OpenAI API
          example: user123
      required:
        - prompt
      additionalProperties: false
    UpscaleImageRequest:
      type: object
      properties:
        creativity:
          type: number
          nullable: true
          default: 0.01
          description: How much detail and texture the upscaler adds. Higher values add
            more; lower values stay closer to the source. Clamped to the 0–0.02
            range.
          example: 0.01
        image:
          anyOf:
            - {}
            - type: string
          description: The image to upscale. Can be either a file upload or a
            base64-encoded string. Image dimensions must be at least 65536
            pixels and final dimensions after scaling must not exceed 16777216
            pixels. File size must be less than 25MB.
        scale:
          type: number
          minimum: 2
          maximum: 4
          default: 2
          description: The scale factor for upscaling the image. Must be either 2 or 4. A
            scale of 4 with large images will result in the scale being
            dynamically reduced to ensure the final image stays within the
            maximum size limits.
          example: 2
      required:
        - image
      description: Upscale an image to a higher resolution.
      example:
        creativity: 0.01
        image: iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAAAIGNIUk0A...
        scale: 2
    EditImageRequest:
      type: object
      properties:
        aspect_ratio:
          type: string
          enum:
            - auto
            - 1:1
            - 3:2
            - 16:9
            - 21:9
            - 9:16
            - 2:3
            - 3:4
            - 4:5
          description: The aspect ratio for the output image. Use 'auto' or omit this
            parameter to infer the closest supported aspect ratio from the input
            image when explicit sizing is required by the model. Supported
            values vary by model - check GET /api/v1/models for model-specific
            options.
          example: 16:9
        disable_prompt_optimization_thinking:
          type: boolean
          description: Skip the model's prompt-optimization thinking step for faster
            generation. Only supported by models with
            `supportsOptimizePromptThinking`; ignored by others. Omit to use the
            model default.
          example: false
        enhance_prompt:
          type: boolean
          description: Rewrite the edit prompt using the input image before editing to add
            clarifying detail. Additional credits are charged when a rewrite is
            generated. Adds up to ~30 seconds. When enhancement is applied, the
            final prompt is returned URL-encoded in the
            `x-venice-enhanced-prompt` response header. Defaults to false.
          example: false
        resolution:
          type: string
          minLength: 1
          maxLength: 10
          description: Resolution tier for the output image (e.g. "1K", "2K", "4K").
            Supported values vary by model - check GET /api/v1/models for
            model-specific options. Defaults to "1K" when not specified.
          example: 1K
        image:
          anyOf:
            - {}
            - type: string
            - type: string
              format: uri
          description: The image to edit. Can be either a file upload, a base64-encoded
            string, or a URL starting with http:// or https://. Image dimensions
            must be at least 65536 pixels and must not exceed 33177600 pixels.
            File size must be less than 25MB.
        model:
          type: string
          minLength: 1
          default: firered-image-edit
          description: The model ID to use for image editing.
        modelId:
          type: string
          minLength: 1
          description: 'Deprecated: Use "model" instead. The model ID to use for image
            editing.'
          deprecated: true
        output_format:
          type: string
          enum:
            - jpeg
            - png
            - webp
          description: "Output format for the edited image. Accepts jpeg, jpg, png, or
            webp. When omitted, the format is inferred from resolution: PNG for
            1K edits and JPEG for 2K/4K edits."
          example: png
        prompt:
          type: string
          minLength: 1
          maxLength: 32768
          description: The text directions to edit or modify the image. Short, descriptive
            prompts work best (e.g., "remove the tree", "change the sky to
            sunrise"). Character limit is model specific and is listed in the
            promptCharacterLimit setting in the model list endpoint.
          example: Change the color of the sky to a sunrise
        safe_mode:
          type: boolean
          default: true
          description: Whether to use safe mode. If enabled, this will blur images that
            are classified as having adult content.
          example: false
      required:
        - image
        - prompt
      additionalProperties: false
      description: Edit an image based on the supplied prompt.
      example:
        prompt: Colorize
        image: iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAAAIGNIUk0A...
    MultiEditImageRequest:
      type: object
      properties:
        aspect_ratio:
          type: string
          enum:
            - auto
            - 1:1
            - 3:2
            - 16:9
            - 21:9
            - 9:16
            - 2:3
            - 3:4
            - 4:5
          description: The aspect ratio for the output image. Use 'auto' or omit this
            parameter to infer the closest supported aspect ratio from the first
            input image when explicit sizing is required by the model.
          example: 16:9
        modelId:
          type: string
          minLength: 1
          default: firered-image-edit
          description: The model ID to use for multi-edit.
        output_format:
          type: string
          enum:
            - jpeg
            - png
            - webp
          description: "Output format for the edited image. Accepts jpeg, jpg, png, or
            webp. When omitted, the format is inferred from resolution: PNG for
            1K edits and JPEG for 2K/4K edits."
          example: png
        prompt:
          type: string
          minLength: 1
          maxLength: 32768
          description: The text directions to edit or modify the image. Short, descriptive
            prompts work best (e.g., "remove the tree", "change the sky to
            sunrise"). Character limit is model specific and is listed in the
            promptCharacterLimit setting in the model list endpoint.
        images:
          type: array
          items:
            anyOf:
              - type: string
                format: uri
              - type: string
            description: Image as a base64-encoded string or a URL starting with http:// or
              https://
          minItems: 1
          description: Images used for multi-editing (minimum 1). The maximum is
            model-specific — see `capabilities.maxInputImages` from GET
            /api/v1/models. The first image is treated as the base image, and
            the remaining images are used as edit layers/masks. Each image can
            be a base64-encoded string or a URL starting with http:// or
            https://. Image dimensions must be at least 65536 pixels and must
            not exceed 33177600 pixels. File size must be less than 25MB.
        quality:
          type: string
          enum:
            - low
            - medium
            - high
          description: Output quality for supported models (e.g. GPT Image 2 / GPT Image 2
            Edit). Higher values can increase the final request charge. See the
            model list for supported options.
          example: high
        resolution:
          type: string
          minLength: 1
          maxLength: 10
          description: Resolution tier for the output image (e.g. "1K", "2K", "4K").
            Supported values vary by model - check GET /api/v1/models for
            model-specific options. Defaults to "1K" when not specified.
          example: 1K
        safe_mode:
          type: boolean
          default: true
          description: Whether to use safe mode. If enabled, this will blur images that
            are classified as having adult content.
          example: false
        disable_prompt_optimization_thinking:
          type: boolean
          description: Skip the model's prompt-optimization thinking step for faster
            generation. Only supported by models with
            `supportsOptimizePromptThinking`; ignored by others. Omit to use the
            model default.
          example: false
        enhance_prompt:
          type: boolean
          description: Rewrite the edit prompt using the input images before editing to
            add clarifying detail. Additional credits are charged when a rewrite
            is generated. Adds up to ~30 seconds. When enhancement is applied,
            the final prompt is returned URL-encoded in the
            `x-venice-enhanced-prompt` response header. Defaults to false.
          example: false
      required:
        - prompt
        - images
      additionalProperties: false
      description: Edit an image by compositing multiple layered input images (up to
        the per-model maximum) with a single prompt. Supports base64-encoded
        strings and URLs.
    MultiEditImageMultipartRequest:
      type: object
      properties:
        aspect_ratio:
          type: string
          enum:
            - auto
            - 1:1
            - 3:2
            - 16:9
            - 21:9
            - 9:16
            - 2:3
            - 3:4
            - 4:5
          description: The aspect ratio for the output image. Use 'auto' or omit this
            parameter to infer the closest supported aspect ratio from the first
            input image when explicit sizing is required by the model.
          example: 16:9
        modelId:
          type: string
          minLength: 1
          default: firered-image-edit
          description: The model ID to use for multi-edit.
        output_format:
          type: string
          enum:
            - jpeg
            - png
            - webp
          description: "Output format for the edited image. Accepts jpeg, jpg, png, or
            webp. When omitted, the format is inferred from resolution: PNG for
            1K edits and JPEG for 2K/4K edits."
          example: png
        prompt:
          type: string
          minLength: 1
          maxLength: 32768
          description: The text directions to edit or modify the image. Short, descriptive
            prompts work best (e.g., "remove the tree", "change the sky to
            sunrise"). Character limit is model specific and is listed in the
            promptCharacterLimit setting in the model list endpoint.
        images:
          type: array
          items:
            type: string
            format: binary
          minItems: 1
          description: Image files (minimum 1). The maximum is model-specific — see
            `capabilities.maxInputImages` from GET /api/v1/models. The first
            image is treated as the base image, and the remaining images are
            used as edit layers/masks.
        quality:
          type: string
          enum:
            - low
            - medium
            - high
          description: Output quality for supported models (e.g. GPT Image 2 / GPT Image 2
            Edit). Higher values can increase the final request charge. See the
            model list for supported options.
          example: high
        resolution:
          type: string
          minLength: 1
          maxLength: 10
          description: Resolution tier for the output image (e.g. "1K", "2K", "4K").
            Supported values vary by model - check GET /api/v1/models for
            model-specific options. Defaults to "1K" when not specified.
          example: 1K
        safe_mode:
          type: boolean
          default: true
          description: Whether to use safe mode. If enabled, this will blur images that
            are classified as having adult content.
          example: false
        disable_prompt_optimization_thinking:
          type: boolean
          description: Skip the model's prompt-optimization thinking step for faster
            generation. Only supported by models with
            `supportsOptimizePromptThinking`; ignored by others. Omit to use the
            model default.
          example: false
        enhance_prompt:
          type: boolean
          description: Rewrite the edit prompt using the input images before editing to
            add clarifying detail. Additional credits are charged when a rewrite
            is generated. Adds up to ~30 seconds. When enhancement is applied,
            the final prompt is returned URL-encoded in the
            `x-venice-enhanced-prompt` response header. Defaults to false.
          example: false
      required:
        - prompt
        - images
      description: Edit an image by compositing multiple layered input image files (up
        to the per-model maximum) with a single prompt. Only file uploads are
        supported with multipart/form-data.
    BackgroundRemoveImageRequest:
      type: object
      properties:
        image:
          anyOf:
            - {}
            - type: string
          description: The image to remove the background from. Can be either a file
            upload or a base64-encoded string. File size must be less than 25MB.
        image_url:
          type: string
          format: uri
          description: URL of the image to remove the background from.
          example: https://example.com/image.jpg
      additionalProperties: false
      description: Remove the background from an image. Provide either an image
        file/base64 or an image URL.
      example:
        image_url: https://example.com/image.jpg
    CreateEmbeddingRequestSchema:
      type: object
      properties:
        dimensions:
          type: integer
          minimum: 1
          description: The number of dimensions the resulting output embeddings should have.
        encoding_format:
          type: string
          enum:
            - float
            - base64
          default: float
          description: The format to return the embeddings in. Can be either `float` or
            `base64`.
          example: float
        input:
          description: Input text to embed, encoded as a string or array of strings. To
            embed multiple inputs in a single request, pass an array of strings.
            The input must not exceed the max input tokens for the model (8192
            tokens), cannot be an empty string, and any array must contain 2048
            items or less. Token arrays are not supported and return HTTP 400.
            LangChain OpenAIEmbeddings sends token arrays unless you set
            check_embedding_ctx_length=False.
          anyOf:
            - description: The string that will be turned into an embedding. Cannot be an
                empty string.
              example: This is a test.
              minLength: 1
              title: string
              type: string
            - description: The array of strings that will be turned into an embedding. Array
                must contain 2048 items or less.
              example:
                - This is a test.
              items:
                type: string
              maxItems: 2048
              minItems: 1
              title: array
              type: array
          example: The quick brown fox jumped over the lazy dog
        model:
          anyOf:
            - type: string
            - type: string
              enum:
                - text-embedding-bge-m3
                - text-embedding-bge-en-icl
                - text-embedding-qwen3-8b
                - text-embedding-qwen3-0-6b
                - text-embedding-multilingual-e5-large-instruct
                - text-embedding-3-small
                - text-embedding-3-large
                - gemini-embedding-2-preview
                - text-embedding-nemotron-embed-vl-1b-v2
          description: ID of the model to use. You can use the List models API to see all
            of your available models, or see our Model overview for descriptions
            of them.
          example: text-embedding-bge-m3
        user:
          type: string
          description: This is an unused parameter and is discarded by Venice. It is
            supported solely for API compatibility with OpenAI.
      required:
        - input
        - model
      additionalProperties: false
      description: Create embeddings for the supplied input.
      example:
        encoding_format: float
        input: The quick brown fox jumped over the lazy dog
        model: text-embedding-bge-m3
    CreateSpeechRequestSchema:
      type: object
      properties:
        input:
          type: string
          minLength: 1
          maxLength: 4096
          description: The text to generate audio for. The maximum length is 4096
            characters.
          example: Hello, this is a test of the text to speech system.
        language:
          type: string
          minLength: 2
          maxLength: 32
          description: "Optional language hint. Accepted values are model-specific: Qwen 3
            accepts full names (English, Chinese, ...); xAI/ElevenLabs accept
            ISO 639-1 codes (en, ja, ...); MiniMax accepts full names.
            Unsupported values are silently ignored. Omit to let the model
            auto-detect."
          example: English
        model:
          type: string
          enum:
            - tts-kokoro
            - tts-qwen3-0-6b
            - tts-qwen3-1-7b
            - tts-xai-v1
            - tts-inworld-1-5-max
            - tts-chatterbox-hd
            - tts-orpheus
            - tts-elevenlabs-turbo-v2-5
            - tts-minimax-speech-02-hd
            - tts-gemini-3-1-flash
            - tts-gradium-v1
          default: tts-kokoro
          description: The model ID of a Venice TTS model.
          example: tts-xai-v1
        prompt:
          type: string
          maxLength: 500
          description: 'A style prompt to control the emotion and delivery of the speech.
            Supported by models advertising `supportsPromptParam` (currently
            Qwen 3 TTS). Ignored by other models. Examples: "Very happy.", "Sad
            and slow.", "Excited and energetic."'
          example: Very happy.
        response_format:
          type: string
          enum:
            - mp3
            - opus
            - aac
            - flac
            - wav
            - pcm
          description: Requested audio output format. Supported formats and the default
            when omitted are model-specific; see `model_spec.supported_formats`
            and `model_spec.default_format` from GET /models?type=tts. An
            explicit unsupported format returns HTTP 400.
          example: mp3
        speed:
          type: number
          minimum: 0.25
          maximum: 4
          default: 1
          description: The speed of the generated audio. Select a value from 0.25 to 4.0.
            1.0 is the default.
          example: 1
        streaming:
          type: boolean
          default: false
          description: Should the content stream back sentence by sentence or be processed
            and returned as a complete audio file.
          example: true
        temperature:
          type: number
          minimum: 0
          maximum: 2
          description: Sampling temperature for speech generation. Higher values produce
            more varied output. Supported by models advertising
            `supportsTemperatureParam` (Qwen 3, Orpheus, Chatterbox HD). Ignored
            by other models.
          example: 0.9
        top_p:
          type: number
          minimum: 0
          maximum: 1
          description: Nucleus sampling parameter. Supported by models advertising
            `supportsTopPParam` (currently Qwen 3 TTS). Ignored by other models.
          example: 1
        voice:
          type: string
          maxLength: 512
          default: af_sky
          description: "The voice to use when generating the audio. The maximum length is
            512 characters. Voices are model-specific: Kokoro (e.g. af_sky,
            af_bella, am_adam), Qwen 3 (e.g. Vivian, Serena, Dylan), xAI (26
            voices, e.g. eve, ara, rex, sal, leo, luna, orion, carina), Orpheus
            (tara, leah, jess, leo, dan, mia, zac, zoe), Inworld (Craig, Ashley,
            ...), Chatterbox (Aurora, Blade, ...), ElevenLabs Turbo (Rachel,
            Aria, ...), MiniMax (WiseWoman, DeepVoiceMan, ...), Gradium (Emma,
            Kent, Mia, Maximilian, Valentina, Sergio, Elise, Leo, Alice, Davi —
            spanning en/de/es/fr/pt). You can also pass a cloned-voice handle
            (`vv_<id>`) returned by POST /v1/audio/voices to synthesize in a
            previously cloned voice; the handle must be paired with the same
            model used to create it. Models that advertise
            `supports_custom_voice_id` (e.g. ElevenLabs) additionally accept a
            raw provider Voice ID here. Using an incompatible voice returns a
            400 error. Call GET /models/{id} to list voices for a specific
            model."
          example: af_sky
      required:
        - input
      additionalProperties: false
      description: Request to generate audio from text.
      example:
        input: Hello, welcome to Venice Voice.
        model: tts-xai-v1
        response_format: mp3
        speed: 1
        streaming: false
        voice: af_sky
    CreateTranscriptionRequestSchema:
      type: object
      properties:
        file:
          type: string
          description: "The audio file object (not a base64 string). Supported formats:
            WAV, WAVE, FLAC, M4A, AAC, MP4, MP3, OGG, OGA, WEBM."
          format: binary
        model:
          type: string
          enum:
            - nvidia/parakeet-tdt-0.6b-v3
            - openai/whisper-large-v3
            - fal-ai/wizper
            - elevenlabs/scribe-v2
            - stt-xai-v1
          default: nvidia/parakeet-tdt-0.6b-v3
          description: The model to use for transcription. See
            https://docs.venice.ai/models/overview for more information.
          example: openai/whisper-large-v3
        response_format:
          type: string
          enum:
            - json
            - text
          default: json
          description: "The format of the transcript output, in one of these options:
            json, text."
          example: json
        timestamps:
          type: boolean
          default: false
          description: Whether to include timestamps in the response.
          example: false
        language:
          type: string
          description: 'ISO 639-1 language code (e.g., "en", "es", "fr"). Optional - if
            not provided, the model will auto-detect the language. Note: Only
            supported by certain models (e.g., Whisper). Ignored by models that
            do not support language hints.'
          example: en
      additionalProperties: false
      description: Request to transcribe audio to text.
      example:
        file: "[audio file]"
        model: openai/whisper-large-v3
        response_format: json
        timestamps: false
    CreateClonedVoiceRequestSchema:
      type: object
      properties:
        file:
          type: string
          description: 'The voice sample audio file (multipart/form-data, field name
            "file"). Accepted containers depend on the selected model:
            `tts-chatterbox-hd` accepts MP3, WAV, FLAC, and M4A;
            `tts-minimax-speech-02-hd` accepts MP3 and WAV only. Recommended: a
            clean speech recording of at least 5–10 seconds.'
          format: binary
        model:
          type: string
          enum:
            - tts-chatterbox-hd
            - tts-minimax-speech-02-hd
          default: tts-chatterbox-hd
          description: The Venice TTS model the cloned voice will be paired with. The
            returned voice handle is only valid against this model on POST
            /v1/audio/speech.
          example: tts-chatterbox-hd
      description: Request to create a cloned voice from an audio sample. The returned
        `vv_<id>` handle is passed back as the `voice` parameter on POST
        /v1/audio/speech.
    QueueVideoRequest:
      type: object
      properties:
        model:
          type: string
          description: The model to use for video generation.
          example: seedance-2-0-text-to-video-basic
        consents:
          type: object
          properties:
            seedance:
              type: object
              properties:
                confirmed_terms_and_privacy:
                  type: boolean
                  enum:
                    - true
                  description: Confirms acceptance of the current provider policy text returned in
                    the needs_consent response.
                  example: true
                confirmed_legal_right:
                  type: boolean
                  enum:
                    - true
                  description: Confirms the API user has the legal right to use the submitted
                    media.
                  example: true
                confirmed_screening_acknowledged:
                  type: boolean
                  enum:
                    - true
                  description: Acknowledges that submitted media may be screened before
                    processing.
                  example: true
              required:
                - confirmed_terms_and_privacy
                - confirmed_legal_right
                - confirmed_screening_acknowledged
          description: Optional provider-specific consent attestations. Required only for
            models that return a needs_consent response.
        prompt:
          type: string
          minLength: 1
          maxLength: 20000
          description: The prompt to use for video generation. Required for most models.
            The maximum length varies by model (default 2500 characters, up to
            20000 for some models).
          example: Commerce being conducted in the city of Venice, Italy.
        negative_prompt:
          type: string
          maxLength: 20000
          description: Optional negative prompt. The maximum length varies by model
            (default 2500 characters, up to 20000 for some models).
          example: low resolution, error, worst quality, low quality, defects
        duration:
          type: string
          enum:
            - 1s
            - 2s
            - 3s
            - 4s
            - 5s
            - 6s
            - 7s
            - 8s
            - 9s
            - 10s
            - 11s
            - 12s
            - 13s
            - 14s
            - 15s
            - 16s
            - 17s
            - 18s
            - 19s
            - 20s
            - 21s
            - 22s
            - 23s
            - 24s
            - 25s
            - 26s
            - 27s
            - 28s
            - 29s
            - 30s
            - "-1"
            - 1 gen
            - auto
            - Auto
          description: The duration of the video to generate. Available options vary by
            model. For Seedance 2.5 reference-to-video edit jobs, `-1` or `auto`
            matches output length to the source clip (requires
            reference_video_urls on queue, or reference_video_total_duration on
            quote; source must be 4–30s).
          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
            - adaptive
            - auto
          description: The aspect ratio of the video. Available options vary by model.
            Some models do not support aspect_ratio. For Seedance 2.x
            reference-to-video edit/extend, `adaptive` or `auto` matches output
            aspect ratio to the source clip (requires reference_video_urls on
            queue, or reference_video_total_duration on quote).
          example: 16:9
        omni_reference_task_type:
          type: string
          enum:
            - auto
            - reference
            - edit
            - extend
          description: Optional Seedance 2.5 reference-to-video task-type hint forwarded
            to BytePlus (`auto` | `reference` | `edit` | `extend`). Aliases
            `editing`→`edit` and `extension`→`extend` are accepted on the queue
            API. Pre-guides classification to reduce async TaskTypeConstraint
            errors. The prompt must still match the chosen type. When omitted,
            Venice infers from the prompt if reference_video_urls are present.
            Not supported on other models.
          example: edit
        resolution:
          type: string
          enum:
            - 256p
            - 360p
            - 480p
            - 540p
            - 580p
            - 720p
            - 1080p
            - 1440p
            - 2160p
            - 4k
            - 2x
            - 4x
            - 2K
            - 768P
            - true_1080p
          description: The resolution of the video. Available options vary by model. Some
            models do not support resolution. Use upscale_factor for upscale
            models.
          example: 720p
        upscale_factor:
          type: integer
          description: For upscale models only. 1 = quality enhancement, 2 = double
            resolution (default), 4 = quadruple.
          enum:
            - 1
            - 2
            - 4
          default: 2
          example: 2
        audio:
          type: boolean
          default: true
          description: For models which support audio generation and configuration.
            Defaults to true.
          example: true
        image_url:
          type: string
          description: For image-to-video models, the reference image. Must be a URL
            (http/https) or a data URL (data:image/...).
          example: data:image/png;base64,iVBORw0K...
        end_image_url:
          type: string
          description: For models that support end images or transitions, the end frame
            image. Must be a URL or data URL.
          example: data:image/png;base64,iVBORw0K...
        audio_url:
          type: string
          description: "For models that support audio input, background music. Must be a
            URL or data URL. Supported: WAV, MP3. Max: 30s, 15MB."
          example: data:audio/mpeg;base64,SUQzBAA...
        video_url:
          type: string
          description: "For models that support video input (video-to-video, upscale).
            Must be a URL or data URL. Supported: MP4, MOV, WebM."
          example: data:video/mp4;base64,AAAAFGZ0eXA...
        reference_image_urls:
          type: array
          items:
            type: string
          maxItems: 30
          description: For models with reference image support, up to 30 images for
            character/style consistency. Each must be a URL or data URL.
          example:
            - data:image/png;base64,iVBORw0K...
        reference_video_urls:
          type: array
          items:
            type: string
          maxItems: 10
          description: 'For models with reference video support (e.g. Seedance 2.0 R2V),
            up to 10 reference video URLs (`role: "reference_video"`) used to
            inherit subject motion, camera movement, and overall style. Per-clip
            2–15 s, .mp4 or .mov, ≤50 MB; aggregate duration ≤15 s. Each must be
            a URL or data URL.'
          example:
            - https://example.com/reference-clip.mp4
        reference_audio_urls:
          type: array
          items:
            type: string
          maxItems: 10
          description: 'For models with reference audio support (e.g. Seedance 2.0 R2V),
            up to 10 reference audio URLs (`role: "reference_audio"`) used as
            donors for vocal timbre, narration, or sound effects. Per-clip 2–15
            s, .wav or .mp3; aggregate duration ≤15 s. Must be paired with at
            least one reference image or reference video — audio-only Reference
            workflows are rejected at validation. Each must be a URL or data
            URL.'
          example:
            - data:audio/mpeg;base64,SUQzBAAAAAA...
        reference_document_urls:
          type: array
          items:
            type: string
          maxItems: 1
          description: 'For models with document / webpage Omni-Reference (Wan 3.0), up to
            1 URL. Document files and public webpage URLs are fetched by Venice
            and forwarded as `type: "file"` (≤100 MB). Each must be a URL or
            data URL.'
          example:
            - https://example.com/brief.pdf
        elements:
          type: array
          items:
            type: object
            properties:
              frontal_image_url:
                type: string
              reference_image_urls:
                type: array
                items:
                  type: string
                maxItems: 3
              video_url:
                type: string
          maxItems: 4
          description: For models with advanced element support (e.g., Kling O3 R2V). Up
            to 4 elements defining characters/objects. Reference in prompt as
            @Element1, @Element2, etc.
          example:
            - frontal_image_url: data:image/png;base64,iVBORw0K...
              reference_image_urls:
                - data:image/png;base64,iVBORw0K...
        scene_image_urls:
          type: array
          items:
            type: string
          maxItems: 4
          description: For models with advanced element support. Up to 4 scene reference
            images. Reference in prompt as @Image1, @Image2, etc.
          example:
            - data:image/png;base64,iVBORw0K...
        keyframes:
          type: array
          items:
            type: object
            properties:
              image_url:
                type: string
              frame_index:
                type: integer
                minimum: 0
            required:
              - image_url
              - frame_index
          maxItems: 10
          description: For keyframe-driven models. Up to 10 keyframe images pinned to
            frame positions in the generated 24 fps video. Each frame_index must
            be unique and no greater than duration × 24.
          example:
            - image_url: data:image/png;base64,iVBORw0K...
              frame_index: 0
            - image_url: data:image/png;base64,iVBORw0K...
              frame_index: 120
      required:
        - model
        - prompt
        - duration
      description: Request body for video generation. Available fields and valid
        values vary by model.
    QuoteVideoRequest:
      type: object
      properties:
        model:
          type: string
          description: The model to get a price quote for.
          example: seedance-2-0-text-to-video-basic
        duration:
          type: string
          enum:
            - 1s
            - 2s
            - 3s
            - 4s
            - 5s
            - 6s
            - 7s
            - 8s
            - 9s
            - 10s
            - 11s
            - 12s
            - 13s
            - 14s
            - 15s
            - 16s
            - 17s
            - 18s
            - 19s
            - 20s
            - 21s
            - 22s
            - 23s
            - 24s
            - 25s
            - 26s
            - 27s
            - 28s
            - 29s
            - 30s
            - "-1"
            - 1 gen
            - auto
            - Auto
          description: The duration of the video. Available options vary by model. For
            Seedance 2.5 reference-to-video edit jobs, `-1` or `auto` matches
            output length to the source clip (requires reference_video_urls on
            queue, or reference_video_total_duration on quote; source must be
            4–30s).
          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
            - adaptive
            - auto
          description: The aspect ratio. Required for some models with megapixel-rate
            pricing. For Seedance 2.x reference-to-video edit/extend, `adaptive`
            or `auto` matches output aspect ratio to the source clip (requires
            reference_video_urls on queue, or reference_video_total_duration on
            quote).
          example: 16:9
        resolution:
          type: string
          enum:
            - 256p
            - 360p
            - 480p
            - 540p
            - 580p
            - 720p
            - 1080p
            - 1440p
            - 2160p
            - 4k
            - 2x
            - 4x
            - 2K
            - 768P
            - 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 / 2.5 R2V), the aggregate
            duration in seconds of all reference videos to include in the quote
            (max 150s; per-clip and family caps vary by model). When provided,
            the quote reflects the BytePlus 'input with video' rate tier and the
            (input+output)×pixels token formula. Required when quoting Seedance
            source-matched duration (`-1`/`auto`) or aspect ratio
            (`adaptive`/`auto`). When omitted for ordinary fixed-duration
            quotes, 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.
    CompleteVideoRequest:
      type: object
      properties:
        model:
          type: string
          description: The ID of the model used for video generation.
          example: video-model-123
        queue_id:
          type: string
          description: The ID of the video generation request.
          example: 123e4567-e89b-12d3-a456-426614174000
      required:
        - model
        - queue_id
      additionalProperties: false
    RetrieveVideoRequest:
      type: object
      properties:
        model:
          type: string
          description: The ID of the model used for video generation.
          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.
          example: false
      required:
        - model
        - queue_id
      additionalProperties: false
    CreateVideoTranscriptionRequestSchema:
      type: object
      properties:
        url:
          type: string
          description: YouTube video URL to transcribe.
          example: https://www.youtube.com/watch?v=dQw4w9WgXcQ
        response_format:
          type: string
          enum:
            - json
            - text
          default: json
          description: "The format of the transcript output, in one of these options:
            json, text."
          example: json
      required:
        - url
      additionalProperties: false
      description: Request to transcribe a YouTube video URL to text.
    TextParserRequest:
      type: object
      properties:
        file:
          type: string
          description: "The document file to parse. Supported formats: PDF, EPUB, DOCX,
            PPTX, XLSX, plain text, Markdown, CSV, JSON, and most source-code
            files (e.g., .py, .js, .ts, .c, .cpp, .java, .go, .rs, .ps1, .sh,
            .yaml, .sql). Maximum size: 25MB."
          format: binary
        response_format:
          type: string
          enum:
            - json
            - text
          default: json
          description: The format of the response output. "json" returns structured JSON,
            "text" returns only the extracted text.
          example: json
      description: Request to parse and extract text from a document file.
      example:
        file: "[document file]"
        response_format: json
    TextParserResponse:
      type: object
      properties:
        text:
          type: string
          description: The extracted text content from the document.
        tokens:
          type: number
          description: The token count of the extracted text.
      required:
        - text
        - tokens
      description: Text parser response containing extracted text and token count.
    QueueAudioRequest:
      type: object
      properties:
        model:
          type: string
          description: The model to use for audio generation.
          example: elevenlabs-music
        prompt:
          type: string
          minLength: 1
          description: The prompt describing the audio to generate. Minimum and maximum
            prompt lengths vary by model; inspect `/models` for
            `min_prompt_length` and `prompt_character_limit`.
          example: A warm spoken narration introducing a product launch.
        lyrics_prompt:
          type: string
          description: Optional lyrics/text for lyric-capable models. Required when
            `/models` reports `lyrics_required=true`; unsupported when `/models`
            reports `supports_lyrics=false`.
          example: "Verse 1: Walking through the city lights..."
        duration_seconds:
          anyOf:
            - type: integer
              minimum: 0
              exclusiveMinimum: true
            - type: string
              pattern: ^\d+$
          description: Optional duration hint in seconds. Only supported for models that
            expose duration metadata via `/models`. Accepts either an integer or
            a numeric string. If omitted, the model default duration is used
            when available.
          example: 60
        force_instrumental:
          type: boolean
          description: Optional instrumental toggle. Only supported when `/models` reports
            `supports_force_instrumental=true`.
          example: false
        lyrics_optimizer:
          type: boolean
          description: When enabled, auto-generates lyrics from the prompt. Only supported
            when `/models` reports `supports_lyrics_optimizer=true`.
            lyrics_prompt must be empty when this is true.
          example: false
        loop:
          type: boolean
          description: Render the clip so its end splices back into its start without an
            audible seam. Only supported when `/models` reports
            `supports_loop=true`.
          example: false
        voice:
          type: string
          description: Optional voice selection for voice-enabled models. See
            `/models?type=music` for the model's supported `voices` and
            `default_voice`.
          example: Aria
        language_code:
          type: string
          description: Optional ISO 639-1 language code. Only supported when `/models`
            reports `supports_language_code=true`.
          example: en
        speed:
          type: number
          minimum: 0.25
          maximum: 4
          description: Optional audio speed multiplier. Only supported when `/models`
            reports `supports_speed=true`; use the model-specific `min_speed`
            and `max_speed` values.
          example: 1
      required:
        - model
        - prompt
      additionalProperties: false
    QuoteAudioRequest:
      type: object
      properties:
        model:
          type: string
          description: The model to get a price quote for.
          example: elevenlabs-music
        duration_seconds:
          anyOf:
            - type: integer
              minimum: 0
              exclusiveMinimum: true
            - type: string
              pattern: ^\d+$
          description: Optional duration hint in seconds. Only supported for models that
            expose duration metadata via `/models`. Accepts either an integer or
            a numeric string. If omitted, the model default duration is used
            when available.
          example: 60
        character_count:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: Optional character count for character-based pricing models.
            Required when the selected model uses
            `pricing.per_thousand_characters` in `/models`.
          example: 100
      required:
        - model
      additionalProperties: false
    CompleteAudioRequest:
      type: object
      properties:
        model:
          type: string
          description: The ID of the model used for audio generation.
          example: elevenlabs-music
        queue_id:
          type: string
          description: The ID of the audio generation request. Use this to poll for status
            and retrieve the result.
          example: 123e4567-e89b-12d3-a456-426614174000
      required:
        - model
        - queue_id
      additionalProperties: false
    RetrieveAudioRequest:
      type: object
      properties:
        model:
          type: string
          description: The ID of the model used for audio generation.
          example: elevenlabs-music
        queue_id:
          type: string
          description: The ID of the audio generation request. Use this to poll for status
            and retrieve the result.
          example: 123e4567-e89b-12d3-a456-426614174000
        delete_media_on_completion:
          type: boolean
          default: false
          description: If true, the audio 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 audio.
          example: false
      required:
        - model
        - queue_id
      additionalProperties: false
    BillingBalanceResponse:
      type: object
      properties:
        canConsume:
          type: boolean
          description: Whether the user has sufficient balance to make API requests
          example: true
        consumptionCurrency:
          type: string
          nullable: true
          enum:
            - USD
            - VCU
            - DIEM
            - BUNDLED_CREDITS
          description: The currency that will be used for consumption (DIEM or USD)
          example: DIEM
        balances:
          type: object
          properties:
            diem:
              type: number
              nullable: true
              description: Remaining DIEM balance for current epoch. Null if not staking.
              example: 90.5
            usd:
              type: number
              nullable: true
              description: Remaining USD balance. Null if not available.
              example: 25
          required:
            - diem
            - usd
        diemEpochAllocation:
          type: number
          description: Total DIEM allocation for the current epoch (from staking). Use
            with balances.diem to calculate usage percentage.
          example: 100
      required:
        - canConsume
        - consumptionCurrency
        - balances
        - diemEpochAllocation
      additionalProperties: false
      description: Current balance information for the authenticated user
      example:
        canConsume: true
        consumptionCurrency: DIEM
        balances:
          diem: 90.5
          usd: 25
        diemEpochAllocation: 100
    BillingUsageAnalyticsRequest:
      type: object
      properties:
        lookback:
          type: string
          pattern: ^[1-9]\d*d$
          default: 7d
          description: 'Lookback period for usage data. Format: number followed by "d"
            (e.g., "7d", "30d"). Maximum: 90d'
          example: 7d
        startDate:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
          description: Start date for filtering records (YYYY-MM-DD). If provided, endDate
            is also required.
          example: 2024-01-01
        endDate:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
          description: End date for filtering records (YYYY-MM-DD). If provided, startDate
            is also required.
          example: 2024-01-31
    BillingUsageAnalyticsResponse:
      type: object
      properties:
        lookback:
          type: string
          description: The lookback period used for the query. Either "Nd" format or
            "startDate:endDate" format.
          example: 7d
        byDate:
          type: array
          items:
            type: object
            properties:
              date:
                type: string
                description: Date in YYYY-MM-DD format
                example: 2024-01-15
              USD:
                type: number
                description: Total USD usage for this date
              DIEM:
                type: number
                description: Total DIEM usage for this date
            required:
              - date
              - USD
              - DIEM
          description: Daily usage totals for the requested period
        byModel:
          type: array
          items:
            type: object
            properties:
              modelName:
                type: string
                description: Display name of the model
                example: GLM 5.1
              unitType:
                type: string
                description: Type of units (tokens, images, chars, minutes, seconds)
                example: tokens
              modelType:
                type: string
                nullable: true
                description: Type of model (LLM, IMAGE, TTS, ASR, VIDEO)
                example: LLM
              totalUsd:
                type: number
                description: Total USD usage for this model
              totalDiem:
                type: number
                description: Total DIEM usage for this model
              totalUnits:
                type: number
                description: Total units consumed for this model
              breakdown:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      description: Token type (e.g., "Input", "Output", "Cache Read", "Cache Write")
                    usd:
                      type: number
                      description: USD amount for this breakdown
                    diem:
                      type: number
                      description: DIEM amount for this breakdown
                    units:
                      type: number
                      description: Number of units for this breakdown
                  required:
                    - type
                    - usd
                    - diem
                    - units
                description: Breakdown by token type (only present if multiple types)
            required:
              - modelName
              - unitType
              - modelType
              - totalUsd
              - totalDiem
              - totalUnits
          description: Usage breakdown by model, sorted by total spend (highest first)
        byModelDaily:
          type: array
          items:
            type: object
            additionalProperties:
              type: number
          description: Daily chart data for top 8 models. Each entry has "date"
            (timestamp) plus model names as keys.
        topModels:
          type: array
          items:
            type: string
          description: Names of the top 8 models by usage (for chart legends)
        byKey:
          type: array
          items:
            type: object
            properties:
              apiKeyId:
                type: string
                nullable: true
                description: API key ID, or null if usage was from web app
              description:
                type: string
                description: API key description or "Web App"
                example: My Production Key
              totalUsd:
                type: number
                description: Total USD usage for this key
              totalDiem:
                type: number
                description: Total DIEM usage for this key
              totalUnits:
                type: number
                description: Total units consumed for this key
            required:
              - apiKeyId
              - description
              - totalUsd
              - totalDiem
              - totalUnits
          description: Usage breakdown by API key, sorted by total spend (highest first)
        byKeyDaily:
          type: array
          items:
            type: object
            additionalProperties:
              type: number
          description: Daily chart data for top 8 API keys. Each entry has "date"
            (timestamp) plus key descriptions as keys.
        topKeyNames:
          type: array
          items:
            type: string
          description: Descriptions of the top 8 API keys by usage (for chart legends)
      required:
        - lookback
        - byDate
        - byModel
        - byModelDaily
        - topModels
        - byKey
        - byKeyDaily
        - topKeyNames
      additionalProperties: false
      description: Aggregated usage analytics response with breakdowns by date, model,
        and API key
      example:
        lookback: 7d
        byDate:
          - date: 2024-01-15
            USD: 0.5
            DIEM: 10.25
          - date: 2024-01-14
            USD: 0.3
            DIEM: 8.75
        byModel:
          - modelName: GLM 5.1
            unitType: tokens
            modelType: LLM
            totalUsd: 0.4
            totalDiem: 12.5
            totalUnits: 50000
            breakdown:
              - type: Output
                usd: 0.3
                diem: 10
                units: 35000
              - type: Input
                usd: 0.1
                diem: 2.5
                units: 15000
        byModelDaily:
          - date: 1705276800000
            GLM 5.1: 5.5
            Kimi K2.6: 3.2
        topModels:
          - GLM 5.1
          - Kimi K2.6
        byKey:
          - apiKeyId: key_abc123
            description: Production Key
            totalUsd: 0.8
            totalDiem: 15
            totalUnits: 75000
          - apiKeyId: null
            description: Web App
            totalUsd: 0
            totalDiem: 4
            totalUnits: 25000
        byKeyDaily:
          - date: 1705276800000
            Production Key: 8.5
            Web App: 2
        topKeyNames:
          - Production Key
          - Web App
    BillingUsageHistoryRequest:
      type: object
      properties:
        currency:
          type: string
          enum:
            - USD
            - DIEM
            - BUNDLED_CREDITS
          description: Filter by consumable currency
          example: USD
        cursor:
          type: string
          maxLength: 512
          pattern: ^[A-Za-z0-9_-]+$
          description: Opaque continuation token from a previous response's nextCursor.
            The cursor carries the filters of the walk it continues, so no
            filter parameters may be sent alongside it.
          example: AZq3fK9tXhIVDm2j4vN8cQwYt1sB6uEoLxRgPzKaJdHfM5nC7yW0K3w
        endTimestamp:
          type: string
          maxLength: 40
          format: date-time
          description: Exclusive upper bound on entry timestamps (ISO 8601 UTC, "Z"
            suffix). Must be later than startTimestamp; consecutive windows
            sharing a boundary walk the history without gaps or overlaps.
            Carried forward by the cursor.
          example: 2026-07-01T00:00:00Z
        pageSize:
          type: integer
          minimum: 10
          maximum: 1000
          default: 1000
          description: Number of entries per page. Carried forward by the cursor.
          example: 1000
        startTimestamp:
          type: string
          maxLength: 40
          format: date-time
          description: 'Inclusive lower bound on entry timestamps (ISO 8601 UTC, "Z"
            suffix). First page only: a continuation resumes from the cursor
            position instead.'
          example: 2026-06-01T00:00:00Z
    BillingUsageHistoryResponse:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              amount:
                type: number
                description: The total amount charged for the billing usage entry
              currency:
                type: string
                enum:
                  - USD
                  - DIEM
                  - BUNDLED_CREDITS
                description: The currency charged for the billing usage entry
                example: USD
              inferenceDetails:
                type: object
                nullable: true
                properties:
                  completionTokens:
                    type: integer
                    nullable: true
                    minimum: 0
                    description: Number of tokens used in the completion. null for non-LLM usage or
                      when the count was not recorded.
                  inferenceExecutionTime:
                    type: integer
                    nullable: true
                    minimum: 0
                    description: Time taken for inference execution in milliseconds. null when the
                      timing was not recorded.
                  promptTokens:
                    type: integer
                    nullable: true
                    minimum: 0
                    description: Number of tokens requested in the prompt. null for non-LLM usage or
                      when the count was not recorded.
                  requestId:
                    type: string
                    description: Unique identifier for the inference request
                required:
                  - completionTokens
                  - inferenceExecutionTime
                  - promptTokens
                  - requestId
                additionalProperties: false
                description: Details about the related inference request, if applicable
              notes:
                type: string
                description: Notes about the billing usage entry
              pricePerUnitUsd:
                type: number
                description: The price per unit in USD
              sku:
                type: string
                description: The product associated with the billing usage entry
              timestamp:
                type: string
                maxLength: 40
                format: date-time
                description: The timestamp the billing usage entry was created (ISO 8601)
                example: 2026-06-15T19:05:10.504Z
              units:
                type: number
                description: The number of units consumed
            required:
              - amount
              - currency
              - inferenceDetails
              - notes
              - pricePerUnitUsd
              - sku
              - timestamp
              - units
            additionalProperties: false
          maxItems: 1000
          description: Usage entries in ascending timestamp order
        nextCursor:
          type: string
          nullable: true
          maxLength: 512
          pattern: ^[A-Za-z0-9_-]+$
          description: Continuation token for the next page, to be sent as the cursor
            query parameter. null means this is the last page.
      required:
        - data
        - nextCursor
      additionalProperties: false
      description: The response schema for the billing usage history endpoint
      example:
        data:
          - amount: -0.1
            currency: DIEM
            inferenceDetails: null
            notes: API Inference
            pricePerUnitUsd: 0.1
            sku: grok-imagine-image-image-unit
            timestamp: 2026-06-14T19:52:45.087Z
            units: 1
          - amount: -0.06356
            currency: DIEM
            inferenceDetails:
              completionTokens: 227
              inferenceExecutionTime: 2964
              promptTokens: 339
              requestId: chatcmpl-4007fd29f42b7d3c4107f4345e8d174a
            notes: API Inference
            pricePerUnitUsd: 2.8
            sku: zai-org-glm-5-1-llm-output-mtoken
            timestamp: 2026-06-15T19:05:10.504Z
            units: 0.000227
        nextCursor: AZq3fK9tXhIVDm2j4vN8cQwYt1sB6uEoLxRgPzKaJdHfM5nC7yW0K3w
    WebScrapeRequest:
      type: object
      properties:
        url:
          type: string
          format: uri
          description: The URL to scrape
          example: https://example.com
      required:
        - url
    WebSearchRequest:
      type: object
      properties:
        query:
          type: string
          minLength: 1
          maxLength: 400
          description: The search query
          example: latest news about AI
        limit:
          type: integer
          minimum: 1
          maximum: 20
          default: 10
          description: "Maximum number of results to return (default: 10, max: 20)"
          example: 10
        search_provider:
          type: string
          enum:
            - google
            - brave
          description: Search provider to use. "brave" uses Brave Search with Zero Data
            Retention (ZDR) for maximum privacy — search queries are never
            stored or logged. "google" uses Google Search with anonymized
            queries — searches are proxied through Venice's infrastructure so
            that your identity is not associated with the search request sent to
            Google. Venice does not store or log search queries. Defaults to
            "brave".
          example: brave
      required:
        - query
    ModelResponse:
      type: object
      properties:
        context_length:
          type: number
          description: The context length (maximum input tokens) supported by the model.
            Only present for text models. This is a standard OpenAI-compatible
            field that mirrors model_spec.availableContextTokens for client
            compatibility.
          example: 131072
        created:
          type: number
          description: Release date on Venice API
          example: 1699000000
        discount_to_user:
          type: number
          minimum: 0
          exclusiveMinimum: true
          maximum: 1
          exclusiveMaximum: true
          description: "Fractional discount carried by a reseller agreement covering this
            model, e.g. 0.2 for 20% off, following the OpenRouter convention of
            publishing a base price alongside a separate discount fraction: user
            price = base price × (1 - discount_to_user). Returned only to the
            reselling partner whose agreement it belongs to, and omitted for
            every other caller and for models no agreement covers, so an
            integration should treat an absent field as no discount. Always
            greater than 0 and less than 1. Prices in model_spec.pricing are the
            undiscounted base rate and are what Venice bills, so callers buying
            from Venice directly rather than through a reseller should ignore
            this field."
          example: 0.2
        id:
          type: string
          description: Model ID
          example: gemini-3-6-flash
        model_spec:
          type: object
          properties:
            availableContextTokens:
              type: number
              description: The context length supported by the model. Only applicable for text
                models.
              example: 1000000
            maxCompletionTokens:
              type: number
              description: The maximum number of completion tokens the model can generate. Use
                this to know the upper bound for the max_completion_tokens
                request parameter. Only applicable for text models.
              example: 65536
            beta:
              type: boolean
              description: Is this model restricted to beta users only? If true, only users
                with beta access can use this model
              example: false
            betaModel:
              type: boolean
              description: Is this model in beta status?
              example: false
            privacy:
              type: string
              enum:
                - private
                - anonymized
              description: The privacy mode of the model. Private models have zero data
                retention. Anonymized models Venice can not guarantee privacy
                on, but requests are not affiliated with a user
              example: private
            regionRestrictions:
              type: array
              items:
                type: string
              description: Country codes where this model is intended to be available. Only
                present for models with region restrictions metadata.
              example:
                - US
            deprecation:
              type: object
              properties:
                autoRemap:
                  type: boolean
                  description: When true, Venice may automatically remap API requests for this
                    model ID to replacementModelId instead of returning an
                    error.
                  example: false
                date:
                  type: string
                  description: Legacy ISO 8601 instant aligned with the deprecation sunset used in
                    response headers (`x-venice-model-deprecation-date`). Prefer
                    startsAt / removesAt for new integrations.
                  example: 2025-03-01T00:00:00.000Z
                removesAt:
                  type: string
                  description: ISO 8601 instant when this model ID is omitted from public GET
                    /models listings (same value as `date` today). Consumers
                    should treat the current wall-clock time as past this
                    instant when deciding whether the model remains listed.
                  example: 2025-04-01T00:00:00.000Z
                replacementModelId:
                  type: string
                  description: Suggested public API model ID to migrate to, when one exists.
                  example: llama-3-3-70b
                startsAt:
                  type: string
                  description: ISO 8601 instant when deprecation warnings and documentation should
                    be considered active for this model.
                  example: 2025-03-01T00:00:00.000Z
              required:
                - autoRemap
                - date
                - removesAt
              description: Deprecation information for the model. Only present for models
                scheduled to be retired
              example:
                autoRemap: false
                date: 2025-03-01T00:00:00.000Z
                removesAt: 2025-03-01T00:00:00.000Z
            capabilities:
              type: object
              properties:
                optimizedForCode:
                  type: boolean
                  description: Is the LLM optimized for coding?
                  example: true
                quantization:
                  type: string
                  enum:
                    - fp4
                    - fp8
                    - fp16
                    - bf16
                    - int8
                    - int4
                    - not-available
                  description: The quantization type of the running model.
                  example: fp8
                supportsFunctionCalling:
                  type: boolean
                  description: Does the LLM model support function calling?
                  example: true
                supportsAudioInput:
                  type: boolean
                  description: Does the LLM support audio input?
                  example: false
                supportsReasoning:
                  type: boolean
                  description: Does the model support reasoning with <thinking> blocks of output.
                  example: true
                supportsReasoningEffort:
                  type: boolean
                  description: Does the model support the reasoning_effort parameter to control
                    reasoning depth.
                  example: true
                reasoningEffortOptions:
                  type: array
                  items:
                    type: string
                    enum:
                      - none
                      - minimal
                      - low
                      - medium
                      - high
                      - xhigh
                      - max
                  description: Supported reasoning_effort values for this model. Only present when
                    supportsReasoningEffort is true. The "none" option means
                    reasoning can be disabled.
                  example:
                    - none
                    - low
                    - medium
                    - high
                defaultReasoningEffort:
                  type: string
                  enum:
                    - none
                    - minimal
                    - low
                    - medium
                    - high
                    - xhigh
                    - max
                  description: Default reasoning_effort value used when the request does not
                    specify one. Only present when supportsReasoningEffort is
                    true.
                  example: medium
                supportsResponseSchema:
                  type: boolean
                  description: Does the LLM model support response schema? Only models that
                    support function calling can support response_schema.
                  example: true
                supportsMultipleImages:
                  type: boolean
                  description: Does the LLM support multiple images in a single request? Only
                    applicable when supportsVision is true.
                  example: true
                maxImages:
                  type: number
                  description: Maximum number of images supported per request. Only present when
                    supportsMultipleImages is true.
                  example: 10
                maxVideos:
                  type: number
                  description: Maximum number of video attachments supported per chat request.
                    Only present when supportsVideoInput is true.
                  example: 4
                supportsVision:
                  type: boolean
                  description: Does the LLM support vision?
                  example: true
                supportsVideoInput:
                  type: boolean
                  description: Does the LLM support video input?
                  example: true
                supportsWebSearch:
                  type: boolean
                  description: Does the LLM model support web search?
                  example: true
                supportsLogProbs:
                  type: boolean
                  description: Does the LLM model support logprobs parameter?
                  example: true
                supportsTeeAttestation:
                  type: boolean
                  description: Does the model run inside a Trusted Execution Environment (TEE)
                    with hardware attestation? When true, use GET
                    /tee/attestation and GET /tee/signature to cryptographically
                    verify that inference occurred inside a genuine TEE.
                  example: false
                supportsE2EE:
                  type: boolean
                  description: Does the model support End-to-End Encryption (E2EE)? When true,
                    clients can encrypt prompts using the TEE public key from
                    attestation, and responses are returned encrypted. Requires
                    supportsTeeAttestation to also be true.
                  example: false
                supportsXSearch:
                  type: boolean
                  description: Does the model support xAI's native X Search (web + X/Twitter
                    search)? When true, you can use
                    venice_parameters.enable_x_search to activate real-time
                    search powered by xAI.
                  example: false
              required:
                - optimizedForCode
                - quantization
                - supportsFunctionCalling
                - supportsAudioInput
                - supportsReasoning
                - supportsReasoningEffort
                - supportsResponseSchema
                - supportsMultipleImages
                - supportsVision
                - supportsVideoInput
                - supportsWebSearch
                - supportsLogProbs
                - supportsTeeAttestation
                - supportsE2EE
                - supportsXSearch
              additionalProperties: false
              description: Text model specific capabilities.
            constraints:
              anyOf:
                - type: object
                  properties:
                    aspectRatios:
                      type: array
                      items:
                        type: string
                      description: Supported aspect ratio options for this model. Only present for
                        models that support aspect ratio selection.
                      example:
                        - 1:1
                        - 16:9
                        - 9:16
                        - 3:2
                        - 2:3
                    defaultAspectRatio:
                      type: string
                      description: The default aspect ratio for this model. Only present for models
                        that support aspect ratio selection.
                      example: 1:1
                    defaultResolution:
                      type: string
                      description: The default resolution for this model. Only present for models that
                        support resolution selection.
                      example: 1K
                    resolutions:
                      type: array
                      items:
                        type: string
                      description: Supported resolution options for this model. Only present for
                        models that support resolution selection.
                      example:
                        - 1K
                        - 2K
                        - 4K
                    defaultQuality:
                      type: string
                      enum:
                        - low
                        - medium
                        - high
                      description: The default quality for this model. Only present for models that
                        accept the `quality` request parameter (currently GPT
                        Image 2).
                      example: high
                    qualities:
                      type: array
                      items:
                        type: string
                        enum:
                          - low
                          - medium
                          - high
                      description: Supported quality options for this model. Only present for models
                        that accept the `quality` request parameter (currently
                        GPT Image 2).
                      example:
                        - low
                        - medium
                        - high
                    promptCharacterLimit:
                      type: number
                      description: The maximum supported prompt length.
                      example: 2048
                    steps:
                      type: object
                      properties:
                        default:
                          type: number
                          description: The default steps value for the model
                          example: 25
                        max:
                          type: number
                          description: The maximum supported steps value for the model
                          example: 50
                      required:
                        - default
                        - max
                    widthHeightDivisor:
                      type: number
                      description: The requested width and height of the image generation must be
                        divisible by this value.
                      example: 8
                    maxStyleReferences:
                      type: number
                      description: Maximum number of style_references accepted by POST
                        /image/generate. Only present for models that support
                        style references.
                      example: 3
                    supportsStyleReferenceStrength:
                      type: boolean
                      description: Whether per-reference `strength` is honored. When false,
                        style_references strength is ignored. Only present for
                        models that support style references.
                      example: true
                  required:
                    - promptCharacterLimit
                    - steps
                    - widthHeightDivisor
                  description: Constraints that apply to image models.
                  title: Image Model Constraints
                - type: object
                  properties:
                    temperature:
                      type: object
                      properties:
                        default:
                          type: number
                          description: The default temperature value for the model
                          example: 0.7
                      required:
                        - default
                    top_p:
                      type: object
                      properties:
                        default:
                          type: number
                          description: The default top_p value for the model
                          example: 0.9
                      required:
                        - default
                    frequency_penalty:
                      type: object
                      properties:
                        default:
                          type: number
                          description: The default frequency_penalty value for the model
                          example: 0
                      required:
                        - default
                    presence_penalty:
                      type: object
                      properties:
                        default:
                          type: number
                          description: The default presence_penalty value for the model
                          example: 0
                      required:
                        - default
                    repetition_penalty:
                      type: object
                      properties:
                        default:
                          type: number
                          description: The default repetition_penalty value for the model
                          example: 1.05
                      required:
                        - default
                  required:
                    - temperature
                    - top_p
                  description: Constraints that apply to text models.
                  title: Text Model Constraints
                - type: object
                  properties:
                    aspect_ratios:
                      type: array
                      items:
                        type: string
                      description: The aspect ratios supported by the model. Empty array means the
                        model does not support a defined aspect ratio.
                      example:
                        - 16:9
                        - 9:16
                    resolutions:
                      type: array
                      items:
                        type: string
                      description: The resolutions supported by the model. Empty array means the model
                        does not support a defined resolution.
                      example:
                        - 1080p
                        - 720p
                        - 480p
                    durations:
                      type: array
                      items:
                        type: string
                      description: The durations supported by the model. Empty array means the model
                        does not support a defined duration.
                      example:
                        - 5s
                        - 10s
                        - 15s
                        - 20s
                        - 30s
                    model_type:
                      type: string
                      enum:
                        - image-to-video
                        - text-to-video
                        - video
                      description: The type of video model.
                      example: image-to-video
                    audio:
                      type: boolean
                      description: Does the model support audio generation?
                      example: true
                    audio_configurable:
                      type: boolean
                      description: Can audio be enabled or disabled for the video generation?
                      example: true
                    prompt_character_limit:
                      type: number
                      description: The maximum supported prompt length for this video model. If not
                        specified, the default is 2500 characters.
                      example: 1000
                  required:
                    - aspect_ratios
                    - resolutions
                    - durations
                    - model_type
                    - audio
                    - audio_configurable
                  description: Constraints that apply to video models.
                  title: Video Model Constraints
                - type: object
                  properties:
                    aspectRatios:
                      type: array
                      items:
                        type: string
                      description: The aspect ratios supported by this model. Omit the parameter to
                        use the model's default setting.
                      example:
                        - auto
                        - 1:1
                        - 16:9
                        - 9:16
                    promptCharacterLimit:
                      type: number
                      description: The maximum supported prompt length.
                      example: 1500
                    combineImages:
                      type: boolean
                      description: Whether this model supports combining multiple input images.
                      example: true
                    maxInputImages:
                      type: integer
                      minimum: 0
                      exclusiveMinimum: true
                      description: Maximum number of input images accepted for combine/multi-edit.
                        Absent means the default of 3 (or 1 when combineImages
                        is false).
                      example: 14
                    singleImageAspectRatio:
                      type: boolean
                      description: If false, output dimensions match the input on single-image edits
                        and `aspect_ratio` is ignored. Multi-image edits are
                        unaffected. Defaults to true.
                      example: true
                    defaultResolution:
                      type: string
                      description: The default resolution for this inpaint model. Only present for
                        models that support resolution selection (e.g. GPT Image
                        2 Edit).
                      example: 1K
                    resolutions:
                      type: array
                      items:
                        type: string
                      description: Supported resolution options for this inpaint model. Only present
                        for models that support resolution selection.
                      example:
                        - 1K
                        - 2K
                        - 4K
                    defaultQuality:
                      type: string
                      enum:
                        - low
                        - medium
                        - high
                      description: The default quality for this inpaint model. Only present for models
                        that accept the `quality` request parameter (currently
                        GPT Image 2 Edit).
                      example: high
                    qualities:
                      type: array
                      items:
                        type: string
                        enum:
                          - low
                          - medium
                          - high
                      description: Supported quality options for this inpaint model. Only present for
                        models that accept the `quality` request parameter
                        (currently GPT Image 2 Edit).
                      example:
                        - low
                        - medium
                        - high
                  required:
                    - aspectRatios
                    - promptCharacterLimit
                    - combineImages
                  description: Constraints that apply to inpaint/edit models.
                  title: Inpaint Model Constraints
              description: Constraints that apply to this model.
            supportsStyleReferences:
              type: boolean
              description: Whether this image model accepts `style_references` on POST
                /image/generate. Only present for image models.
              example: true
            description:
              type: string
              description: A human-readable description of the model and its capabilities.
              example: Balanced blend of speed and capability. Handles most everyday tasks
                with reliability.
            name:
              type: string
              description: The name of the model.
              example: Gemini 3.6 Flash
            modelSource:
              type: string
              description: The source of the model, such as a URL to the model repository.
              example: ""
            offline:
              type: boolean
              default: false
              description: Is this model presently offline?
              example: false
            pricing:
              anyOf:
                - type: object
                  properties:
                    input:
                      type: object
                      properties:
                        usd:
                          type: number
                          description: USD cost per million input tokens
                          example: 0.7
                        diem:
                          type: number
                          description: Diem cost per million input tokens
                          example: 7
                      required:
                        - usd
                        - diem
                    cache_input:
                      type: object
                      properties:
                        usd:
                          type: number
                          description: USD cost per million cached input tokens (discounted rate for cache
                            reads)
                          example: 0.35
                        diem:
                          type: number
                          description: Diem cost per million cached input tokens (discounted rate for
                            cache reads)
                          example: 3.5
                      required:
                        - usd
                        - diem
                      description: Optional pricing for cached input tokens (cache reads). Only
                        present for models that support context caching.
                    cache_write:
                      type: object
                      properties:
                        usd:
                          type: number
                          description: USD cost per million cache creation tokens (cache writes). For some
                            providers this may be higher than input price.
                          example: 7.5
                        diem:
                          type: number
                          description: Diem cost per million cache creation tokens (cache writes). For
                            some providers this may be higher than input price.
                          example: 75
                      required:
                        - usd
                        - diem
                      description: Optional pricing for cache creation tokens (cache writes). Only
                        present for models where provider charges for cache
                        writes (e.g., Anthropic charges 1.25x input price).
                    output:
                      type: object
                      properties:
                        usd:
                          type: number
                          description: USD cost per million output tokens
                          example: 2.8
                        diem:
                          type: number
                          description: Diem cost per million output tokens
                          example: 28
                      required:
                        - usd
                        - diem
                    extended:
                      type: object
                      properties:
                        context_token_threshold:
                          type: number
                          description: Input token count above which extended pricing applies
                          example: 200000
                        input:
                          type: object
                          properties:
                            usd:
                              type: number
                              description: USD cost per million input tokens (extended tier)
                              example: 11
                            diem:
                              type: number
                              description: Diem cost per million input tokens (extended tier)
                              example: 11
                          required:
                            - usd
                            - diem
                        output:
                          type: object
                          properties:
                            usd:
                              type: number
                              description: USD cost per million output tokens (extended tier)
                              example: 41.25
                            diem:
                              type: number
                              description: Diem cost per million output tokens (extended tier)
                              example: 41.25
                          required:
                            - usd
                            - diem
                        cache_input:
                          type: object
                          properties:
                            usd:
                              type: number
                              description: USD cost per million cached input tokens (extended tier)
                              example: 1.1
                            diem:
                              type: number
                              description: Diem cost per million cached input tokens (extended tier)
                              example: 1.1
                          required:
                            - usd
                            - diem
                        cache_write:
                          type: object
                          properties:
                            usd:
                              type: number
                              description: USD cost per million cache write tokens (extended tier)
                              example: 13.75
                            diem:
                              type: number
                              description: Diem cost per million cache write tokens (extended tier)
                              example: 13.75
                          required:
                            - usd
                            - diem
                      required:
                        - context_token_threshold
                        - input
                        - output
                      description: Extended pricing for long-context requests exceeding the threshold.
                        When input tokens exceed context_token_threshold,
                        extended rates apply to the entire request.
                  required:
                    - input
                    - output
                  description: Token-based pricing for chat models. Models supporting context
                    caching will include cache_input (cache read) pricing. Some
                    providers like Anthropic also charge for cache_write (cache
                    creation) at a premium rate.
                  title: LLM Model Pricing
                - type: object
                  properties:
                    generation:
                      type: object
                      properties:
                        usd:
                          type: number
                          description: USD cost per image generation (base price)
                          example: 0.01
                        diem:
                          type: number
                          description: Diem cost per image generation (base price)
                          example: 0.1
                      required:
                        - usd
                        - diem
                      description: Base pricing for image generation. Only present for models without
                        resolution-specific pricing.
                    resolutions:
                      type: object
                      additionalProperties:
                        type: object
                        properties:
                          usd:
                            type: number
                            description: USD cost for this resolution
                            example: 0.18
                          diem:
                            type: number
                            description: Diem cost for this resolution
                            example: 0.18
                        required:
                          - usd
                          - diem
                      description: Resolution-specific pricing. Keys are resolution tiers (e.g. "1K",
                        "2K", "4K"). Only present for models that support
                        resolution selection. When present, replaces
                        `generation`.
                      example:
                        1K:
                          usd: 0.18
                          diem: 0.18
                        2K:
                          usd: 0.24
                          diem: 0.24
                        4K:
                          usd: 0.35
                          diem: 0.35
                    quality:
                      type: object
                      additionalProperties:
                        type: object
                        properties:
                          low:
                            type: object
                            properties:
                              usd:
                                type: number
                                description: USD cost for this resolution
                                example: 0.18
                              diem:
                                type: number
                                description: Diem cost for this resolution
                                example: 0.18
                            required:
                              - usd
                              - diem
                          medium:
                            type: object
                            properties:
                              usd:
                                type: number
                                description: USD cost for this resolution
                                example: 0.18
                              diem:
                                type: number
                                description: Diem cost for this resolution
                                example: 0.18
                            required:
                              - usd
                              - diem
                          high:
                            type: object
                            properties:
                              usd:
                                type: number
                                description: USD cost for this resolution
                                example: 0.18
                              diem:
                                type: number
                                description: Diem cost for this resolution
                                example: 0.18
                            required:
                              - usd
                              - diem
                      description: Per-(resolution, quality) pricing. Only present for models that
                        accept the `quality` request parameter (currently GPT
                        Image 2 / GPT Image 2 Edit).
                      example:
                        1K:
                          high:
                            usd: 0.27
                            diem: 0.27
                          low:
                            usd: 0.02
                            diem: 0.02
                          medium:
                            usd: 0.07
                            diem: 0.07
                        2K:
                          high:
                            usd: 0.5
                            diem: 0.5
                          low:
                            usd: 0.03
                            diem: 0.03
                          medium:
                            usd: 0.13
                            diem: 0.13
                        4K:
                          high:
                            usd: 0.83
                            diem: 0.83
                          low:
                            usd: 0.05
                            diem: 0.05
                          medium:
                            usd: 0.21
                            diem: 0.21
                    upscale:
                      type: object
                      properties:
                        2x:
                          type: object
                          properties:
                            usd:
                              type: number
                              description: USD cost for 2x upscale
                              example: 0.02
                            diem:
                              type: number
                              description: Diem cost for 2x upscale
                              example: 0.2
                          required:
                            - usd
                            - diem
                        4x:
                          type: object
                          properties:
                            usd:
                              type: number
                              description: USD cost for 4x upscale
                              example: 0.08
                            diem:
                              type: number
                              description: Diem cost for 4x upscale
                              example: 0.8
                          required:
                            - usd
                            - diem
                      required:
                        - 2x
                        - 4x
                  required:
                    - upscale
                  description: Pricing for image generation and upscaling
                  title: Image Model Pricing
                - type: object
                  properties:
                    input:
                      type: object
                      properties:
                        usd:
                          type: number
                          description: USD cost per million input characters
                          example: 3.5
                        diem:
                          type: number
                          description: Diem cost per million input characters
                          example: 35
                      required:
                        - usd
                        - diem
                  required:
                    - input
                  description: Pricing for TTS models
                  title: TTS Model Pricing
                - type: object
                  properties:
                    per_audio_second:
                      type: object
                      properties:
                        usd:
                          type: number
                          description: USD cost per audio second
                          example: 0.0001
                        diem:
                          type: number
                          description: Diem cost per audio second
                          example: 0.0001
                      required:
                        - usd
                        - diem
                  required:
                    - per_audio_second
                  description: Pricing for ASR (speech-to-text) models
                  title: ASR Model Pricing
                - type: object
                  properties:
                    inpaint:
                      type: object
                      properties:
                        usd:
                          type: number
                          description: USD cost per image edit/inpaint operation
                          example: 0.04
                        diem:
                          type: number
                          description: Diem cost per image edit/inpaint operation
                          example: 0.04
                      required:
                        - usd
                        - diem
                    resolutions:
                      type: object
                      additionalProperties:
                        type: object
                        properties:
                          usd:
                            type: number
                            description: USD cost for this resolution
                            example: 0.18
                          diem:
                            type: number
                            description: Diem cost for this resolution
                            example: 0.18
                        required:
                          - usd
                          - diem
                      description: Resolution-specific pricing. Keys are resolution tiers (e.g. "1K",
                        "2K", "4K"). Only present for inpaint models that
                        support resolution selection.
                      example:
                        1K:
                          usd: 0.36
                          diem: 0.36
                        2K:
                          usd: 0.53
                          diem: 0.53
                        4K:
                          usd: 0.85
                          diem: 0.85
                    inputImages:
                      type: object
                      properties:
                        included:
                          type: number
                          description: Number of input images included in the base price. Each additional
                            input image adds the "additional" cost.
                          example: 1
                        additional:
                          type: object
                          properties:
                            usd:
                              type: number
                              description: USD cost per additional input image beyond the included count
                              example: 0.0045
                            diem:
                              type: number
                              description: Diem cost per additional input image beyond the included count
                              example: 0.0045
                          required:
                            - usd
                            - diem
                      required:
                        - included
                        - additional
                      description: Input-image pricing. The base price covers "included" input images;
                        each additional input image adds the "additional" cost
                        per output image.
                    quality:
                      type: object
                      additionalProperties:
                        type: object
                        properties:
                          low:
                            type: object
                            properties:
                              usd:
                                type: number
                                description: USD cost for this resolution
                                example: 0.18
                              diem:
                                type: number
                                description: Diem cost for this resolution
                                example: 0.18
                            required:
                              - usd
                              - diem
                          medium:
                            type: object
                            properties:
                              usd:
                                type: number
                                description: USD cost for this resolution
                                example: 0.18
                              diem:
                                type: number
                                description: Diem cost for this resolution
                                example: 0.18
                            required:
                              - usd
                              - diem
                          high:
                            type: object
                            properties:
                              usd:
                                type: number
                                description: USD cost for this resolution
                                example: 0.18
                              diem:
                                type: number
                                description: Diem cost for this resolution
                                example: 0.18
                            required:
                              - usd
                              - diem
                      description: Per-(resolution, quality) pricing. Only present for models that
                        accept the `quality` request parameter (currently GPT
                        Image 2 / GPT Image 2 Edit).
                      example:
                        1K:
                          high:
                            usd: 0.27
                            diem: 0.27
                          low:
                            usd: 0.02
                            diem: 0.02
                          medium:
                            usd: 0.07
                            diem: 0.07
                        2K:
                          high:
                            usd: 0.5
                            diem: 0.5
                          low:
                            usd: 0.03
                            diem: 0.03
                          medium:
                            usd: 0.13
                            diem: 0.13
                        4K:
                          high:
                            usd: 0.83
                            diem: 0.83
                          low:
                            usd: 0.05
                            diem: 0.05
                          medium:
                            usd: 0.21
                            diem: 0.21
                  required:
                    - inpaint
                  description: Pricing for image editing/inpainting models
                  title: Inpaint Model Pricing
                - type: object
                  properties:
                    generation:
                      type: object
                      properties:
                        usd:
                          type: number
                          description: USD cost per music generation
                          example: 0.02
                        diem:
                          type: number
                          description: Diem cost per music generation
                          example: 0.02
                      required:
                        - usd
                        - diem
                  required:
                    - generation
                - type: object
                  properties:
                    durations:
                      type: object
                      additionalProperties:
                        type: object
                        properties:
                          usd:
                            type: number
                            description: USD cost for this duration tier
                            example: 0.87
                          diem:
                            type: number
                            description: Diem cost for this duration tier
                            example: 0.87
                          min_seconds:
                            type: number
                            description: Minimum duration (inclusive) in seconds that falls into this
                              pricing tier
                            example: 1
                          max_seconds:
                            type: number
                            description: Maximum duration (inclusive) in seconds that falls into this
                              pricing tier
                            example: 60
                        required:
                          - usd
                          - diem
                          - min_seconds
                          - max_seconds
                  required:
                    - durations
                - type: object
                  properties:
                    per_second:
                      type: object
                      properties:
                        usd:
                          type: number
                          description: USD cost per second of generated music
                          example: 0.005
                        diem:
                          type: number
                          description: Diem cost per second of generated music
                          example: 0.005
                      required:
                        - usd
                        - diem
                  required:
                    - per_second
                - type: object
                  properties:
                    per_thousand_characters:
                      type: object
                      properties:
                        usd:
                          type: number
                          description: USD cost per thousand characters
                          example: 0.01
                        diem:
                          type: number
                          description: Diem cost per thousand characters
                          example: 0.01
                      required:
                        - usd
                        - diem
                  required:
                    - per_thousand_characters
              description: Pricing details for the model
            traits:
              type: array
              items:
                type: string
              description: Traits that apply to this model. You can specify a trait to
                auto-select a model vs. specifying the model ID in your request
                to avoid breakage as Venice updates and iterates on its models.
              example:
                - default_code
            uncensored:
              type: boolean
              description: Present and true when Venice classifies this model as uncensored,
                meaning it applies minimal content-based filtering. Covers every
                modality, including the video models listed under the
                `uncensored` model set. Absent for all other models. Upstream
                providers may still apply their own filtering.
              example: true
            embeddingDimensions:
              type: number
              description: The native/default number of dimensions in the output embedding
                vector. Only present for embedding models.
              example: 1024
            maxInputTokens:
              type: number
              description: Maximum number of input tokens the model accepts per input string.
                Only present for embedding models.
              example: 8192
            supportsCustomDimensions:
              type: boolean
              description: Whether the model supports reducing output dimensions via the
                `dimensions` request parameter. Only present for embedding
                models that support it.
              example: true
            supports_lyrics:
              type: boolean
              description: Whether this audio-generation model supports lyrics input.
              example: true
            lyrics_required:
              type: boolean
              description: Whether lyrics input is required for this audio-generation model.
              example: false
            supports_force_instrumental:
              type: boolean
              description: Whether this audio-generation model supports the force_instrumental
                request parameter.
              example: true
            supports_loop:
              type: boolean
              description: Whether this audio-generation model supports the loop request
                parameter.
              example: true
            voices:
              type: array
              items:
                type: string
              description: "The voices available for this model. Applicable for TTS models and
                voice-enabled music models. Note: each model has its own set of
                supported voices."
              example:
                - Achernar
                - Achird
                - Aiden
                - Alex
                - Algenib
            voice_cloning:
              type: object
              properties:
                mode:
                  type: string
                  enum:
                    - zero_shot
                    - persistent
                  description: How the upstream provider implements voice cloning. `zero_shot`
                    re-reads the reference audio on every synthesis call and
                    never derives a persistent voice template (e.g. Chatterbox
                    HD). `persistent` derives a custom voice template upstream
                    that survives across synthesis calls (e.g. MiniMax Speech-02
                    HD).
                  example: zero_shot
                accepted_formats:
                  type: array
                  items:
                    type: string
                  description: Audio container formats this model accepts as a reference sample on
                    POST /v1/audio/voices. Samples in other containers are
                    rejected with HTTP 400 before any upload.
                  example:
                    - mp3
                    - wav
                    - flac
                    - mp4
                min_sample_seconds:
                  type: number
                  description: Recommended minimum length of the reference audio sample, in
                    seconds, for an intelligible clone.
                  example: 5
                retention_days:
                  type: number
                  description: Days a `vv_<id>` voice handle remains valid against this model. For
                    `persistent` models the upstream provider auto-deletes the
                    cloned voice after this many days without use; each
                    successful TTS request resets the window. For `zero_shot`
                    models this is the storage TTL on the uploaded reference
                    audio; the handle stops working when it expires and the user
                    must re-upload.
                  example: 7
              required:
                - mode
                - accepted_formats
                - min_sample_seconds
                - retention_days
              additionalProperties: false
              description: Voice-cloning capability. Only present for TTS models whose cloning
                endpoint is available to the caller — pass the model to POST
                /v1/audio/voices to mint a `vv_<id>` voice handle, then pass
                that handle back as the `voice` parameter on POST
                /v1/audio/speech alongside the same `model`.
              title: TTS Voice Cloning
            default_voice:
              type: string
              description: Default voice for voice-enabled music models.
              example: Aria
            supports_custom_voice_id:
              type: boolean
              description: Whether this model accepts a caller-supplied provider Voice ID in
                the `voice` parameter in addition to its curated `voices` (e.g.
                paste an ElevenLabs Voice ID).
              example: true
            supports_language_code:
              type: boolean
              description: Whether this music model supports an ISO 639-1 language_code
                parameter.
              example: true
            supports_speed:
              type: boolean
              description: Whether this music model supports speed adjustment.
              example: true
            default_speed:
              type: number
              description: Default speed multiplier for this music model.
              example: 1
            min_speed:
              type: number
              description: Minimum speed multiplier for this music model.
              example: 0.25
            max_speed:
              type: number
              description: Maximum speed multiplier for this music model.
              example: 4
            duration_options:
              type: array
              items:
                type: number
              description: Available duration options in seconds for this music model.
              example:
                - 60
                - 120
                - 180
                - 240
            min_duration:
              type: number
              description: Minimum duration in seconds for this music model.
              example: 60
            max_duration:
              type: number
              description: Maximum duration in seconds for this music model.
              example: 240
            default_duration:
              type: number
              description: Default duration in seconds for this music model.
              example: 60
            supported_formats:
              type: array
              items:
                type: string
              description: Supported output audio formats for this TTS or music model. An
                explicit format outside this list is rejected by the
                corresponding generation endpoint.
              example:
                - mp3
                - wav
            default_format:
              type: string
              description: Output audio format used when the request omits a format.
                Applicable to TTS and music models.
              example: mp3
            prompt_character_limit:
              type: number
              description: Maximum prompt character limit for this music model.
              example: 500
            min_prompt_length:
              type: number
              description: Minimum prompt length for this music model.
              example: 1
            lyrics_character_limit:
              type: number
              description: Maximum lyrics character limit for this music model.
              example: 3000
          required:
            - privacy
        object:
          type: string
          enum:
            - model
          description: Object type
          example: model
        owned_by:
          type: string
          enum:
            - venice.ai
          description: Who runs the model
          example: venice.ai
        type:
          type: string
          enum:
            - asr
            - embedding
            - image
            - music
            - text
            - tts
            - upscale
            - inpaint
            - video
          description: Model type
          example: text
      required:
        - id
        - model_spec
        - object
        - owned_by
        - type
      description: Response schema for model information
      example:
        created: 1727966436
        id: llama-3.2-3b
        model_spec:
          availableContextTokens: 131072
          capabilities:
            optimizedForCode: false
            quantization: fp16
            supportsAudioInput: false
            supportsFunctionCalling: true
            supportsLogProbs: true
            supportsMultipleImages: false
            supportsReasoning: false
            supportsReasoningEffort: false
            supportsResponseSchema: true
            supportsTeeAttestation: false
            supportsE2EE: false
            supportsVision: false
            supportsVideoInput: false
            supportsWebSearch: true
            supportsXSearch: false
          constraints:
            temperature:
              default: 0.8
            top_p:
              default: 0.9
          description: Compact and efficient model for quick responses and lighter
            workloads.
          name: Llama 3.2 3B
          modelSource: https://huggingface.co/meta-llama/Llama-3.2-3B
          offline: false
          privacy: private
          pricing:
            input:
              usd: 0.15
              diem: 0.15
            output:
              usd: 0.6
              diem: 0.6
          traits:
            - fastest
        object: model
        owned_by: venice.ai
        type: text
    ModelTraitSchema:
      type: object
      additionalProperties:
        type: string
      description: List of available models
      example:
        default: zai-org-glm-5-1
        fastest: kimi-k2-6
    ModelCompatibilitySchema:
      type: object
      additionalProperties:
        type: string
      description: List of available models
      example:
        gpt-4o: zai-org-glm-5-1
    WebScrapeResponse:
      type: object
      properties:
        url:
          type: string
          description: The URL that was scraped
          example: https://example.com
        content:
          type: string
          description: The scraped content in markdown format
        format:
          type: string
          enum:
            - markdown
          description: The format of the scraped content
      required:
        - url
        - content
        - format
    WebSearchResponse:
      type: object
      properties:
        query:
          type: string
          description: The search query that was executed
        results:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
                description: The title of the search result
              url:
                type: string
                description: The URL of the search result
              content:
                type: string
                description: A snippet or description of the search result
              date:
                type: string
                description: The date of the search result, if available
            required:
              - title
              - url
              - content
              - date
          description: The search results
      required:
        - query
        - results
  parameters: {}
paths:
  /chat/completions:
    post:
      description: >-
        Run text inference based on the supplied parameters. Supports multimodal
        inputs including text, images (image_url), audio (input_audio), video
        (video_url), and files (file) for compatible models. File inputs (PDF,
        DOCX, PPTX, XLSX, TXT, etc.) are automatically extracted to text before
        being sent to the model. Long running requests should use the streaming
        API by setting stream=true in your request.


        **Authentication:** This endpoint accepts either a Bearer API key or a
        `SIGN-IN-WITH-X` header for x402 wallet-based authentication. The legacy
        `X-Sign-In-With-X` header is also accepted during migration. When using
        x402, a `402 Payment Required` response indicates insufficient balance
        and includes top-up instructions.
      operationId: createChatCompletion
      parameters:
        - description: Supported compression encodings (gzip, br). Only applied when
            stream is false.
          in: header
          name: Accept-Encoding
          required: false
          schema:
            example: gzip, br
            type: string
      security:
        - BearerAuth: []
        - siwx: []
      x-payment-info:
        price:
          mode: dynamic
          currency: USD
          min: "0.001"
          max: "10.00"
        protocols:
          - x402: {}
      summary: /api/v1/chat/completions
      tags:
        - Chat
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ChatCompletionRequest"
      responses:
        "200":
          description: OK
          headers:
            X-Balance-Remaining:
              description: Remaining x402 credit balance in USD after this request (only
                present for x402 auth).
              required: false
              schema:
                type: string
                example: "4.230000"
            Content-Encoding:
              description: The encoding used to compress the response
              schema:
                enum:
                  - gzip
                  - br
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  choices:
                    type: array
                    items:
                      type: object
                      properties:
                        finish_reason:
                          type: string
                          enum:
                            - stop
                            - length
                            - tool_calls
                          description: The reason the completion finished.
                          example: stop
                        index:
                          type: integer
                          description: The index of the choice in the list.
                          example: 0
                        logprobs:
                          type: object
                          nullable: true
                          properties:
                            bytes:
                              type: array
                              items:
                                type: number
                              description: Raw bytes of the token
                              example:
                                - 104
                                - 101
                                - 108
                                - 108
                                - 111
                            logprob:
                              type: number
                              description: The log probability of this token
                              example: -0.34
                            token:
                              type: string
                              description: The token string
                              example: hello
                            top_logprobs:
                              type: array
                              items:
                                type: object
                                properties:
                                  bytes:
                                    type: array
                                    items:
                                      type: number
                                  logprob:
                                    type: number
                                  token:
                                    type: string
                                required:
                                  - logprob
                                  - token
                              description: Top tokens considered with their log probabilities
                          required:
                            - logprob
                            - token
                        message:
                          anyOf:
                            - type: object
                              properties:
                                content:
                                  anyOf:
                                    - type: string
                                      title: String
                                    - type: array
                                      items:
                                        type: object
                                        properties:
                                          cache_control:
                                            type: object
                                            properties:
                                              ttl:
                                                type: string
                                                description: Optional TTL for extended cache duration. Beta feature requiring
                                                  special header.
                                                example: 1h
                                              type:
                                                type: string
                                                enum:
                                                  - ephemeral
                                                description: The type of cache control. Currently only "ephemeral" is supported.
                                                example: ephemeral
                                            required:
                                              - type
                                            description: Optional cache control for prompt caching on supported providers.
                                            example:
                                              type: ephemeral
                                            title: Cache Control
                                          text:
                                            type: string
                                            minLength: 1
                                            description: The prompt text of the message. Must be at-least one character in
                                              length
                                            example: Why is the sky blue?
                                            title: Text Content Object
                                          type:
                                            type: string
                                            enum:
                                              - text
                                            title: Text Content String
                                        required:
                                          - text
                                          - type
                                        description: Text message type. Supports optional cache_control for prompt
                                          caching on supported providers.
                                        example:
                                          text: Why is the sky blue?
                                          type: text
                                        title: text
                                      title: Objects
                                    - nullable: true
                                      title: "null"
                                name:
                                  type: string
                                  nullable: true
                                reasoning_content:
                                  type: string
                                  nullable: true
                                reasoning_details:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      data:
                                        type: string
                                      format:
                                        type: string
                                      id:
                                        type: string
                                      index:
                                        type: number
                                      text:
                                        type: string
                                      type:
                                        type: string
                                    required:
                                      - type
                                  description: Reasoning details returned by certain reasoning models that support
                                    this feature (e.g., Gemini 3 Pro). Not all
                                    reasoning models return this field. For
                                    multi-turn conversations with tool calls on
                                    supported models, pass back the
                                    reasoning_details exactly as received to
                                    preserve thought signatures.
                                role:
                                  type: string
                                  enum:
                                    - assistant
                                thought_signature:
                                  type: string
                                  nullable: true
                                  description: Gemini thought signature returned by native GCP transport. For
                                    multi-turn conversations (especially with
                                    tool calls), pass it back exactly as
                                    received to preserve thought signatures.
                                tool_calls:
                                  type: array
                                  nullable: true
                                  items:
                                    nullable: true
                              required:
                                - role
                              description: The assistant message contains the response from the LLM. Must have
                                either content or tool_calls.
                              title: Assistant Message
                            - type: object
                              properties:
                                content:
                                  type: string
                                name:
                                  type: string
                                  nullable: true
                                reasoning_content:
                                  type: string
                                  nullable: true
                                role:
                                  type: string
                                  enum:
                                    - tool
                                tool_call_id:
                                  type: string
                                tool_calls:
                                  type: array
                                  nullable: true
                                  items:
                                    nullable: true
                              required:
                                - content
                                - role
                                - tool_call_id
                              description: The tool message is a special message that is used to call a tool.
                                It is not part of the conversation and is not
                                visible to the user.
                              title: Tool Message
                        stop_reason:
                          type: string
                          nullable: true
                          enum:
                            - stop
                            - length
                          description: The reason the completion stopped.
                          example: stop
                      required:
                        - finish_reason
                        - index
                        - logprobs
                        - message
                    description: A list of chat completion choices. Can be more than one if n is
                      greater than 1. Certain models may not return this field
                      under certain conditions.
                    example:
                      - finish_reason: stop
                        index: 0
                        logprobs: null
                        message:
                          content: The sky appears blue because of the way Earth's atmosphere scatters
                            sunlight. When sunlight reaches Earth's atmosphere,
                            it is made up of various colors of the spectrum, but
                            blue light waves are shorter and scatter more easily
                            when they hit the gases and particles in the
                            atmosphere. This scattering occurs in all
                            directions, but from our perspective on the ground,
                            it appears as a blue hue that dominates the sky's
                            color. This phenomenon is known as Rayleigh
                            scattering. During sunrise and sunset, the sunlight
                            has to travel further through the atmosphere, which
                            allows more time for the blue light to scatter away
                            from our direct line of sight, leaving the longer
                            wavelengths, such as red, yellow, and orange, to
                            dominate the sky's color.
                          reasoning_content: null
                          role: assistant
                          tool_calls: []
                        stop_reason: null
                  created:
                    type: integer
                    description: The time at which the request was created.
                    example: 1677858240
                  cost:
                    type: object
                    properties:
                      diem:
                        type: number
                        minimum: 0
                        description: The DIEM-denominated portion of the request cost.
                        example: 0
                      usd:
                        type: number
                        minimum: 0
                        description: The USD-denominated portion of the request cost. Bundled credits
                          are included as USD-equivalent cost.
                        example: 0.00042
                    required:
                      - diem
                      - usd
                    description: The request cost split by billing currency.
                  id:
                    type: string
                    description: The ID of the request.
                    example: chatcmpl-abc123
                  model:
                    type: string
                    description: The model id used for the request.
                    example: zai-org-glm-5-1
                  object:
                    type: string
                    enum:
                      - chat.completion
                    description: The type of the object returned.
                    example: chat.completion
                  prompt_logprobs:
                    anyOf:
                      - nullable: true
                        title: "null"
                      - type: object
                        additionalProperties:
                          nullable: true
                      - nullable: true
                        title: "null"
                    description: Log probability information for the prompt.
                  usage:
                    type: object
                    properties:
                      completion_tokens:
                        type: integer
                        description: The number of tokens in the completion.
                        example: 20
                      completion_tokens_details:
                        type: object
                        nullable: true
                        properties:
                          reasoning_tokens:
                            type: integer
                            description: Number of completion tokens consumed by reasoning/thinking output
                              when the upstream model reports it.
                            example: 32
                        description: Breakdown of completion tokens for providers that expose reasoning
                          token accounting.
                      prompt_tokens:
                        type: integer
                        description: The number of tokens in the prompt.
                        example: 10
                      prompt_tokens_details:
                        type: object
                        nullable: true
                        properties:
                          cached_tokens:
                            type: integer
                            description: Number of prompt tokens that were served from cache (cache read)
                              which may result in a discounted rate.
                            example: 128
                          cache_creation_input_tokens:
                            type: integer
                            description: Number of prompt tokens that were written to cache (cache write).
                              For some providers like Anthropic, this may be
                              charged at a premium rate.
                            example: 64
                        description: Breakdown of prompt tokens. Includes cached_tokens (cache read) and
                          cache_creation_input_tokens (cache write) for models
                          that support context caching.
                      total_tokens:
                        type: integer
                        description: The total number of tokens used in the request.
                        example: 30
                    required:
                      - completion_tokens
                      - prompt_tokens
                      - total_tokens
                  venice_parameters:
                    type: object
                    properties:
                      enable_e2ee:
                        type: boolean
                        description: Did the request enable end-to-end encryption? Only applicable to
                          E2EE-capable models.
                        example: true
                      enable_web_search:
                        type: string
                        enum:
                          - auto
                          - off
                          - on
                        description: Did the request enable web search?
                        example: auto
                      enable_web_citations:
                        type: boolean
                        description: Did the request enable web citations?
                        example: true
                      enable_web_scraping:
                        type: boolean
                        description: Did the request enable web scraping of URLs via Firecrawl?
                        example: false
                      include_venice_system_prompt:
                        type: boolean
                        description: Did the request include the Venice system prompt?
                        example: true
                      include_search_results_in_stream:
                        type: boolean
                        description: Did the request include search results in the stream?
                        example: false
                      return_search_results_as_documents:
                        type: boolean
                        description: Did the request also return search results as a tool-call documents
                          block?
                        example: true
                      character_slug:
                        type: string
                        description: The character slug of a public Venice character.
                        example: venice
                      strip_thinking_response:
                        type: boolean
                        description: Did the request strip thinking response?
                        example: true
                      disable_thinking:
                        type: boolean
                        description: Did the request disable thinking?
                        example: true
                      web_search_citations:
                        type: array
                        items:
                          type: object
                          properties:
                            content:
                              type: string
                            date:
                              type: string
                            title:
                              type: string
                            url:
                              type: string
                          required:
                            - title
                            - url
                        description: Citations from web search results.
                        example:
                          - content: >-
                              What&#x27;s the scientific reason behind
                              Earth&#x27;s sky appearing blue to the human eye?
                              And what&#x27;s the real colour of the sky?


                              Save 30% on the shop price when you subscribe to
                              BBC Sky at Night Magazine today!


                              In this article we'll look at the science behind
                              why the sky is blue, or at least why it appears
                              blue to our eyes.


                              A beautiful blue sky is the sign of a pleasant day
                              ahead. But what makes the sky appear blue?


                              So, the sky appears blue because the molecules of
                              nitrogen and oxygen in the atmosphere scatter
                              light in short wavelengths towards the blue end of
                              the visible spectrum.
                            date: 2024-08-13T13:45:16
                            title: Why is the sky blue? | BBC Sky at Night Magazine
                            url: https://www.skyatnightmagazine.com/space-science/why-is-the-sky-blue
                          - content: >-
                              It was around 1870 when the British physicist John
                              William Strutt, better known as Lord Rayleigh,
                              first found an explanation for why the sky is
                              blue: Blue light from the Sun is scattered the
                              most when it passes through the atmosphere.


                              Published: January 20, 2025 8:34am EST · Daniel
                              Freedman, University of Wisconsin-Stout · Daniel
                              Freedman · Dean of the College of Science,
                              Technology, Engineering, Mathematics & Management,
                              University of Wisconsin-Stout ·


                              The answer has to do with molecules.


                              It was around 1870 when the British physicist John
                              William Strutt, better known as Lord Rayleigh,
                              first found an explanation for why the sky is
                              blue: Blue light from the Sun is scattered the
                              most when it passes through the atmosphere.


                              When the Sun is near the horizon, its light passes
                              through a lot more of the atmosphere to reach the
                              Earth’s surface than when it is directly overhead.
                              The blue and green light is scattered so well that
                              you can hardly see it. The sky is colored,
                              instead, with red and orange light.
                            date: 2025-04-16T16:55:11
                            title: Why is the sky blue?
                            url: https://theconversation.com/why-is-the-sky-blue-246393
                    required:
                      - enable_e2ee
                      - enable_web_search
                      - enable_web_citations
                      - enable_web_scraping
                      - include_venice_system_prompt
                      - include_search_results_in_stream
                      - return_search_results_as_documents
                      - strip_thinking_response
                      - disable_thinking
                    description: Unique parameters to Venice's API implementation.
                required:
                  - created
                  - id
                  - model
                  - object
                  - usage
                example:
                  choices:
                    - finish_reason: stop
                      index: 0
                      logprobs: null
                      message:
                        content: The sky appears blue because of the way Earth's atmosphere scatters
                          sunlight. When sunlight reaches Earth's atmosphere, it
                          is made up of various colors of the spectrum, but blue
                          light waves are shorter and scatter more easily when
                          they hit the gases and particles in the atmosphere.
                          This scattering occurs in all directions, but from our
                          perspective on the ground, it appears as a blue hue
                          that dominates the sky's color. This phenomenon is
                          known as Rayleigh scattering. During sunrise and
                          sunset, the sunlight has to travel further through the
                          atmosphere, which allows more time for the blue light
                          to scatter away from our direct line of sight, leaving
                          the longer wavelengths, such as red, yellow, and
                          orange, to dominate the sky's color.
                        reasoning_content: null
                        role: assistant
                        tool_calls: []
                      stop_reason: null
                  created: 1739928524
                  cost:
                    diem: 0
                    usd: 0.00042
                  id: chatcmpl-a81fbc2d81a7a083bb83ccf9f44c6e5e
                  model: zai-org-glm-5-1
                  object: chat.completion
                  prompt_logprobs: null
                  usage:
                    completion_tokens: 146
                    completion_tokens_details: null
                    prompt_tokens: 612
                    prompt_tokens_details: null
                    total_tokens: 758
                  venice_parameters:
                    enable_e2ee: true
                    include_venice_system_prompt: true
                    include_search_results_in_stream: false
                    return_search_results_as_documents: false
                    web_search_citations: []
                    enable_web_search: auto
                    enable_web_scraping: false
                    enable_web_citations: true
                    strip_thinking_response: true
                    disable_thinking: true
                    character_slug: venice
        "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"
        "402":
          description: >-
            Payment or balance required. Response varies by authentication
            state:


            **API Key users:** Standard error response with
            `INSUFFICIENT_BALANCE` code. Top up your Venice balance at
            venice.ai.


            **Unauthenticated x402 discovery:** Structured x402 response with
            `x402Version`, `resource`, `accepts`, and
            `extensions["sign-in-with-x"]`. The `accepts` array advertises Base
            and Solana payment requirements.


            **Authenticated x402 wallet users with insufficient credit:**
            Structured response with `PAYMENT_REQUIRED` code containing:

            - `topUpInstructions`: Step-by-step guide to top up via x402
            protocol

            - `supportedTokens` / `supportedChains`: Accepted payment methods

            - `siwxChallenge`: Fresh Sign-In-With-X challenge metadata


            The `PAYMENT-REQUIRED` header also contains a base64-encoded x402
            protocol object with the payment requirements for programmatic
            discovery.
          headers:
            PAYMENT-REQUIRED:
              description: Base64-encoded JSON with x402 payment requirements. Present on x402
                middleware 402 responses. Decode to choose and sign one accepted
                payment requirement programmatically.
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/StandardError"
                  - $ref: "#/components/schemas/X402InferencePaymentRequired"
        "415":
          description: Invalid request content-type
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "429":
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "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"
        "504":
          description: The request took too long to complete and was timed-out. For
            long-running inference requests, use the streaming API by setting
            stream=true in your request.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
  /responses:
    post:
      description: >-
        **Alpha** - This endpoint is currently available to Alpha testers only.


        Creates a model response using the Responses API format. This is an
        OpenAI-compatible endpoint for Venice text models.


        **E2EE Model Limitation** - E2EE-capable models are not supported on
        `/api/v1/responses`. Use `/api/v1/chat/completions` with the required
        E2EE headers instead.


        **Stateless Only** - This API is stateless. Each request is independent
        and no conversation state is persisted between requests. You must
        include the full conversation history in each request.


        The Responses API provides a structured output format with typed blocks
        for:

        - **Reasoning**: Thought process and reasoning chains from reasoning
        models

        - **Messages**: The main text response from the model

        - **Function Calls**: Tool/function call outputs

        - **Web Search**: Results from web search if enabled


        This endpoint supports streaming via Server-Sent Events when `stream:
        true` is set.


        **Authentication:** This endpoint accepts either a Bearer API key or a
        `SIGN-IN-WITH-X` header for x402 wallet-based authentication. The legacy
        `X-Sign-In-With-X` header is also accepted during migration. When using
        x402, a `402 Payment Required` response indicates insufficient balance
        and includes top-up instructions.
      operationId: createResponse
      security:
        - BearerAuth: []
        - siwx: []
      x-payment-info:
        price:
          mode: dynamic
          currency: USD
          min: "0.001"
          max: "10.00"
        protocols:
          - x402: {}
      summary: Create a response (Alpha)
      tags:
        - Responses (Alpha)
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ResponsesRequest"
      responses:
        "200":
          description: Successful response
          headers:
            X-Balance-Remaining:
              description: Remaining x402 credit balance in USD after this request (only
                present for x402 auth).
              required: false
              schema:
                type: string
                example: "4.230000"
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the response.
                    example: resp_abc123
                  object:
                    type: string
                    enum:
                      - response
                    description: The object type.
                  created_at:
                    type: integer
                    description: Unix timestamp of when the response was created.
                  model:
                    type: string
                    description: The model used for the response.
                  status:
                    type: string
                    enum:
                      - completed
                      - failed
                      - in_progress
                      - cancelled
                    description: The status of the response.
                  output:
                    type: array
                    items:
                      anyOf:
                        - type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - reasoning
                            id:
                              type: string
                            summary:
                              type: array
                              items:
                                type: string
                            encrypted_content:
                              type: string
                          required:
                            - type
                            - id
                          title: Reasoning Output
                        - type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - message
                            id:
                              type: string
                            status:
                              type: string
                              enum:
                                - completed
                                - in_progress
                                - failed
                            role:
                              type: string
                              enum:
                                - assistant
                            content:
                              type: array
                              items:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - output_text
                                  text:
                                    type: string
                                  annotations:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - url_citation
                                        url:
                                          type: string
                                        title:
                                          type: string
                                        start_index:
                                          type: integer
                                        end_index:
                                          type: integer
                                      required:
                                        - type
                                        - url
                                        - start_index
                                        - end_index
                                      title: URL Citation Annotation
                                required:
                                  - type
                                  - text
                                title: Output Text
                          required:
                            - type
                            - id
                            - status
                            - role
                            - content
                          title: Message Output
                        - type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - function_call
                            id:
                              type: string
                            call_id:
                              type: string
                            name:
                              type: string
                            arguments:
                              type: string
                            status:
                              type: string
                              enum:
                                - completed
                                - in_progress
                          required:
                            - type
                            - id
                            - call_id
                            - name
                            - arguments
                            - status
                          title: Function Call Output
                        - type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - web_search_call
                            id:
                              type: string
                            status:
                              type: string
                              enum:
                                - completed
                          required:
                            - type
                            - id
                            - status
                          title: Web Search Call Output
                    description: The output items generated by the model.
                  usage:
                    type: object
                    properties:
                      input_tokens:
                        type: integer
                      input_tokens_details:
                        type: object
                        properties:
                          cached_tokens:
                            type: integer
                      output_tokens:
                        type: integer
                      output_tokens_details:
                        type: object
                        properties:
                          reasoning_tokens:
                            type: integer
                      total_tokens:
                        type: integer
                    required:
                      - input_tokens
                      - output_tokens
                      - total_tokens
                    description: Token usage statistics.
                    title: Usage
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                    description: Error information if the response failed.
                    title: Error
                required:
                  - id
                  - object
                  - created_at
                  - model
                  - status
                  - output
                description: Response from the Responses API endpoint.
                title: Responses API Response
        "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"
        "402":
          description: >-
            Payment or balance required. Response varies by authentication
            state:


            **API Key users:** Standard error response with
            `INSUFFICIENT_BALANCE` code. Top up your Venice balance at
            venice.ai.


            **Unauthenticated x402 discovery:** Structured x402 response with
            `x402Version`, `resource`, `accepts`, and
            `extensions["sign-in-with-x"]`. The `accepts` array advertises Base
            and Solana payment requirements.


            **Authenticated x402 wallet users with insufficient credit:**
            Structured response with `PAYMENT_REQUIRED` code containing:

            - `topUpInstructions`: Step-by-step guide to top up via x402
            protocol

            - `supportedTokens` / `supportedChains`: Accepted payment methods

            - `siwxChallenge`: Fresh Sign-In-With-X challenge metadata


            The `PAYMENT-REQUIRED` header also contains a base64-encoded x402
            protocol object with the payment requirements for programmatic
            discovery.
          headers:
            PAYMENT-REQUIRED:
              description: Base64-encoded JSON with x402 payment requirements. Present on x402
                middleware 402 responses. Decode to choose and sign one accepted
                payment requirement programmatically.
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/StandardError"
                  - $ref: "#/components/schemas/X402InferencePaymentRequired"
        "429":
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "500":
          description: Inference processing failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
  /image/generate:
    post:
      description: >-
        Generate an image based on input parameters


        **Authentication:** This endpoint accepts either a Bearer API key or a
        `SIGN-IN-WITH-X` header for x402 wallet-based authentication. The legacy
        `X-Sign-In-With-X` header is also accepted during migration. When using
        x402, a `402 Payment Required` response indicates insufficient balance
        and includes top-up instructions.
      operationId: generateImage
      parameters:
        - description: Supported compression encodings (gzip, br). Only applied when
            return_binary is false.
          in: header
          name: Accept-Encoding
          required: false
          schema:
            example: gzip, br
            type: string
      security:
        - BearerAuth: []
        - siwx: []
      x-payment-info:
        price:
          mode: dynamic
          currency: USD
          min: "0.001"
          max: "10.00"
        protocols:
          - x402: {}
      summary: /api/v1/image/generate
      tags:
        - Image
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenerateImageRequest"
      responses:
        "200":
          description: Successfully generated image
          headers:
            X-Balance-Remaining:
              description: Remaining x402 credit balance in USD after this request (only
                present for x402 auth).
              required: false
              schema:
                type: string
                example: "4.230000"
            Content-Encoding:
              description: The encoding used to compress the response
              schema:
                enum:
                  - gzip
                  - br
                type: string
            x-venice-is-blurred:
              description: Indicates if the generated image is blurred. When Safe Venice is
                enabled, adult material will be returned blurred.
              required: false
              schema:
                type: boolean
            x-venice-is-content-violation:
              description: Indicates if the generated image does not meet Venice terms of
                service.
              required: false
              schema:
                type: boolean
            x-venice-model-deprecation-warning:
              description: A warning that the model is scheduled for deprecation
              required: false
              schema:
                type: string
            x-venice-model-deprecation-date:
              description: The date the model is scheduled for deprecation
              required: false
              schema:
                type: string
                format: date-time
            x-venice-deprecated:
              description: Present and set to "true" when the model is deprecated. Absent
                otherwise.
              required: false
              schema:
                type: string
                enum:
                  - "true"
            x-venice-deprecated-replacement:
              description: Public API model ID clients should migrate to. Only present when a
                replacement is published.
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The ID of the request.
                    example: generate-image-1234567890
                  images:
                    type: array
                    items:
                      type: string
                    description: Base64 encoded image data.
                  request:
                    nullable: true
                    description: The original request data sent to the API.
                  timing:
                    type: object
                    properties:
                      inferenceDuration:
                        type: number
                        description: Duration of inference in milliseconds
                      inferencePreprocessingTime:
                        type: number
                        description: Duration of preprocessing in milliseconds
                      inferenceQueueTime:
                        type: number
                        description: Duration of queueing in milliseconds
                      total:
                        type: number
                        description: Total duration of the request in milliseconds
                    required:
                      - inferenceDuration
                      - inferencePreprocessingTime
                      - inferenceQueueTime
                      - total
                required:
                  - id
                  - images
                  - timing
            image/jpeg:
              schema:
                description: Raw image data when return_binary is true and format is jpeg
                format: binary
                type: string
            image/png:
              schema:
                description: Raw image data when return_binary is true and format is png
                format: binary
                type: string
            image/webp:
              schema:
                description: Raw image data when return_binary is true and format is webp
                format: binary
                type: string
        "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"
        "402":
          description: >-
            Payment or balance required. Response varies by authentication
            state:


            **API Key users:** Standard error response with
            `INSUFFICIENT_BALANCE` code. Top up your Venice balance at
            venice.ai.


            **Unauthenticated x402 discovery:** Structured x402 response with
            `x402Version`, `resource`, `accepts`, and
            `extensions["sign-in-with-x"]`. The `accepts` array advertises Base
            and Solana payment requirements.


            **Authenticated x402 wallet users with insufficient credit:**
            Structured response with `PAYMENT_REQUIRED` code containing:

            - `topUpInstructions`: Step-by-step guide to top up via x402
            protocol

            - `supportedTokens` / `supportedChains`: Accepted payment methods

            - `siwxChallenge`: Fresh Sign-In-With-X challenge metadata


            The `PAYMENT-REQUIRED` header also contains a base64-encoded x402
            protocol object with the payment requirements for programmatic
            discovery.
          headers:
            PAYMENT-REQUIRED:
              description: Base64-encoded JSON with x402 payment requirements. Present on x402
                middleware 402 responses. Decode to choose and sign one accepted
                payment requirement programmatically.
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/StandardError"
                  - $ref: "#/components/schemas/X402InferencePaymentRequired"
        "415":
          description: Invalid request content-type
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "429":
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "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"
  /images/generations:
    post:
      description: >-
        Generate an image based on input parameters using an OpenAI compatible
        endpoint. This endpoint does not support the full feature set of the
        Venice Image Generation endpoint, but is compatible with the existing
        OpenAI endpoint.


        **Authentication:** This endpoint accepts either a Bearer API key or a
        `SIGN-IN-WITH-X` header for x402 wallet-based authentication. The legacy
        `X-Sign-In-With-X` header is also accepted during migration. When using
        x402, a `402 Payment Required` response indicates insufficient balance
        and includes top-up instructions.
      operationId: simpleGenerateImage
      parameters:
        - description: Supported compression encodings (gzip, br).
          in: header
          name: Accept-Encoding
          required: false
          schema:
            example: gzip, br
            type: string
      security:
        - BearerAuth: []
        - siwx: []
      x-payment-info:
        price:
          mode: dynamic
          currency: USD
          min: "0.001"
          max: "10.00"
        protocols:
          - x402: {}
      summary: /api/v1/image/generations
      tags:
        - Image
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SimpleGenerateImageRequest"
      responses:
        "200":
          description: Successfully generated image
          headers:
            X-Balance-Remaining:
              description: Remaining x402 credit balance in USD after this request (only
                present for x402 auth).
              required: false
              schema:
                type: string
                example: "4.230000"
            Content-Encoding:
              description: The encoding used to compress the response
              schema:
                enum:
                  - gzip
                  - br
                type: string
            x-venice-is-blurred:
              description: Indicates if the generated image is blurred. When Safe Venice is
                enabled, adult material will be returned blurred.
              required: false
              schema:
                type: boolean
            x-venice-is-content-violation:
              description: Indicates if the generated image does not meet Venice terms of
                service.
              required: false
              schema:
                type: boolean
            x-venice-model-deprecation-warning:
              description: A warning that the model is scheduled for deprecation
              required: false
              schema:
                type: string
            x-venice-model-deprecation-date:
              description: The date the model is scheduled for deprecation
              required: false
              schema:
                type: string
                format: date-time
            x-venice-deprecated:
              description: Present and set to "true" when the model is deprecated. Absent
                otherwise.
              required: false
              schema:
                type: string
                enum:
                  - "true"
            x-venice-deprecated-replacement:
              description: Public API model ID clients should migrate to. Only present when a
                replacement is published.
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  created:
                    type: integer
                    description: Unix timestamp for when the request was created
                    example: 1713833628
                  data:
                    type: array
                    items:
                      anyOf:
                        - type: object
                          properties:
                            b64_json:
                              type: string
                              description: Base64-encoded JSON string of the generated image
                              example: iVBORw0KGgoAAAANSUhEUgAA...
                          required:
                            - b64_json
                        - type: object
                          properties:
                            url:
                              type: string
                              description: Data URL of the generated image
                              example: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...
                          required:
                            - url
                required:
                  - created
                  - data
                additionalProperties: false
        "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"
        "402":
          description: >-
            Payment or balance required. Response varies by authentication
            state:


            **API Key users:** Standard error response with
            `INSUFFICIENT_BALANCE` code. Top up your Venice balance at
            venice.ai.


            **Unauthenticated x402 discovery:** Structured x402 response with
            `x402Version`, `resource`, `accepts`, and
            `extensions["sign-in-with-x"]`. The `accepts` array advertises Base
            and Solana payment requirements.


            **Authenticated x402 wallet users with insufficient credit:**
            Structured response with `PAYMENT_REQUIRED` code containing:

            - `topUpInstructions`: Step-by-step guide to top up via x402
            protocol

            - `supportedTokens` / `supportedChains`: Accepted payment methods

            - `siwxChallenge`: Fresh Sign-In-With-X challenge metadata


            The `PAYMENT-REQUIRED` header also contains a base64-encoded x402
            protocol object with the payment requirements for programmatic
            discovery.
          headers:
            PAYMENT-REQUIRED:
              description: Base64-encoded JSON with x402 payment requirements. Present on x402
                middleware 402 responses. Decode to choose and sign one accepted
                payment requirement programmatically.
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/StandardError"
                  - $ref: "#/components/schemas/X402InferencePaymentRequired"
        "415":
          description: Invalid request content-type
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "429":
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "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"
  /image/styles:
    get:
      description: List available image styles that can be used with the generate API.
      security:
        - {}
        - BearerAuth: []
      summary: /api/v1/image/styles
      tags:
        - Image
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: string
                    description: List of available image styles
                    example:
                      - 3D Model
                      - Analog Film
                      - Anime
                      - Cinematic
                      - Comic Book
                  object:
                    type: string
                    enum:
                      - list
                required:
                  - data
                  - object
        "401":
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "500":
          description: An unknown error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
  /image/upscale:
    post:
      description: >-
        Upscale an image to a higher resolution. The image can be provided
        either as a multipart form-data file upload or as a base64-encoded
        string in a JSON request.


        **Authentication:** This endpoint accepts either a Bearer API key or a
        `SIGN-IN-WITH-X` header for x402 wallet-based authentication. The legacy
        `X-Sign-In-With-X` header is also accepted during migration. When using
        x402, a `402 Payment Required` response indicates insufficient balance
        and includes top-up instructions.
      operationId: upscaleImage
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpscaleImageRequest"
          multipart/form-data:
            schema:
              $ref: "#/components/schemas/UpscaleImageRequest"
      security:
        - BearerAuth: []
        - siwx: []
      x-payment-info:
        price:
          mode: dynamic
          currency: USD
          min: "0.001"
          max: "10.00"
        protocols:
          - x402: {}
      summary: /api/v1/image/upscale
      tags:
        - Image
      responses:
        "200":
          description: OK
          headers:
            X-Balance-Remaining:
              description: Remaining x402 credit balance in USD after this request (only
                present for x402 auth).
              required: false
              schema:
                type: string
                example: "4.230000"
          content:
            image/png:
              schema:
                format: binary
                type: string
        "400":
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DetailedError"
        "401":
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "402":
          description: >-
            Payment or balance required. Response varies by authentication
            state:


            **API Key users:** Standard error response with
            `INSUFFICIENT_BALANCE` code. Top up your Venice balance at
            venice.ai.


            **Unauthenticated x402 discovery:** Structured x402 response with
            `x402Version`, `resource`, `accepts`, and
            `extensions["sign-in-with-x"]`. The `accepts` array advertises Base
            and Solana payment requirements.


            **Authenticated x402 wallet users with insufficient credit:**
            Structured response with `PAYMENT_REQUIRED` code containing:

            - `topUpInstructions`: Step-by-step guide to top up via x402
            protocol

            - `supportedTokens` / `supportedChains`: Accepted payment methods

            - `siwxChallenge`: Fresh Sign-In-With-X challenge metadata


            The `PAYMENT-REQUIRED` header also contains a base64-encoded x402
            protocol object with the payment requirements for programmatic
            discovery.
          headers:
            PAYMENT-REQUIRED:
              description: Base64-encoded JSON with x402 payment requirements. Present on x402
                middleware 402 responses. Decode to choose and sign one accepted
                payment requirement programmatically.
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/StandardError"
                  - $ref: "#/components/schemas/X402InferencePaymentRequired"
        "415":
          description: Invalid request content-type
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "429":
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "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"
  /image/edit:
    post:
      description: >-
        Edit or modify an image based on the supplied prompt. The image can be
        provided either as a multipart form-data file upload or as a
        base64-encoded string in a JSON request. For models with resolution
        tiers that require explicit dimensions, omit aspect_ratio or set it to
        auto to infer the closest supported aspect ratio from the input image;
        provide aspect_ratio directly when exact output dimensions are required.
        Use output_format to request jpeg, jpg, png, or webp output.


        **Authentication:** This endpoint accepts either a Bearer API key or a
        `SIGN-IN-WITH-X` header for x402 wallet-based authentication. The legacy
        `X-Sign-In-With-X` header is also accepted during migration. When using
        x402, a `402 Payment Required` response indicates insufficient balance
        and includes top-up instructions.
      operationId: editImage
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/EditImageRequest"
                - type: object
                  properties:
                    modelId:
                      type: string
                      enum:
                        - firered-image-edit
                        - qwen-edit-uncensored
                        - grok-imagine-edit
                        - grok-imagine-quality-edit
                        - grok-imagine-image-2-0-edit
                        - qwen-image-2-edit
                        - qwen-image-2-pro-edit
                        - wan-2-7-pro-edit
                        - flux-2-max-edit
                        - gpt-image-2-edit
                        - gpt-image-1-5-edit
                        - nano-banana-2-edit
                        - nano-banana-pro-edit
                        - nano-banana-2-lite-edit
                        - luma-uni-1-edit
                        - luma-uni-1-max-edit
                        - seedream-v5-lite-edit
                        - seedream-v5-pro-edit
                        - seedream-v4-edit
                        - qwen-image-3-edit
                        - qwen-image-3-pro-edit
          multipart/form-data:
            schema:
              allOf:
                - $ref: "#/components/schemas/EditImageRequest"
                - type: object
                  properties:
                    modelId:
                      type: string
                      enum:
                        - firered-image-edit
                        - qwen-edit-uncensored
                        - grok-imagine-edit
                        - grok-imagine-quality-edit
                        - grok-imagine-image-2-0-edit
                        - qwen-image-2-edit
                        - qwen-image-2-pro-edit
                        - wan-2-7-pro-edit
                        - flux-2-max-edit
                        - gpt-image-2-edit
                        - gpt-image-1-5-edit
                        - nano-banana-2-edit
                        - nano-banana-pro-edit
                        - nano-banana-2-lite-edit
                        - luma-uni-1-edit
                        - luma-uni-1-max-edit
                        - seedream-v5-lite-edit
                        - seedream-v5-pro-edit
                        - seedream-v4-edit
                        - qwen-image-3-edit
                        - qwen-image-3-pro-edit
      security:
        - BearerAuth: []
        - siwx: []
      x-payment-info:
        price:
          mode: dynamic
          currency: USD
          min: "0.001"
          max: "10.00"
        protocols:
          - x402: {}
      summary: /api/v1/image/edit
      tags:
        - Image
      responses:
        "200":
          description: OK
          headers:
            X-Balance-Remaining:
              description: Remaining x402 credit balance in USD after this request (only
                present for x402 auth).
              required: false
              schema:
                type: string
                example: "4.230000"
            x-venice-is-content-violation:
              description: Indicates if the generated image does not meet Venice terms of
                service.
              required: false
              schema:
                type: boolean
            x-venice-model-id:
              description: The ID of the model used for the edit.
              required: false
              schema:
                type: string
            x-venice-model-name:
              description: The friendly name of the model used for the edit.
              required: false
              schema:
                type: string
            x-venice-model-deprecation-warning:
              description: A warning that the model is scheduled for deprecation
              required: false
              schema:
                type: string
            x-venice-model-deprecation-date:
              description: The date the model is scheduled for deprecation
              required: false
              schema:
                type: string
                format: date-time
            x-venice-deprecated:
              description: Present and set to "true" when the model is deprecated. Absent
                otherwise.
              required: false
              schema:
                type: string
                enum:
                  - "true"
            x-venice-deprecated-replacement:
              description: Public API model ID clients should migrate to. Only present when a
                replacement is published.
              required: false
              schema:
                type: string
          content:
            image/png:
              schema:
                format: binary
                type: string
            image/jpeg:
              schema:
                format: binary
                type: string
            image/webp:
              schema:
                format: binary
                type: string
        "400":
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DetailedError"
        "401":
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "402":
          description: >-
            Payment or balance required. Response varies by authentication
            state:


            **API Key users:** Standard error response with
            `INSUFFICIENT_BALANCE` code. Top up your Venice balance at
            venice.ai.


            **Unauthenticated x402 discovery:** Structured x402 response with
            `x402Version`, `resource`, `accepts`, and
            `extensions["sign-in-with-x"]`. The `accepts` array advertises Base
            and Solana payment requirements.


            **Authenticated x402 wallet users with insufficient credit:**
            Structured response with `PAYMENT_REQUIRED` code containing:

            - `topUpInstructions`: Step-by-step guide to top up via x402
            protocol

            - `supportedTokens` / `supportedChains`: Accepted payment methods

            - `siwxChallenge`: Fresh Sign-In-With-X challenge metadata


            The `PAYMENT-REQUIRED` header also contains a base64-encoded x402
            protocol object with the payment requirements for programmatic
            discovery.
          headers:
            PAYMENT-REQUIRED:
              description: Base64-encoded JSON with x402 payment requirements. Present on x402
                middleware 402 responses. Decode to choose and sign one accepted
                payment requirement programmatically.
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/StandardError"
                  - $ref: "#/components/schemas/X402InferencePaymentRequired"
        "415":
          description: Invalid request content-type
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "429":
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "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"
  /image/multi-edit:
    post:
      description: >-
        Edit or modify an image using multiple layered inputs (base image plus
        masks/overlays), up to the selected model's maximum input images (see
        the capabilities.maxInputImages field in GET /api/v1/models).


        **Supported input formats by Content-Type:**


        - **multipart/form-data**: Only file uploads are supported. Send images
        as form file fields.


        - **application/json**: Base64 strings and URLs are supported:
          - Raw base64 string: `"iVBORw0KGgoAAAANSUhEUgAA..."`
          - Data URL: `"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."`
          - HTTP/HTTPS URL: `"https://example.com/image.png"`

        For models with resolution tiers that require explicit dimensions, omit
        `aspect_ratio` or set it to `auto` to infer the closest supported aspect
        ratio from the first input image. Provide `aspect_ratio` directly when
        exact output dimensions are required. Use `output_format` to request
        jpeg, jpg, png, or webp output.



        **Authentication:** This endpoint accepts either a Bearer API key or a
        `SIGN-IN-WITH-X` header for x402 wallet-based authentication. The legacy
        `X-Sign-In-With-X` header is also accepted during migration. When using
        x402, a `402 Payment Required` response indicates insufficient balance
        and includes top-up instructions.
      operationId: multiEditImage
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/MultiEditImageRequest"
                - type: object
                  properties:
                    modelId:
                      type: string
                      enum:
                        - firered-image-edit
                        - qwen-edit-uncensored
                        - grok-imagine-edit
                        - grok-imagine-quality-edit
                        - grok-imagine-image-2-0-edit
                        - qwen-image-2-edit
                        - qwen-image-2-pro-edit
                        - wan-2-7-pro-edit
                        - flux-2-max-edit
                        - gpt-image-2-edit
                        - gpt-image-1-5-edit
                        - nano-banana-2-edit
                        - nano-banana-pro-edit
                        - nano-banana-2-lite-edit
                        - seedream-v5-lite-edit
                        - seedream-v5-pro-edit
                        - seedream-v4-edit
                        - qwen-image-3-edit
                        - qwen-image-3-pro-edit
          multipart/form-data:
            schema:
              allOf:
                - $ref: "#/components/schemas/MultiEditImageMultipartRequest"
                - type: object
                  properties:
                    modelId:
                      type: string
                      enum:
                        - firered-image-edit
                        - qwen-edit-uncensored
                        - grok-imagine-edit
                        - grok-imagine-quality-edit
                        - grok-imagine-image-2-0-edit
                        - qwen-image-2-edit
                        - qwen-image-2-pro-edit
                        - wan-2-7-pro-edit
                        - flux-2-max-edit
                        - gpt-image-2-edit
                        - gpt-image-1-5-edit
                        - nano-banana-2-edit
                        - nano-banana-pro-edit
                        - nano-banana-2-lite-edit
                        - seedream-v5-lite-edit
                        - seedream-v5-pro-edit
                        - seedream-v4-edit
                        - qwen-image-3-edit
                        - qwen-image-3-pro-edit
      security:
        - BearerAuth: []
        - siwx: []
      x-payment-info:
        price:
          mode: dynamic
          currency: USD
          min: "0.001"
          max: "10.00"
        protocols:
          - x402: {}
      summary: /api/v1/image/multi-edit
      tags:
        - Image
      responses:
        "200":
          description: OK
          headers:
            X-Balance-Remaining:
              description: Remaining x402 credit balance in USD after this request (only
                present for x402 auth).
              required: false
              schema:
                type: string
                example: "4.230000"
            x-venice-is-content-violation:
              description: Indicates if the generated image does not meet Venice terms of
                service.
              required: false
              schema:
                type: boolean
            x-venice-model-deprecation-warning:
              description: A warning that the model is scheduled for deprecation
              required: false
              schema:
                type: string
            x-venice-model-deprecation-date:
              description: The date the model is scheduled for deprecation
              required: false
              schema:
                type: string
                format: date-time
            x-venice-deprecated:
              description: Present and set to "true" when the model is deprecated. Absent
                otherwise.
              required: false
              schema:
                type: string
                enum:
                  - "true"
            x-venice-deprecated-replacement:
              description: Public API model ID clients should migrate to. Only present when a
                replacement is published.
              required: false
              schema:
                type: string
          content:
            image/png:
              schema:
                format: binary
                type: string
            image/jpeg:
              schema:
                format: binary
                type: string
            image/webp:
              schema:
                format: binary
                type: string
        "400":
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DetailedError"
        "401":
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "402":
          description: >-
            Payment or balance required. Response varies by authentication
            state:


            **API Key users:** Standard error response with
            `INSUFFICIENT_BALANCE` code. Top up your Venice balance at
            venice.ai.


            **Unauthenticated x402 discovery:** Structured x402 response with
            `x402Version`, `resource`, `accepts`, and
            `extensions["sign-in-with-x"]`. The `accepts` array advertises Base
            and Solana payment requirements.


            **Authenticated x402 wallet users with insufficient credit:**
            Structured response with `PAYMENT_REQUIRED` code containing:

            - `topUpInstructions`: Step-by-step guide to top up via x402
            protocol

            - `supportedTokens` / `supportedChains`: Accepted payment methods

            - `siwxChallenge`: Fresh Sign-In-With-X challenge metadata


            The `PAYMENT-REQUIRED` header also contains a base64-encoded x402
            protocol object with the payment requirements for programmatic
            discovery.
          headers:
            PAYMENT-REQUIRED:
              description: Base64-encoded JSON with x402 payment requirements. Present on x402
                middleware 402 responses. Decode to choose and sign one accepted
                payment requirement programmatically.
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/StandardError"
                  - $ref: "#/components/schemas/X402InferencePaymentRequired"
        "415":
          description: Invalid request content-type
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "429":
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "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"
  /image/background-remove:
    post:
      description: >-
        Remove the background from an image using AI. The image can be provided
        either as a multipart form-data file upload, as a base64-encoded string
        in a JSON request, or as an image URL. Returns a PNG image with
        transparent background.


        **Authentication:** This endpoint accepts either a Bearer API key or a
        `SIGN-IN-WITH-X` header for x402 wallet-based authentication. The legacy
        `X-Sign-In-With-X` header is also accepted during migration. When using
        x402, a `402 Payment Required` response indicates insufficient balance
        and includes top-up instructions.
      operationId: backgroundRemoveImage
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BackgroundRemoveImageRequest"
          multipart/form-data:
            schema:
              $ref: "#/components/schemas/BackgroundRemoveImageRequest"
      security:
        - BearerAuth: []
        - siwx: []
      x-payment-info:
        price:
          mode: dynamic
          currency: USD
          min: "0.001"
          max: "10.00"
        protocols:
          - x402: {}
      summary: /api/v1/image/background-remove
      tags:
        - Image
      responses:
        "200":
          description: OK - PNG image with transparent background
          headers:
            X-Balance-Remaining:
              description: Remaining x402 credit balance in USD after this request (only
                present for x402 auth).
              required: false
              schema:
                type: string
                example: "4.230000"
          content:
            image/png:
              schema:
                format: binary
                type: string
        "400":
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DetailedError"
        "401":
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "402":
          description: >-
            Payment or balance required. Response varies by authentication
            state:


            **API Key users:** Standard error response with
            `INSUFFICIENT_BALANCE` code. Top up your Venice balance at
            venice.ai.


            **Unauthenticated x402 discovery:** Structured x402 response with
            `x402Version`, `resource`, `accepts`, and
            `extensions["sign-in-with-x"]`. The `accepts` array advertises Base
            and Solana payment requirements.


            **Authenticated x402 wallet users with insufficient credit:**
            Structured response with `PAYMENT_REQUIRED` code containing:

            - `topUpInstructions`: Step-by-step guide to top up via x402
            protocol

            - `supportedTokens` / `supportedChains`: Accepted payment methods

            - `siwxChallenge`: Fresh Sign-In-With-X challenge metadata


            The `PAYMENT-REQUIRED` header also contains a base64-encoded x402
            protocol object with the payment requirements for programmatic
            discovery.
          headers:
            PAYMENT-REQUIRED:
              description: Base64-encoded JSON with x402 payment requirements. Present on x402
                middleware 402 responses. Decode to choose and sign one accepted
                payment requirement programmatically.
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/StandardError"
                  - $ref: "#/components/schemas/X402InferencePaymentRequired"
        "415":
          description: Invalid request content-type
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "429":
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "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"
  /models:
    get:
      description: Returns a list of available models supported by the Venice.ai API
        across text, image, audio, video, and related inference types.
      operationId: listModels
      security:
        - {}
        - BearerAuth: []
      summary: /api/v1/models
      tags:
        - Models
      parameters:
        - schema:
            anyOf:
              - type: string
                enum:
                  - asr
                  - embedding
                  - image
                  - music
                  - text
                  - tts
                  - upscale
                  - inpaint
                  - video
              - type: string
                enum:
                  - all
                  - code
            description: Filter models by type. Use "all" to get all model types.
            example: text
          required: false
          name: type
          in: query
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/ModelResponse"
                    description: List of available models
                  object:
                    type: string
                    enum:
                      - list
                  type:
                    anyOf:
                      - type: string
                        enum:
                          - asr
                          - embedding
                          - image
                          - music
                          - text
                          - tts
                          - upscale
                          - inpaint
                          - video
                      - type: string
                        enum:
                          - all
                          - code
                    description: Type of models returned.
                    example: text
                required:
                  - data
                  - object
                  - type
        "500":
          description: An unknown error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
  /models/traits:
    get:
      description: Returns a list of model traits and the associated model.
      operationId: listModelTraits
      security:
        - {}
        - BearerAuth: []
      summary: /api/v1/models/traits
      tags:
        - Models
      parameters:
        - schema:
            type: string
            enum:
              - asr
              - embedding
              - image
              - music
              - text
              - tts
              - upscale
              - inpaint
              - video
            default: text
            description: Filter models by type.
            example: text
          required: false
          name: type
          in: query
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/ModelTraitSchema"
                  object:
                    type: string
                    enum:
                      - list
                  type:
                    anyOf:
                      - type: string
                        enum:
                          - asr
                          - embedding
                          - image
                          - music
                          - text
                          - tts
                          - upscale
                          - inpaint
                          - video
                      - type: string
                        enum:
                          - all
                          - code
                    description: Type of models returned.
                    example: text
                required:
                  - data
                  - object
                  - type
        "401":
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "500":
          description: An unknown error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
  /models/compatibility_mapping:
    get:
      description: Returns a list of model compatibility mappings and the associated model.
      operationId: listModelCompatibilityMapping
      security:
        - {}
        - BearerAuth: []
      summary: /api/v1/models/compatibility_mapping
      tags:
        - Models
      parameters:
        - schema:
            type: string
            enum:
              - asr
              - embedding
              - image
              - music
              - text
              - tts
              - upscale
              - inpaint
              - video
            default: text
            description: Filter models by type.
            example: text
          required: false
          name: type
          in: query
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/ModelCompatibilitySchema"
                  object:
                    type: string
                    enum:
                      - list
                  type:
                    anyOf:
                      - type: string
                        enum:
                          - asr
                          - embedding
                          - image
                          - music
                          - text
                          - tts
                          - upscale
                          - inpaint
                          - video
                      - type: string
                        enum:
                          - all
                          - code
                    description: Type of models returned.
                    example: text
                required:
                  - data
                  - object
                  - type
        "401":
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "500":
          description: An unknown error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
  /api_keys:
    get:
      description: Return a list of API keys.
      operationId: getApiKeys
      summary: /api/v1/api_keys
      tags:
        - API Keys
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        apiKeyType:
                          type: string
                          enum:
                            - INFERENCE
                            - ADMIN
                          description: API Key type
                          example: ADMIN
                        consumptionLimits:
                          type: object
                          properties:
                            usd:
                              anyOf:
                                - type: number
                                  minimum: 0
                                  maximum: 9999999999
                                - nullable: true
                                  title: "null"
                                - nullable: true
                                  title: "null"
                              description: USD limit
                              example: 50
                            diem:
                              anyOf:
                                - type: number
                                  minimum: 0
                                  maximum: 9999999999
                                - nullable: true
                                  title: "null"
                                - nullable: true
                                  title: "null"
                              description: Diem limit
                              example: 10
                            vcu:
                              anyOf:
                                - type: number
                                  minimum: 0
                                  maximum: 9999999999
                                - nullable: true
                                  title: "null"
                                - nullable: true
                                  title: "null"
                              description: VCU limit (deprecated - use Diem instead)
                              deprecated: true
                              example: 100
                          description: The API Key consumption limits, evaluated against the window
                            selected by `limitPeriod`.
                          example:
                            usd: 50
                            diem: 10
                            vcu: 30
                        limitPeriod:
                          type: string
                          enum:
                            - EPOCH
                            - MONTH
                            - LIFETIME
                          description: Reset window the consumption limits apply to. `EPOCH` resets every
                            UTC day (legacy default). `MONTH` resets on the 1st
                            of each UTC calendar month. `LIFETIME` never resets,
                            so the limit acts as a permanent cap on the key.
                          example: MONTH
                        createdAt:
                          type: string
                          nullable: true
                          description: API Key creation date
                          example: 2023-10-01T12:00:00Z
                        description:
                          type: string
                          description: API Key description
                          example: Example API Key
                        expiresAt:
                          type: string
                          nullable: true
                          description: API Key expiration date
                          example: 2023-10-01T12:00:00Z
                        id:
                          type: string
                          description: API Key ID
                          example: e28e82dc-9df2-4b47-b726-d0a222ef2ab5
                        last6Chars:
                          type: string
                          description: Last 6 characters of the API Key
                          example: 2V2jNW
                        lastUsedAt:
                          type: string
                          nullable: true
                          description: API Key last used date
                          example: 2023-10-01T12:00:00Z
                        usage:
                          type: object
                          properties:
                            trailingSevenDays:
                              type: object
                              properties:
                                usd:
                                  type: string
                                  description: USD budget usage in the trailing 7 days, including bundled credits
                                  example: "10.2424"
                                vcu:
                                  type: string
                                  description: VCU usage in the trailing 7 days (deprecated - use Diem instead)
                                  deprecated: true
                                  example: "42.2315"
                                diem:
                                  type: string
                                  description: Diem usage in the trailing 7 days
                                  example: "4.2231"
                              required:
                                - usd
                                - vcu
                                - diem
                          required:
                            - trailingSevenDays
                        currentPeriodUsage:
                          type: object
                          properties:
                            usd:
                              type: string
                              description: USD budget usage in the current limit period, including bundled
                                credits
                              example: "5.1234"
                            diem:
                              type: string
                              description: Diem usage in the current limit period
                              example: "2.5000"
                          required:
                            - usd
                            - diem
                          description: Usage within the current limit period window. Only present for keys
                            that have consumption limits set.
                      required:
                        - apiKeyType
                        - consumptionLimits
                        - limitPeriod
                        - createdAt
                        - expiresAt
                        - id
                        - last6Chars
                        - lastUsedAt
                      additionalProperties: false
                    description: List of active API keys
                  object:
                    type: string
                    enum:
                      - list
                required:
                  - data
                  - object
                additionalProperties: false
        "401":
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "500":
          description: An unknown error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
    delete:
      description: Delete an API key.
      operationId: deleteApiKey
      parameters:
        - description: The ID of the API key to delete
          in: query
          name: id
          required: false
          schema:
            type: string
      summary: /api/v1/api_keys
      tags:
        - API Keys
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                required:
                  - success
                additionalProperties: false
        "400":
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DetailedError"
        "401":
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "500":
          description: An unknown error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
    post:
      description: Create a new API key.
      operationId: createApiKey
      summary: /api/v1/api_keys
      tags:
        - API Keys
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                apiKeyType:
                  type: string
                  enum:
                    - INFERENCE
                    - ADMIN
                  description: The API Key type. Admin keys have full access to the API while
                    inference keys are only able to call inference endpoints.
                  example: ADMIN
                consumptionLimit:
                  type: object
                  properties:
                    usd:
                      anyOf:
                        - type: number
                          minimum: 0
                          maximum: 9999999999
                        - nullable: true
                          title: "null"
                        - nullable: true
                          title: "null"
                      description: USD limit
                      example: 50
                    diem:
                      anyOf:
                        - type: number
                          minimum: 0
                          maximum: 9999999999
                        - nullable: true
                          title: "null"
                        - nullable: true
                          title: "null"
                      description: Diem limit
                      example: 10
                    vcu:
                      anyOf:
                        - type: number
                          minimum: 0
                          maximum: 9999999999
                        - nullable: true
                          title: "null"
                        - nullable: true
                          title: "null"
                      description: VCU limit (deprecated - use Diem instead)
                      deprecated: true
                      example: 100
                  description: The API Key consumption limits, evaluated against the window
                    selected by `limitPeriod`.
                  example:
                    usd: 50
                    diem: 10
                    vcu: 30
                limitPeriod:
                  type: string
                  enum:
                    - EPOCH
                    - MONTH
                    - LIFETIME
                  description: Reset window the consumption limits apply to. `EPOCH` resets every
                    UTC day (legacy default). `MONTH` resets on the 1st of each
                    UTC calendar month. `LIFETIME` never resets, so the limit
                    acts as a permanent cap on the key.
                  example: MONTH
                description:
                  type: string
                  maxLength: 64
                  description: The API Key description (max 64 characters)
                  example: Example API Key
                expiresAt:
                  anyOf:
                    - type: string
                      enum:
                        - ""
                    - type: string
                      pattern: ^\d{4}-\d{2}-\d{2}$
                    - type: string
                      pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z$
                  description: The API Key expiration date. If not provided, the key will not
                    expire.
                  example: 2023-10-01T12:00:00Z
              required:
                - apiKeyType
                - description
              additionalProperties: false
              description: The request body for creating a new API key. API key creation is
                rate limited to 20 requests per minute and a maximum of 500
                active API keys per user. VCU (Legacy Diem) is being deprecated
                in favor of tokenized Diem. Please update your API calls to use
                Diem instead.
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      apiKey:
                        type: string
                        description: The API Key. This is only shown once, so make sure to save it
                          somewhere safe.
                      apiKeyType:
                        type: string
                        enum:
                          - INFERENCE
                          - ADMIN
                        description: The API Key type
                        example: ADMIN
                      consumptionLimit:
                        type: object
                        properties:
                          usd:
                            anyOf:
                              - type: number
                                minimum: 0
                                maximum: 9999999999
                              - nullable: true
                                title: "null"
                              - nullable: true
                                title: "null"
                            description: USD limit
                            example: 50
                          diem:
                            anyOf:
                              - type: number
                                minimum: 0
                                maximum: 9999999999
                              - nullable: true
                                title: "null"
                              - nullable: true
                                title: "null"
                            description: Diem limit
                            example: 10
                          vcu:
                            anyOf:
                              - type: number
                                minimum: 0
                                maximum: 9999999999
                              - nullable: true
                                title: "null"
                              - nullable: true
                                title: "null"
                            description: VCU limit (deprecated - use Diem instead)
                            deprecated: true
                            example: 100
                        description: The API Key consumption limits, evaluated against the window
                          selected by `limitPeriod`.
                        example:
                          usd: 50
                          diem: 10
                          vcu: 30
                      limitPeriod:
                        type: string
                        enum:
                          - EPOCH
                          - MONTH
                          - LIFETIME
                        description: Reset window the consumption limits apply to. `EPOCH` resets every
                          UTC day (legacy default). `MONTH` resets on the 1st of
                          each UTC calendar month. `LIFETIME` never resets, so
                          the limit acts as a permanent cap on the key.
                        example: MONTH
                      description:
                        type: string
                        description: The API Key description
                        example: Example API Key
                      expiresAt:
                        type: string
                        nullable: true
                        description: The API Key expiration date
                        example: 2023-10-01T12:00:00Z
                      id:
                        type: string
                        description: The API Key ID
                        example: e28e82dc-9df2-4b47-b726-d0a222ef2ab5
                    required:
                      - apiKey
                      - apiKeyType
                      - consumptionLimit
                      - limitPeriod
                      - expiresAt
                      - id
                    additionalProperties: false
                  success:
                    type: boolean
                required:
                  - data
                  - success
                additionalProperties: false
        "400":
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DetailedError"
        "401":
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "429":
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "500":
          description: An unknown error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
    patch:
      description: Update an existing API key. The description, expiration date, and
        consumption limits can be updated.
      operationId: updateApiKey
      summary: /api/v1/api_keys
      tags:
        - API Keys
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                consumptionLimit:
                  type: object
                  properties:
                    usd:
                      anyOf:
                        - type: number
                          minimum: 0
                          maximum: 9999999999
                        - nullable: true
                          title: "null"
                        - nullable: true
                          title: "null"
                      description: USD limit
                      example: 50
                    diem:
                      anyOf:
                        - type: number
                          minimum: 0
                          maximum: 9999999999
                        - nullable: true
                          title: "null"
                        - nullable: true
                          title: "null"
                      description: Diem limit
                      example: 10
                    vcu:
                      anyOf:
                        - type: number
                          minimum: 0
                          maximum: 9999999999
                        - nullable: true
                          title: "null"
                        - nullable: true
                          title: "null"
                      description: VCU limit (deprecated - use Diem instead)
                      deprecated: true
                      example: 100
                  description: The API Key consumption limits, evaluated against the window
                    selected by `limitPeriod`.
                  example:
                    usd: 50
                    diem: 10
                    vcu: 30
                limitPeriod:
                  type: string
                  enum:
                    - EPOCH
                    - MONTH
                    - LIFETIME
                  description: Reset window the consumption limits apply to. `EPOCH` resets every
                    UTC day (legacy default). `MONTH` resets on the 1st of each
                    UTC calendar month. `LIFETIME` never resets, so the limit
                    acts as a permanent cap on the key.
                  example: MONTH
                description:
                  type: string
                  maxLength: 64
                  description: The API Key description (max 64 characters)
                  example: Updated API Key Name
                expiresAt:
                  anyOf:
                    - type: string
                      enum:
                        - ""
                    - nullable: true
                      title: "null"
                    - type: string
                      pattern: ^\d{4}-\d{2}-\d{2}$
                    - type: string
                      pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z$
                    - nullable: true
                      title: "null"
                  description: The API Key expiration date. Set to empty string or null to remove
                    expiration.
                  example: 2023-10-01T12:00:00Z
                id:
                  type: string
                  description: The API Key ID to update
                  example: e28e82dc-9df2-4b47-b726-d0a222ef2ab5
              required:
                - id
              additionalProperties: false
              description: The request body for updating an existing API key. The description,
                expiration date, consumption limits and limit period (epoch /
                month / lifetime) can be updated.
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      apiKeyType:
                        type: string
                        enum:
                          - INFERENCE
                          - ADMIN
                        description: The API Key type
                        example: ADMIN
                      consumptionLimits:
                        type: object
                        properties:
                          usd:
                            anyOf:
                              - type: number
                                minimum: 0
                                maximum: 9999999999
                              - nullable: true
                                title: "null"
                              - nullable: true
                                title: "null"
                            description: USD limit
                            example: 50
                          diem:
                            anyOf:
                              - type: number
                                minimum: 0
                                maximum: 9999999999
                              - nullable: true
                                title: "null"
                              - nullable: true
                                title: "null"
                            description: Diem limit
                            example: 10
                          vcu:
                            anyOf:
                              - type: number
                                minimum: 0
                                maximum: 9999999999
                              - nullable: true
                                title: "null"
                              - nullable: true
                                title: "null"
                            description: VCU limit (deprecated - use Diem instead)
                            deprecated: true
                            example: 100
                        description: The API Key consumption limits, evaluated against the window
                          selected by `limitPeriod`.
                        example:
                          usd: 50
                          diem: 10
                          vcu: 30
                      limitPeriod:
                        type: string
                        enum:
                          - EPOCH
                          - MONTH
                          - LIFETIME
                        description: Reset window the consumption limits apply to. `EPOCH` resets every
                          UTC day (legacy default). `MONTH` resets on the 1st of
                          each UTC calendar month. `LIFETIME` never resets, so
                          the limit acts as a permanent cap on the key.
                        example: MONTH
                      createdAt:
                        type: string
                        nullable: true
                        description: API Key creation date
                        example: 2023-10-01T12:00:00Z
                      description:
                        type: string
                        description: The API Key description
                        example: Updated API Key
                      expiresAt:
                        type: string
                        nullable: true
                        description: The API Key expiration date
                        example: 2023-10-01T12:00:00Z
                      id:
                        type: string
                        description: The API Key ID
                        example: e28e82dc-9df2-4b47-b726-d0a222ef2ab5
                      last6Chars:
                        type: string
                        description: Last 6 characters of the API Key
                        example: 2V2jNW
                      lastUsedAt:
                        type: string
                        nullable: true
                        description: API Key last used date
                        example: 2023-10-01T12:00:00Z
                    required:
                      - apiKeyType
                      - consumptionLimits
                      - limitPeriod
                      - createdAt
                      - expiresAt
                      - id
                      - last6Chars
                      - lastUsedAt
                    additionalProperties: false
                  success:
                    type: boolean
                required:
                  - data
                  - success
                additionalProperties: false
        "400":
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DetailedError"
        "401":
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "500":
          description: An unknown error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
  /api_keys/{id}:
    get:
      description: Return details about a specific API key, including rate limits and
        balance data.
      operationId: getApiKeyById
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: The ID of the API key to retrieve
      summary: Get API key details by ID
      tags:
        - API Keys
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      apiKeyType:
                        type: string
                        enum:
                          - INFERENCE
                          - ADMIN
                        description: API Key type
                        example: ADMIN
                      consumptionLimits:
                        type: object
                        properties:
                          usd:
                            anyOf:
                              - type: number
                                minimum: 0
                                maximum: 9999999999
                              - nullable: true
                                title: "null"
                              - nullable: true
                                title: "null"
                            description: USD limit
                            example: 50
                          diem:
                            anyOf:
                              - type: number
                                minimum: 0
                                maximum: 9999999999
                              - nullable: true
                                title: "null"
                              - nullable: true
                                title: "null"
                            description: Diem limit
                            example: 10
                          vcu:
                            anyOf:
                              - type: number
                                minimum: 0
                                maximum: 9999999999
                              - nullable: true
                                title: "null"
                              - nullable: true
                                title: "null"
                            description: VCU limit (deprecated - use Diem instead)
                            deprecated: true
                            example: 100
                        description: The API Key consumption limits, evaluated against the window
                          selected by `limitPeriod`.
                        example:
                          usd: 50
                          diem: 10
                          vcu: 30
                      limitPeriod:
                        type: string
                        enum:
                          - EPOCH
                          - MONTH
                          - LIFETIME
                        description: Reset window the consumption limits apply to. `EPOCH` resets every
                          UTC day (legacy default). `MONTH` resets on the 1st of
                          each UTC calendar month. `LIFETIME` never resets, so
                          the limit acts as a permanent cap on the key.
                        example: MONTH
                      createdAt:
                        type: string
                        nullable: true
                        description: API Key creation date
                        example: 2023-10-01T12:00:00Z
                      description:
                        type: string
                        description: API Key description
                        example: Example API Key
                      expiresAt:
                        type: string
                        nullable: true
                        description: API Key expiration date
                        example: 2023-10-01T12:00:00Z
                      id:
                        type: string
                        description: API Key ID
                        example: e28e82dc-9df2-4b47-b726-d0a222ef2ab5
                      last6Chars:
                        type: string
                        description: Last 6 characters of the API Key
                        example: 2V2jNW
                      lastUsedAt:
                        type: string
                        nullable: true
                        description: API Key last used date
                        example: 2023-10-01T12:00:00Z
                      usage:
                        type: object
                        properties:
                          trailingSevenDays:
                            type: object
                            properties:
                              usd:
                                type: string
                                description: USD budget usage in the trailing 7 days, including bundled credits
                                example: "10.2424"
                              vcu:
                                type: string
                                description: VCU usage in the trailing 7 days (deprecated - use Diem instead)
                                deprecated: true
                                example: "42.2315"
                              diem:
                                type: string
                                description: Diem usage in the trailing 7 days
                                example: "4.2231"
                            required:
                              - usd
                              - vcu
                              - diem
                        required:
                          - trailingSevenDays
                      currentPeriodUsage:
                        type: object
                        properties:
                          usd:
                            type: string
                            description: USD budget usage in the current limit period, including bundled
                              credits
                            example: "5.1234"
                          diem:
                            type: string
                            description: Diem usage in the current limit period
                            example: "2.5000"
                        required:
                          - usd
                          - diem
                        description: Usage within the current limit period window. Only present for keys
                          that have consumption limits set.
                    required:
                      - apiKeyType
                      - consumptionLimits
                      - limitPeriod
                      - createdAt
                      - expiresAt
                      - id
                      - last6Chars
                      - lastUsedAt
                    additionalProperties: false
                    description: API key details
                required:
                  - data
                additionalProperties: false
                example:
                  data:
                    apiKeyType: ADMIN
                    consumptionLimits:
                      usd: 50
                      diem: 10
                    limitPeriod: MONTH
                    createdAt: {}
                    description: Example API Key
                    expiresAt: {}
                    id: e28e82dc-9df2-4b47-b726-d0a222ef2ab5
                    last6Chars: 2V2jNW
                    lastUsedAt: {}
                    usage:
                      trailingSevenDays:
                        usd: "10.2424"
                        vcu: "42.2315"
                        diem: "4.2231"
        "401":
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "500":
          description: An unknown error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
  /api_keys/rate_limits:
    get:
      description: Return details about user balances and rate limits.
      operationId: getApiKeyRateLimits
      summary: /api/v1/api_keys/rate_limits
      tags:
        - API Keys
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      accessPermitted:
                        type: boolean
                        description: Does the API key have access to consume the inference APIs?
                        example: true
                      apiTier:
                        type: object
                        properties:
                          id:
                            type: string
                            description: The ID of the API tier.
                            example: paid
                          isCharged:
                            type: boolean
                            description: Is the API key pay per use (in Diem or USD).
                            example: true
                        required:
                          - id
                          - isCharged
                      balances:
                        type: object
                        properties:
                          USD:
                            type: number
                            description: The USD balance of the key.
                            example: 50.23
                          DIEM:
                            type: number
                            description: The Diem balance of the key.
                            example: 100.023
                      keyExpiration:
                        type: string
                        nullable: true
                        description: The timestamp the API key expires. If null, the key never expires.
                        example: 2025-06-01T00:00:00Z
                      nextEpochBegins:
                        type: string
                        description: The timestamp when the next epoch begins. This is relevant for rate
                          limits that reset at the start of each epoch.
                        example: 2025-05-07T00:00:00.000Z
                      rateLimits:
                        type: array
                        items:
                          type: object
                          properties:
                            apiModelId:
                              type: string
                              description: The ID of the API model.
                              example: zai-org-glm-5-1
                            rateLimits:
                              type: array
                              items:
                                type: object
                                properties:
                                  amount:
                                    type: number
                                    description: The rate limit for the API model.
                                    example: 100
                                  type:
                                    type: string
                                    description: The time period for the rate limit. Can be Requests Per Minute
                                      (RPM), Requests Per Day (RPD), or Tokens
                                      Per Minute (TPM).
                                    example: RPM
                                required:
                                  - amount
                                  - type
                          required:
                            - rateLimits
                    required:
                      - accessPermitted
                      - apiTier
                      - balances
                      - keyExpiration
                      - nextEpochBegins
                      - rateLimits
                required:
                  - data
        "401":
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "500":
          description: An unknown error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
  /api_keys/rate_limits/log:
    get:
      description: Returns the last 50 rate limits that the account exceeded.
      operationId: getApiKeyRateLimitLogs
      summary: /api/v1/api_keys/rate_limits/log
      tags:
        - API Keys
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        apiKeyId:
                          type: string
                          description: The ID of the API key that exceeded the limit.
                        modelId:
                          type: string
                          default: zai-org-glm-5-1
                          description: The ID of the model that was used when the rate limit was exceeded.
                        rateLimitTier:
                          type: string
                          description: The API tier of the rate limit.
                          example: paid
                        rateLimitType:
                          type: string
                          enum:
                            - RPD
                            - RPM
                            - TPM
                            - FAILED_REQUESTS
                            - UNSUPPORTED_FEATURE_REQUESTS
                          description: The type of rate limit that was exceeded. RPM, TPM, and RPD are
                            throughput limits (requests per minute, tokens per
                            minute, requests per day). FAILED_REQUESTS means too
                            many requests returned a non-success status code
                            within the window. UNSUPPORTED_FEATURE_REQUESTS
                            means too many requests asked a model for a feature
                            it does not support.
                          example: RPM
                        timestamp:
                          type: string
                          description: The timestamp when the rate limit was exceeded.
                          example: 2023-10-01T12:00:00Z
                      required:
                        - apiKeyId
                        - modelId
                        - rateLimitTier
                        - rateLimitType
                        - timestamp
                      additionalProperties: false
                    description: The last 50 rate limit logs for the account.
                  object:
                    type: string
                    enum:
                      - list
                required:
                  - data
                  - object
                additionalProperties: false
        "401":
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "500":
          description: An unknown error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
  /api_keys/generate_web3_key:
    get:
      description: Returns the token required to generate an API key via a wallet.
      operationId: getApiKeyGenerateWeb3Key
      security: []
      summary: /api/v1/api_keys/generate_web3_key
      tags:
        - API Keys
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      token:
                        type: string
                        description: The token to sign with the wallet
                        example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
                    required:
                      - token
                  success:
                    type: boolean
                required:
                  - data
                  - success
    post:
      description: Authenticates a wallet holding sVVV and creates an API key.
      operationId: postApiKeyGenerateWeb3Key
      security: []
      summary: /api/v1/api_keys/generate_web3_key
      tags:
        - API Keys
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                apiKeyType:
                  type: string
                  enum:
                    - INFERENCE
                    - ADMIN
                  description: The API Key type. Admin keys have full access to the API while
                    inference keys are only able to call inference endpoints.
                  example: ADMIN
                consumptionLimit:
                  type: object
                  properties:
                    usd:
                      anyOf:
                        - type: number
                          minimum: 0
                          maximum: 9999999999
                        - nullable: true
                          title: "null"
                        - nullable: true
                          title: "null"
                      description: USD limit
                      example: 50
                    diem:
                      anyOf:
                        - type: number
                          minimum: 0
                          maximum: 9999999999
                        - nullable: true
                          title: "null"
                        - nullable: true
                          title: "null"
                      description: Diem limit
                      example: 10
                    vcu:
                      anyOf:
                        - type: number
                          minimum: 0
                          maximum: 9999999999
                        - nullable: true
                          title: "null"
                        - nullable: true
                          title: "null"
                      description: VCU limit (deprecated - use Diem instead)
                      deprecated: true
                      example: 100
                  description: The API Key consumption limits, evaluated against the window
                    selected by `limitPeriod`.
                  example:
                    usd: 50
                    diem: 10
                    vcu: 30
                limitPeriod:
                  type: string
                  enum:
                    - EPOCH
                    - MONTH
                    - LIFETIME
                  description: Reset window the consumption limits apply to. `EPOCH` resets every
                    UTC day (legacy default). `MONTH` resets on the 1st of each
                    UTC calendar month. `LIFETIME` never resets, so the limit
                    acts as a permanent cap on the key.
                  example: MONTH
                description:
                  type: string
                  default: Web3 API Key
                  description: The API Key description
                  example: Web3 API Key
                expiresAt:
                  anyOf:
                    - type: string
                      enum:
                        - ""
                    - type: string
                      pattern: ^\d{4}-\d{2}-\d{2}$
                    - type: string
                      pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z$
                  description: The API Key expiration date. If not provided, the key will not
                    expire.
                  example: 2023-10-01T12:00:00Z
                address:
                  type: string
                  description: The wallet's address
                  example: "0x45B73055F3aDcC4577Bb709db10B19d11b5c94eE"
                signature:
                  type: string
                  description: The token, signed with the wallet's private key
                  example: "0xbb5ff2e177f3a97fa553057864ad892eb64120f3eaf9356b4742a10f9a068d42725\
                    de895b5e45160b679cbe6961dc4cb552ba10dc97bdd8258d9154810785c\
                    451c"
                token:
                  type: string
                  description: The token obtained from
                    https://api.venice.ai/api/v1/api_keys/generate_web3_key
                  example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
              required:
                - apiKeyType
                - address
                - signature
                - token
              additionalProperties: false
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      apiKey:
                        type: string
                        description: The API Key. This is only shown once, so make sure to save it
                          somewhere safe.
                      apiKeyType:
                        type: string
                        enum:
                          - INFERENCE
                          - ADMIN
                        description: The API Key type
                        example: ADMIN
                      consumptionLimit:
                        type: object
                        properties:
                          usd:
                            anyOf:
                              - type: number
                                minimum: 0
                                maximum: 9999999999
                              - nullable: true
                                title: "null"
                              - nullable: true
                                title: "null"
                            description: USD limit
                            example: 50
                          diem:
                            anyOf:
                              - type: number
                                minimum: 0
                                maximum: 9999999999
                              - nullable: true
                                title: "null"
                              - nullable: true
                                title: "null"
                            description: Diem limit
                            example: 10
                          vcu:
                            anyOf:
                              - type: number
                                minimum: 0
                                maximum: 9999999999
                              - nullable: true
                                title: "null"
                              - nullable: true
                                title: "null"
                            description: VCU limit (deprecated - use Diem instead)
                            deprecated: true
                            example: 100
                        description: The API Key consumption limits, evaluated against the window
                          selected by `limitPeriod`.
                        example:
                          usd: 50
                          diem: 10
                          vcu: 30
                      limitPeriod:
                        type: string
                        enum:
                          - EPOCH
                          - MONTH
                          - LIFETIME
                        description: Reset window the consumption limits apply to. `EPOCH` resets every
                          UTC day (legacy default). `MONTH` resets on the 1st of
                          each UTC calendar month. `LIFETIME` never resets, so
                          the limit acts as a permanent cap on the key.
                        example: MONTH
                      description:
                        type: string
                        description: The API Key description
                        example: Example API Key
                      expiresAt:
                        type: string
                        nullable: true
                        description: The API Key expiration date
                        example: 2023-10-01T12:00:00Z
                      id:
                        type: string
                        description: The API Key ID
                        example: e28e82dc-9df2-4b47-b726-d0a222ef2ab5
                    required:
                      - apiKey
                      - apiKeyType
                      - consumptionLimit
                      - limitPeriod
                      - expiresAt
                      - id
                    additionalProperties: false
                  success:
                    type: boolean
                required:
                  - data
                  - success
                additionalProperties: false
  /characters:
    get:
      description: This is a preview API and may change. Returns a list of characters
        supported in the API, with filtering by search, tags, categories, model,
        and sort options.
      operationId: listCharacters
      summary: /api/v1/characters
      tags:
        - Characters
        - Preview
      parameters:
        - schema:
            type: array
            items:
              type: string
              maxLength: 100
            maxItems: 20
            description: Filter by category names. Repeat the parameter for multiple values.
              Comma-separated values are also accepted.
            example:
              - roleplay
              - philosophy
          required: false
          name: categories
          in: query
        - schema:
            type: string
            enum:
              - "true"
              - "false"
            description: Filter by adult content flag
            example: "false"
          required: false
          name: isAdult
          in: query
        - schema:
            type: string
            enum:
              - "true"
              - "false"
            description: Filter to only show characters using pro models
            example: "false"
          required: false
          name: isPro
          in: query
        - schema:
            type: string
            enum:
              - "true"
              - "false"
            description: Filter to only show web-enabled characters
            example: "true"
          required: false
          name: isWebEnabled
          in: query
        - schema:
            type: integer
            minimum: 0
            exclusiveMinimum: true
            maximum: 100
            default: 50
            description: "Number of characters to return (max: 100)"
            example: 50
          required: false
          name: limit
          in: query
        - schema:
            type: array
            items:
              type: string
              maxLength: 200
            maxItems: 20
            description: Filter by model ID(s). Repeat the parameter for multiple values.
              Comma-separated values are also accepted.
            example:
              - zai-org-glm-5-1
              - kimi-k2-6
          required: false
          name: modelId
          in: query
        - schema:
            type: integer
            nullable: true
            minimum: 0
            default: 0
            description: Number of characters to skip for pagination
            example: 0
          required: false
          name: offset
          in: query
        - schema:
            type: string
            maxLength: 200
            description: Search characters by name, description, or tags. Hashtag search is
              supported.
            example: assistant
          required: false
          name: search
          in: query
        - schema:
            type: string
            enum:
              - featured
              - highestRating
              - highlyRated
              - highlyRatedAndRecent
              - imports
              - mostRecent
              - ratingCount
            description: Sort results using a supported character discovery mode
            example: imports
          required: false
          name: sortBy
          in: query
        - schema:
            type: string
            enum:
              - asc
              - desc
            description: Sort order applied to the selected sort mode. Defaults to
              descending when omitted.
            example: desc
          required: false
          name: sortOrder
          in: query
        - schema:
            type: array
            items:
              type: string
              maxLength: 100
            maxItems: 20
            description: Filter by tag names. Repeat the parameter for multiple values.
              Comma-separated values are also accepted.
            example:
              - helpful
              - productivity
          required: false
          name: tags
          in: query
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        adult:
                          type: boolean
                          description: Whether the character is considered adult content
                          example: false
                        author:
                          type: string
                          description: Short anonymized identifier derived from the character author
                          example: k3x9q
                        createdAt:
                          type: string
                          description: Date when the character was created
                          example: 2024-12-20T21:28:08.934Z
                        description:
                          type: string
                          nullable: true
                          description: Description of the character
                          example: Alan Watts (6 January 1915 – 16 November 1973) was a British and
                            American writer, speaker, and self-styled
                            "philosophical entertainer", known for interpreting
                            and popularizing Buddhist, Taoist, and Hindu
                            philosophy for a Western audience.
                        featured:
                          type: boolean
                          description: Whether the character is featured in public discovery surfaces
                          example: false
                        id:
                          type: string
                          description: Unique ID of the character
                          example: 2f460055-7595-4640-9cb6-c442c4c869b0
                        name:
                          type: string
                          description: Name of the character
                          example: Alan Watts
                        shareUrl:
                          type: string
                          nullable: true
                          description: Share URL of the character
                          example: https://venice.ai/c/alan-watts
                        photoUrl:
                          type: string
                          nullable: true
                          description: URL of the character photo
                          example: https://outerface.venice.ai/api/characters/2f460055-7595-4640-9cb6-c442c4c869b0/photo
                        slug:
                          type: string
                          description: Slug of the character to be used in the completions API
                          example: alan-watts
                        stats:
                          type: object
                          properties:
                            averageRating:
                              type: number
                              description: Average rating for the character
                              example: 4.7
                            imports:
                              type: number
                              description: Number of imports for the character
                              example: 112
                            ratingCount:
                              type: number
                              description: Number of ratings for the character
                              example: 24
                            ratingSum:
                              type: number
                              description: Sum of all rating values for the character
                              example: 113
                            userRating:
                              type: number
                              nullable: true
                              description: The authenticated user rating for the character when available
                          required:
                            - averageRating
                            - imports
                            - ratingCount
                            - ratingSum
                            - userRating
                        tags:
                          type: array
                          items:
                            type: string
                          description: Tags associated with the character
                          example:
                            - AlanWatts
                            - Philosophy
                            - Buddhism
                            - Taoist
                            - Hindu
                        updatedAt:
                          type: string
                          description: Date when the character was last updated
                          example: 2025-02-09T03:23:53.708Z
                        webEnabled:
                          type: boolean
                          description: Whether the character is enabled for web use
                          example: true
                        modelId:
                          type: string
                          description: API model ID for the character
                          example: venice-uncensored-1-2
                      required:
                        - adult
                        - author
                        - createdAt
                        - description
                        - featured
                        - id
                        - name
                        - shareUrl
                        - photoUrl
                        - slug
                        - stats
                        - tags
                        - updatedAt
                        - webEnabled
                        - modelId
                  object:
                    type: string
                    enum:
                      - list
                required:
                  - data
                  - object
        "401":
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "500":
          description: An unknown error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
  /characters/{slug}:
    get:
      description: This is a preview API and may change. Returns a single character by
        its slug.
      operationId: getCharacterBySlug
      parameters:
        - description: The slug of the character to retrieve
          in: path
          name: slug
          required: true
          schema:
            example: alan-watts
            type: string
      summary: /api/v1/characters/{slug}
      tags:
        - Characters
        - Preview
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      adult:
                        type: boolean
                        description: Whether the character is considered adult content
                        example: false
                      author:
                        type: string
                        description: Short anonymized identifier derived from the character author
                        example: k3x9q
                      createdAt:
                        type: string
                        description: Date when the character was created
                        example: 2024-12-20T21:28:08.934Z
                      description:
                        type: string
                        nullable: true
                        description: Description of the character
                        example: Alan Watts (6 January 1915 – 16 November 1973) was a British and
                          American writer, speaker, and self-styled
                          "philosophical entertainer", known for interpreting
                          and popularizing Buddhist, Taoist, and Hindu
                          philosophy for a Western audience.
                      featured:
                        type: boolean
                        description: Whether the character is featured in public discovery surfaces
                        example: false
                      id:
                        type: string
                        description: Unique ID of the character
                        example: 2f460055-7595-4640-9cb6-c442c4c869b0
                      name:
                        type: string
                        description: Name of the character
                        example: Alan Watts
                      shareUrl:
                        type: string
                        nullable: true
                        description: Share URL of the character
                        example: https://venice.ai/c/alan-watts
                      photoUrl:
                        type: string
                        nullable: true
                        description: URL of the character photo
                        example: https://outerface.venice.ai/api/characters/2f460055-7595-4640-9cb6-c442c4c869b0/photo
                      slug:
                        type: string
                        description: Slug of the character to be used in the completions API
                        example: alan-watts
                      stats:
                        type: object
                        properties:
                          averageRating:
                            type: number
                            description: Average rating for the character
                            example: 4.7
                          imports:
                            type: number
                            description: Number of imports for the character
                            example: 112
                          ratingCount:
                            type: number
                            description: Number of ratings for the character
                            example: 24
                          ratingSum:
                            type: number
                            description: Sum of all rating values for the character
                            example: 113
                          userRating:
                            type: number
                            nullable: true
                            description: The authenticated user rating for the character when available
                        required:
                          - averageRating
                          - imports
                          - ratingCount
                          - ratingSum
                          - userRating
                      tags:
                        type: array
                        items:
                          type: string
                        description: Tags associated with the character
                        example:
                          - AlanWatts
                          - Philosophy
                          - Buddhism
                          - Taoist
                          - Hindu
                      updatedAt:
                        type: string
                        description: Date when the character was last updated
                        example: 2025-02-09T03:23:53.708Z
                      webEnabled:
                        type: boolean
                        description: Whether the character is enabled for web use
                        example: true
                      modelId:
                        type: string
                        description: API model ID for the character
                        example: venice-uncensored-1-2
                    required:
                      - adult
                      - author
                      - createdAt
                      - description
                      - featured
                      - id
                      - name
                      - shareUrl
                      - photoUrl
                      - slug
                      - stats
                      - tags
                      - updatedAt
                      - webEnabled
                      - modelId
                  object:
                    type: string
                    enum:
                      - character
                required:
                  - data
                  - object
        "401":
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "404":
          description: Character not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "500":
          description: An unknown error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
  /characters/{slug}/reviews:
    get:
      description: This is a preview API and may change. Returns paginated public
        reviews for a single character.
      operationId: getCharacterReviews
      summary: /api/v1/characters/{slug}/reviews
      tags:
        - Characters
        - Preview
      parameters:
        - schema:
            type: string
            description: Slug of the character whose reviews should be retrieved
            example: alan-watts
          required: true
          name: slug
          in: path
        - schema:
            type: integer
            minimum: 0
            exclusiveMinimum: true
            default: 1
            description: Page number for pagination
            example: 1
          required: false
          name: page
          in: query
        - schema:
            type: integer
            minimum: 0
            exclusiveMinimum: true
            maximum: 100
            default: 20
            description: "Number of reviews to return per page (max: 100)"
            example: 20
          required: false
          name: pageSize
          in: query
      responses:
        "200":
          description: OK
          headers:
            x-pagination-limit:
              schema:
                description: Number of reviews returned per page
                example: 20
                type: number
            x-pagination-page:
              schema:
                description: Current page number
                example: 1
                type: number
            x-pagination-total:
              schema:
                description: Total number of visible reviews
                example: 87
                type: number
            x-pagination-total-pages:
              schema:
                description: Total number of result pages
                example: 5
                type: number
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        characterId:
                          type: string
                          description: Unique ID of the reviewed character
                          example: 2f460055-7595-4640-9cb6-c442c4c869b0
                        createdAt:
                          type: string
                          description: Date when the review was created
                          example: 2025-02-09T03:23:53.708Z
                        id:
                          type: string
                          description: Unique ID of the review
                          example: 1e38fb78-043f-4ce2-b3bc-966089c25467
                        isOwner:
                          type: boolean
                          description: Whether the authenticated user authored this review
                          example: false
                        locale:
                          type: string
                          nullable: true
                          description: Locale reported by the reviewer when available
                          example: en
                        message:
                          type: string
                          nullable: true
                          description: Optional written review message
                          example: Thoughtful, grounded, and surprisingly practical.
                        rating:
                          type: integer
                          minimum: 1
                          maximum: 5
                          description: Star rating for the character
                          example: 5
                        userAvatarUrl:
                          type: string
                          nullable: true
                          description: Avatar URL for the reviewer when available
                          example: https://cdn.venice.ai/avatar.png
                        username:
                          type: string
                          description: Display name chosen by the reviewer
                          example: product_user_42
                      required:
                        - characterId
                        - createdAt
                        - id
                        - isOwner
                        - locale
                        - message
                        - rating
                        - userAvatarUrl
                        - username
                  object:
                    type: string
                    enum:
                      - list
                  pagination:
                    type: object
                    properties:
                      page:
                        type: integer
                        minimum: 0
                        exclusiveMinimum: true
                        description: Current page number
                        example: 1
                      pageSize:
                        type: integer
                        minimum: 0
                        exclusiveMinimum: true
                        description: Number of reviews requested per page
                        example: 20
                      total:
                        type: integer
                        minimum: 0
                        description: Total number of visible reviews for the character
                        example: 87
                      totalPages:
                        type: integer
                        minimum: 0
                        description: Total number of pages available
                        example: 5
                    required:
                      - page
                      - pageSize
                      - total
                      - totalPages
                  summary:
                    type: object
                    properties:
                      averageRating:
                        type: number
                        description: Average rating for the character
                        example: 4.7
                      totalReviews:
                        type: integer
                        minimum: 0
                        description: Total number of reviews included in the character stats summary
                        example: 87
                    required:
                      - averageRating
                      - totalReviews
                required:
                  - data
                  - object
                  - pagination
                  - summary
        "400":
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DetailedError"
        "401":
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "404":
          description: Character not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "500":
          description: An unknown error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
  /embeddings:
    post:
      description: >-
        Create embeddings for the supplied input. `input` must be a string or an
        array of strings. Token arrays (integer IDs) are rejected with HTTP 400.
        LangChain `OpenAIEmbeddings` sends token arrays unless
        `check_embedding_ctx_length` is `False`. Wrappers that construct
        `OpenAIEmbeddings` without that flag, including gpt-researcher's
        `openai` provider, still send token arrays.


        **Authentication:** This endpoint accepts either a Bearer API key or a
        `SIGN-IN-WITH-X` header for x402 wallet-based authentication. The legacy
        `X-Sign-In-With-X` header is also accepted during migration. When using
        x402, a `402 Payment Required` response indicates insufficient balance
        and includes top-up instructions.
      operationId: createEmbedding
      parameters:
        - description: Supported compression encodings (gzip, br)
          in: header
          name: Accept-Encoding
          required: false
          schema:
            example: gzip, br
            type: string
      security:
        - BearerAuth: []
        - siwx: []
      x-payment-info:
        price:
          mode: dynamic
          currency: USD
          min: "0.001"
          max: "10.00"
        protocols:
          - x402: {}
      summary: /api/v1/embeddings
      tags:
        - Embeddings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateEmbeddingRequestSchema"
      responses:
        "200":
          description: OK
          headers:
            X-Balance-Remaining:
              description: Remaining x402 credit balance in USD after this request (only
                present for x402 auth).
              required: false
              schema:
                type: string
                example: "4.230000"
            Content-Encoding:
              description: The encoding used to compress the response
              schema:
                enum:
                  - gzip
                  - br
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        embedding:
                          type: array
                          items:
                            type: number
                          description: The embedding vector
                        index:
                          type: integer
                          description: The index of this embedding in the list
                        object:
                          type: string
                          enum:
                            - embedding
                          description: The object type, which is always "embedding"
                      required:
                        - embedding
                        - index
                        - object
                    description: The list of embeddings generated by the model.
                  model:
                    type: string
                    description: The name of the model used to generate the embedding.
                  object:
                    type: string
                    enum:
                      - list
                    description: The object type, which is always "list"
                  usage:
                    type: object
                    properties:
                      prompt_tokens:
                        type: integer
                        description: The number of tokens used by the prompt.
                      total_tokens:
                        type: integer
                        description: The total number of tokens used by the request.
                    required:
                      - prompt_tokens
                      - total_tokens
                    description: The usage information for the request.
                required:
                  - data
                  - model
                  - object
                  - usage
                example:
                  data:
                    - embedding:
                        - 0.0023064255
                        - -0.009327292
                        - 0.015797377
                      index: 0
                      object: embedding
                  model: text-embedding-bge-m3
                  object: list
                  usage:
                    prompt_tokens: 8
                    total_tokens: 8
        "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"
        "402":
          description: >-
            Payment or balance required. Response varies by authentication
            state:


            **API Key users:** Standard error response with
            `INSUFFICIENT_BALANCE` code. Top up your Venice balance at
            venice.ai.


            **Unauthenticated x402 discovery:** Structured x402 response with
            `x402Version`, `resource`, `accepts`, and
            `extensions["sign-in-with-x"]`. The `accepts` array advertises Base
            and Solana payment requirements.


            **Authenticated x402 wallet users with insufficient credit:**
            Structured response with `PAYMENT_REQUIRED` code containing:

            - `topUpInstructions`: Step-by-step guide to top up via x402
            protocol

            - `supportedTokens` / `supportedChains`: Accepted payment methods

            - `siwxChallenge`: Fresh Sign-In-With-X challenge metadata


            The `PAYMENT-REQUIRED` header also contains a base64-encoded x402
            protocol object with the payment requirements for programmatic
            discovery.
          headers:
            PAYMENT-REQUIRED:
              description: Base64-encoded JSON with x402 payment requirements. Present on x402
                middleware 402 responses. Decode to choose and sign one accepted
                payment requirement programmatically.
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/StandardError"
                  - $ref: "#/components/schemas/X402InferencePaymentRequired"
        "415":
          description: Invalid request content-type
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "429":
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "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"
  /audio/speech:
    post:
      description: >-
        Converts text to speech using various voice models and formats.


        **Output formats:** Format support is model-specific. Read
        `model_spec.supported_formats` and `model_spec.default_format` from GET
        /models?type=tts. Omitting `response_format` uses the model default;
        requesting an unsupported format returns HTTP 400.


        **Voice cloning:** Some TTS models (e.g. `tts-chatterbox-hd`) accept a
        cloned-voice handle in the `voice` field. Mint a handle by uploading a
        reference audio sample to POST /v1/audio/voices, then pass the returned
        `vv_<id>` value as `voice` here paired with the same `model`. Supported
        voice-cloning models advertise the `voice_cloning` capability on GET
        /models?type=tts.


        **Authentication:** This endpoint accepts either a Bearer API key or a
        `SIGN-IN-WITH-X` header for x402 wallet-based authentication. The legacy
        `X-Sign-In-With-X` header is also accepted during migration. When using
        x402, a `402 Payment Required` response indicates insufficient balance
        and includes top-up instructions.
      operationId: createSpeech
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateSpeechRequestSchema"
      security:
        - BearerAuth: []
        - siwx: []
      x-payment-info:
        price:
          mode: dynamic
          currency: USD
          min: "0.001"
          max: "10.00"
        protocols:
          - x402: {}
      summary: /api/v1/audio/speech
      tags:
        - Audio
        - Speech
      responses:
        "200":
          description: Audio content generated successfully
          headers:
            X-Balance-Remaining:
              description: Remaining x402 credit balance in USD after this request (only
                present for x402 auth).
              required: false
              schema:
                type: string
                example: "4.230000"
          content:
            audio/aac:
              schema:
                format: binary
                type: string
            audio/flac:
              schema:
                format: binary
                type: string
            audio/mpeg:
              schema:
                format: binary
                type: string
            audio/opus:
              schema:
                format: binary
                type: string
            audio/pcm:
              schema:
                format: binary
                type: string
            audio/wav:
              schema:
                format: binary
                type: string
        "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"
        "402":
          description: >-
            Payment or balance required. Response varies by authentication
            state:


            **API Key users:** Standard error response with
            `INSUFFICIENT_BALANCE` code. Top up your Venice balance at
            venice.ai.


            **Unauthenticated x402 discovery:** Structured x402 response with
            `x402Version`, `resource`, `accepts`, and
            `extensions["sign-in-with-x"]`. The `accepts` array advertises Base
            and Solana payment requirements.


            **Authenticated x402 wallet users with insufficient credit:**
            Structured response with `PAYMENT_REQUIRED` code containing:

            - `topUpInstructions`: Step-by-step guide to top up via x402
            protocol

            - `supportedTokens` / `supportedChains`: Accepted payment methods

            - `siwxChallenge`: Fresh Sign-In-With-X challenge metadata


            The `PAYMENT-REQUIRED` header also contains a base64-encoded x402
            protocol object with the payment requirements for programmatic
            discovery.
          headers:
            PAYMENT-REQUIRED:
              description: Base64-encoded JSON with x402 payment requirements. Present on x402
                middleware 402 responses. Decode to choose and sign one accepted
                payment requirement programmatically.
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/StandardError"
                  - $ref: "#/components/schemas/X402InferencePaymentRequired"
        "403":
          description: Unauthorized access
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "415":
          description: Invalid request content-type
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "429":
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "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"
  /audio/transcriptions:
    post:
      description: >-
        Transcribes audio into the input language.


        **Authentication:** This endpoint accepts either a Bearer API key or a
        `SIGN-IN-WITH-X` header for x402 wallet-based authentication. The legacy
        `X-Sign-In-With-X` header is also accepted during migration. When using
        x402, a `402 Payment Required` response indicates insufficient balance
        and includes top-up instructions.
      operationId: createTranscription
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: "#/components/schemas/CreateTranscriptionRequestSchema"
      security:
        - BearerAuth: []
        - siwx: []
      x-payment-info:
        price:
          mode: dynamic
          currency: USD
          min: "0.001"
          max: "10.00"
        protocols:
          - x402: {}
      summary: /api/v1/audio/transcriptions
      tags:
        - Audio
        - Transcriptions
      responses:
        "200":
          description: Transcription completed successfully
          headers:
            X-Balance-Remaining:
              description: Remaining x402 credit balance in USD after this request (only
                present for x402 auth).
              required: false
              schema:
                type: string
                example: "4.230000"
          content:
            application/json:
              schema:
                type: object
                properties:
                  text:
                    type: string
                    description: The transcribed text
                  duration:
                    type: number
                    description: Duration of the audio in seconds
                  timestamps:
                    type: object
                    properties:
                      word:
                        type: array
                        items:
                          type: object
                          properties:
                            word:
                              type: string
                            start:
                              type: number
                            end:
                              type: number
                          required:
                            - word
                            - start
                            - end
                      segment:
                        type: array
                        items:
                          type: object
                          properties:
                            text:
                              type: string
                            start:
                              type: number
                            end:
                              type: number
                          required:
                            - text
                            - start
                            - end
                      char:
                        type: array
                        items:
                          type: object
                          properties:
                            char:
                              type: string
                            start:
                              type: number
                            end:
                              type: number
                          required:
                            - char
                            - start
                            - end
                    description: Timestamps for the transcription (only if timestamps=true)
                required:
                  - text
                description: Transcription response
            text/plain:
              schema:
                type: string
                description: The transcribed text in plain text format
        "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"
        "402":
          description: >-
            Payment or balance required. Response varies by authentication
            state:


            **API Key users:** Standard error response with
            `INSUFFICIENT_BALANCE` code. Top up your Venice balance at
            venice.ai.


            **Unauthenticated x402 discovery:** Structured x402 response with
            `x402Version`, `resource`, `accepts`, and
            `extensions["sign-in-with-x"]`. The `accepts` array advertises Base
            and Solana payment requirements.


            **Authenticated x402 wallet users with insufficient credit:**
            Structured response with `PAYMENT_REQUIRED` code containing:

            - `topUpInstructions`: Step-by-step guide to top up via x402
            protocol

            - `supportedTokens` / `supportedChains`: Accepted payment methods

            - `siwxChallenge`: Fresh Sign-In-With-X challenge metadata


            The `PAYMENT-REQUIRED` header also contains a base64-encoded x402
            protocol object with the payment requirements for programmatic
            discovery.
          headers:
            PAYMENT-REQUIRED:
              description: Base64-encoded JSON with x402 payment requirements. Present on x402
                middleware 402 responses. Decode to choose and sign one accepted
                payment requirement programmatically.
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/StandardError"
                  - $ref: "#/components/schemas/X402InferencePaymentRequired"
        "403":
          description: Unauthorized access
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "413":
          description: The request payload is too large. Please reduce the size of your
            request.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "415":
          description: Invalid request content-type
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "422":
          description: Validation error (e.g., zero-length audio)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        "429":
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "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"
  /audio/voices:
    post:
      description: >-
        Clone a voice from an audio sample. Returns a voice handle (`vv_...`)
        that can be passed to POST /v1/audio/speech as the `voice` parameter to
        synthesize speech in the cloned voice; the handle must be paired with
        the same `model` used to create it.


        Supported models:


        - `tts-chatterbox-hd` (Resemble AI) — accepts MP3, WAV, FLAC, and M4A
        samples. Zero-shot: no persistent voice template is derived; the
        reference audio is uploaded to a TTL’d storage object and re-read on
        each synthesis call. Handles expire automatically after 7 days.
        Available to regular users.


        - `tts-minimax-speech-02-hd` (MiniMax) — accepts MP3 and WAV only.
        Persistent: the upstream provider derives a custom voice template that
        survives across synthesis calls. Auto-deleted after 7 days without use;
        each successful TTS request resets the window. Currently limited access
        — contact support@venice.ai if you need it enabled.


        Samples in containers outside the per-model allowlist are rejected with
        HTTP 400 before any upload.


        **Authentication:** This endpoint accepts either a Bearer API key or a
        `SIGN-IN-WITH-X` header for x402 wallet-based authentication. The legacy
        `X-Sign-In-With-X` header is also accepted during migration. When using
        x402, a `402 Payment Required` response indicates insufficient balance
        and includes top-up instructions.
      operationId: createClonedVoice
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: "#/components/schemas/CreateClonedVoiceRequestSchema"
      security:
        - BearerAuth: []
        - siwx: []
      x-payment-info:
        price:
          mode: dynamic
          currency: USD
          min: "0.001"
          max: "10.00"
        protocols:
          - x402: {}
      summary: /api/v1/audio/voices
      tags:
        - Audio
        - Voices
      responses:
        "200":
          description: Voice cloned successfully
          headers:
            X-Balance-Remaining:
              description: Remaining x402 credit balance in USD after this request (only
                present for x402 auth).
              required: false
              schema:
                type: string
                example: "4.230000"
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The cloned voice handle. Pass this to POST /v1/audio/speech as the
                      `voice` parameter alongside the same `model` used to
                      create it. Handles expire automatically after the
                      per-model retention window (currently 7 days for both
                      supported models); for `tts-minimax-speech-02-hd` each
                      successful TTS request resets that window.
                    example: vv_voice_abc123xyz
                  model:
                    type: string
                    description: The Venice TTS model this voice can be used with.
                    example: tts-chatterbox-hd
                required:
                  - id
                  - model
                additionalProperties: false
        "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"
        "402":
          description: >-
            Payment or balance required. Response varies by authentication
            state:


            **API Key users:** Standard error response with
            `INSUFFICIENT_BALANCE` code. Top up your Venice balance at
            venice.ai.


            **Unauthenticated x402 discovery:** Structured x402 response with
            `x402Version`, `resource`, `accepts`, and
            `extensions["sign-in-with-x"]`. The `accepts` array advertises Base
            and Solana payment requirements.


            **Authenticated x402 wallet users with insufficient credit:**
            Structured response with `PAYMENT_REQUIRED` code containing:

            - `topUpInstructions`: Step-by-step guide to top up via x402
            protocol

            - `supportedTokens` / `supportedChains`: Accepted payment methods

            - `siwxChallenge`: Fresh Sign-In-With-X challenge metadata


            The `PAYMENT-REQUIRED` header also contains a base64-encoded x402
            protocol object with the payment requirements for programmatic
            discovery.
          headers:
            PAYMENT-REQUIRED:
              description: Base64-encoded JSON with x402 payment requirements. Present on x402
                middleware 402 responses. Decode to choose and sign one accepted
                payment requirement programmatically.
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/StandardError"
                  - $ref: "#/components/schemas/X402InferencePaymentRequired"
        "403":
          description: Unauthorized access
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "413":
          description: The request payload is too large. Please reduce the size of your
            request.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "415":
          description: Invalid request content-type
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "429":
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "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"
  /video/complete:
    post:
      description: >-
        Delete a video generation request from storage after it has been
        successfully downloaded. Videos can be automatically deleted after
        retrieval by setting the `delete_media_on_completion` flag to true when
        calling the retrieve API.


        **Authentication:** This endpoint accepts either a Bearer API key or a
        `SIGN-IN-WITH-X` header for x402 wallet-based authentication. The legacy
        `X-Sign-In-With-X` header is also accepted during migration. When using
        x402, a `402 Payment Required` response indicates insufficient balance
        and includes top-up instructions.
      operationId: completeVideo
      security:
        - BearerAuth: []
        - siwx: []
      x-payment-info:
        price:
          mode: dynamic
          currency: USD
          min: "0.001"
          max: "10.00"
        protocols:
          - x402: {}
      summary: /api/v1/video/complete
      tags:
        - Video
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CompleteVideoRequest"
      responses:
        "200":
          description: Video generation request completed successfully
          headers:
            X-Balance-Remaining:
              description: Remaining x402 credit balance in USD after this request (only
                present for x402 auth).
              required: false
              schema:
                type: string
                example: "4.230000"
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indicates whether the video cleanup was successful.
                    example: true
                required:
                  - success
        "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"
        "402":
          description: >-
            Payment or balance required. Response varies by authentication
            state:


            **API Key users:** Standard error response with
            `INSUFFICIENT_BALANCE` code. Top up your Venice balance at
            venice.ai.


            **Unauthenticated x402 discovery:** Structured x402 response with
            `x402Version`, `resource`, `accepts`, and
            `extensions["sign-in-with-x"]`. The `accepts` array advertises Base
            and Solana payment requirements.


            **Authenticated x402 wallet users with insufficient credit:**
            Structured response with `PAYMENT_REQUIRED` code containing:

            - `topUpInstructions`: Step-by-step guide to top up via x402
            protocol

            - `supportedTokens` / `supportedChains`: Accepted payment methods

            - `siwxChallenge`: Fresh Sign-In-With-X challenge metadata


            The `PAYMENT-REQUIRED` header also contains a base64-encoded x402
            protocol object with the payment requirements for programmatic
            discovery.
          headers:
            PAYMENT-REQUIRED:
              description: Base64-encoded JSON with x402 payment requirements. Present on x402
                middleware 402 responses. Decode to choose and sign one accepted
                payment requirement programmatically.
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/StandardError"
                  - $ref: "#/components/schemas/X402InferencePaymentRequired"
        "500":
          description: Inference processing failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
  /video/queue:
    post:
      description: >-
        Queue a new video generation request.


        **Authentication:** This endpoint accepts either a Bearer API key or a
        `SIGN-IN-WITH-X` header for x402 wallet-based authentication. The legacy
        `X-Sign-In-With-X` header is also accepted during migration. When using
        x402, a `402 Payment Required` response indicates insufficient balance
        and includes top-up instructions.
      operationId: queueVideo
      security:
        - BearerAuth: []
        - siwx: []
      x-payment-info:
        price:
          mode: dynamic
          currency: USD
          min: "0.001"
          max: "10.00"
        protocols:
          - x402: {}
      summary: /api/v1/video/queue
      tags:
        - Video
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/QueueVideoRequest"
      responses:
        "200":
          description: Video generation request queued successfully
          headers:
            X-Balance-Remaining:
              description: Remaining x402 credit balance in USD after this request (only
                present for x402 auth).
              required: false
              schema:
                type: string
                example: "4.230000"
          content:
            application/json:
              schema:
                type: object
                properties:
                  model:
                    type: string
                    description: The ID of the model used for video generation.
                    example: video-model-123
                  queue_id:
                    type: string
                    description: The ID of the video generation request.
                    example: 123e4567-e89b-12d3-a456-426614174000
                  download_url:
                    type: string
                    description: Pre-signed URL to download the completed video. Only present for
                      VPS-backed models. When provided, the retrieve endpoint
                      returns JSON status only (no video stream). Fetch this URL
                      after status is COMPLETED to get the video/mp4 file. Valid
                      for 24 hours.
                required:
                  - model
                  - queue_id
                additionalProperties: false
        "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"
        "402":
          description: >-
            Payment or balance required. Response varies by authentication
            state:


            **API Key users:** Standard error response with
            `INSUFFICIENT_BALANCE` code. Top up your Venice balance at
            venice.ai.


            **Unauthenticated x402 discovery:** Structured x402 response with
            `x402Version`, `resource`, `accepts`, and
            `extensions["sign-in-with-x"]`. The `accepts` array advertises Base
            and Solana payment requirements.


            **Authenticated x402 wallet users with insufficient credit:**
            Structured response with `PAYMENT_REQUIRED` code containing:

            - `topUpInstructions`: Step-by-step guide to top up via x402
            protocol

            - `supportedTokens` / `supportedChains`: Accepted payment methods

            - `siwxChallenge`: Fresh Sign-In-With-X challenge metadata


            The `PAYMENT-REQUIRED` header also contains a base64-encoded x402
            protocol object with the payment requirements for programmatic
            discovery.
          headers:
            PAYMENT-REQUIRED:
              description: Base64-encoded JSON with x402 payment requirements. Present on x402
                middleware 402 responses. Decode to choose and sign one accepted
                payment requirement programmatically.
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/StandardError"
                  - $ref: "#/components/schemas/X402InferencePaymentRequired"
        "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"
        "409":
          description: Additional consent is required before this request can be queued
            for some models
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - needs_consent
                      message:
                        type: string
                    required:
                      - code
                      - message
                    additionalProperties: false
                  consent_flow:
                    type: string
                    enum:
                      - seedance
                  face_media_roles:
                    type: array
                    items:
                      type: string
                      enum:
                        - image
                        - end_image
                        - reference_image
                        - video
                        - reference_video
                  consent:
                    type: object
                    properties:
                      consent_version:
                        type: string
                      policy_text:
                        type: string
                    required:
                      - consent_version
                      - policy_text
                    additionalProperties: false
                  docs_url:
                    type: string
                required:
                  - error
                  - consent_flow
                  - face_media_roles
                  - consent
                  - docs_url
                additionalProperties: false
        "413":
          description: The request payload is too large. Please reduce the size of your
            request.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Your prompt violates the content policy of Venice.ai or the model
            provider
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ContentViolationError"
        "500":
          description: Inference processing failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
  /video/quote:
    post:
      description: Quote a video generation request based on pricing inputs (model,
        duration, resolution, aspect_ratio, audio). Returns the price in USD.
      operationId: quoteVideo
      summary: /api/v1/video/quote
      tags:
        - Video
      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"
  /video/retrieve:
    post:
      description: >-
        Retrieve a video generation result. Returns the video file if completed,
        or a status if the request is still processing.


        **Authentication:** This endpoint accepts either a Bearer API key or a
        `SIGN-IN-WITH-X` header for x402 wallet-based authentication. The legacy
        `X-Sign-In-With-X` header is also accepted during migration. When using
        x402, a `402 Payment Required` response indicates insufficient balance
        and includes top-up instructions.
      operationId: retrieveVideo
      security:
        - BearerAuth: []
        - siwx: []
      x-payment-info:
        price:
          mode: dynamic
          currency: USD
          min: "0.001"
          max: "10.00"
        protocols:
          - x402: {}
      summary: /api/v1/video/retrieve
      tags:
        - Video
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RetrieveVideoRequest"
      responses:
        "200":
          description: Video file if completed, or processing status if still in progress
          headers:
            X-Balance-Remaining:
              description: Remaining x402 credit balance in USD after this request (only
                present for x402 auth).
              required: false
              schema:
                type: string
                example: "4.230000"
          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
                required:
                  - status
                  - average_execution_time
                  - execution_duration
            video/mp4:
              schema:
                format: binary
                type: string
        "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"
        "402":
          description: >-
            Payment or balance required. Response varies by authentication
            state:


            **API Key users:** Standard error response with
            `INSUFFICIENT_BALANCE` code. Top up your Venice balance at
            venice.ai.


            **Unauthenticated x402 discovery:** Structured x402 response with
            `x402Version`, `resource`, `accepts`, and
            `extensions["sign-in-with-x"]`. The `accepts` array advertises Base
            and Solana payment requirements.


            **Authenticated x402 wallet users with insufficient credit:**
            Structured response with `PAYMENT_REQUIRED` code containing:

            - `topUpInstructions`: Step-by-step guide to top up via x402
            protocol

            - `supportedTokens` / `supportedChains`: Accepted payment methods

            - `siwxChallenge`: Fresh Sign-In-With-X challenge metadata


            The `PAYMENT-REQUIRED` header also contains a base64-encoded x402
            protocol object with the payment requirements for programmatic
            discovery.
          headers:
            PAYMENT-REQUIRED:
              description: Base64-encoded JSON with x402 payment requirements. Present on x402
                middleware 402 responses. Decode to choose and sign one accepted
                payment requirement programmatically.
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/StandardError"
                  - $ref: "#/components/schemas/X402InferencePaymentRequired"
        "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"
        "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"
  /video/transcriptions:
    post:
      description: >-
        Transcribes video audio from a public URL.


        **Authentication:** This endpoint accepts either a Bearer API key or a
        `SIGN-IN-WITH-X` header for x402 wallet-based authentication. The legacy
        `X-Sign-In-With-X` header is also accepted during migration. When using
        x402, a `402 Payment Required` response indicates insufficient balance
        and includes top-up instructions.
      operationId: createVideoTranscription
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateVideoTranscriptionRequestSchema"
      security:
        - BearerAuth: []
        - siwx: []
      x-payment-info:
        price:
          mode: dynamic
          currency: USD
          min: "0.001"
          max: "10.00"
        protocols:
          - x402: {}
      summary: /api/v1/video/transcriptions
      tags:
        - Video
        - Transcriptions
      responses:
        "200":
          description: Video transcription completed successfully
          headers:
            X-Balance-Remaining:
              description: Remaining x402 credit balance in USD after this request (only
                present for x402 auth).
              required: false
              schema:
                type: string
                example: "4.230000"
          content:
            application/json:
              schema:
                type: object
                properties:
                  transcript:
                    type: string
                    description: The transcribed text from the video.
                  lang:
                    type: string
                    description: Detected language code for the transcript.
                    example: en
                required:
                  - transcript
                description: Video transcription response.
            text/plain:
              schema:
                type: string
                description: The transcribed text in plain text format
        "400":
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DetailedError"
        "401":
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "402":
          description: >-
            Payment or balance required. Response varies by authentication
            state:


            **API Key users:** Standard error response with
            `INSUFFICIENT_BALANCE` code. Top up your Venice balance at
            venice.ai.


            **Unauthenticated x402 discovery:** Structured x402 response with
            `x402Version`, `resource`, `accepts`, and
            `extensions["sign-in-with-x"]`. The `accepts` array advertises Base
            and Solana payment requirements.


            **Authenticated x402 wallet users with insufficient credit:**
            Structured response with `PAYMENT_REQUIRED` code containing:

            - `topUpInstructions`: Step-by-step guide to top up via x402
            protocol

            - `supportedTokens` / `supportedChains`: Accepted payment methods

            - `siwxChallenge`: Fresh Sign-In-With-X challenge metadata


            The `PAYMENT-REQUIRED` header also contains a base64-encoded x402
            protocol object with the payment requirements for programmatic
            discovery.
          headers:
            PAYMENT-REQUIRED:
              description: Base64-encoded JSON with x402 payment requirements. Present on x402
                middleware 402 responses. Decode to choose and sign one accepted
                payment requirement programmatically.
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/StandardError"
                  - $ref: "#/components/schemas/X402InferencePaymentRequired"
        "403":
          description: Unauthorized access
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "429":
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "500":
          description: Inference processing failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
  /augment/text-parser:
    post:
      description: >-
        Extracts text from a document file. Supports PDF, DOCX, PPTX, XLSX, and
        plain text formats. Upload a file via multipart/form-data.


        **Privacy:** Text parsing runs entirely in-memory on Venice's
        infrastructure with zero data retention. Documents are processed and
        immediately discarded — no content is stored or logged.


        **Authentication:** This endpoint accepts either a Bearer API key or a
        `SIGN-IN-WITH-X` header for x402 wallet-based authentication. The legacy
        `X-Sign-In-With-X` header is also accepted during migration. When using
        x402, a `402 Payment Required` response indicates insufficient balance
        and includes top-up instructions.
      operationId: createTextParser
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
                  description: "The document file to parse. Supported formats: PDF, DOCX, PPTX,
                    XLSX, and plain text files. Maximum size: 25MB."
                response_format:
                  type: string
                  enum:
                    - json
                    - text
                  default: json
                  description: The format of the response output. "json" returns structured JSON
                    with text and token count, "text" returns only the extracted
                    text.
        required: true
      security:
        - BearerAuth: []
        - siwx: []
      x-payment-info:
        price:
          mode: dynamic
          currency: USD
          min: "0.001"
          max: "10.00"
        protocols:
          - x402: {}
      summary: /api/v1/augment/text-parser
      tags:
        - Augment
      responses:
        "200":
          description: Text extraction completed successfully
          headers:
            X-Balance-Remaining:
              description: Remaining x402 credit balance in USD after this request (only
                present for x402 auth).
              required: false
              schema:
                type: string
                example: "4.230000"
          content:
            application/json:
              schema:
                type: object
                properties:
                  text:
                    type: string
                    description: The extracted text content from the document.
                  tokens:
                    type: number
                    description: The token count of the extracted text.
                required:
                  - text
                  - tokens
                description: Text parser response containing extracted text and token count.
            text/plain:
              schema:
                type: string
                description: The extracted text content in plain text format
        "400":
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DetailedError"
        "401":
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "402":
          description: >-
            Payment or balance required. Response varies by authentication
            state:


            **API Key users:** Standard error response with
            `INSUFFICIENT_BALANCE` code. Top up your Venice balance at
            venice.ai.


            **Unauthenticated x402 discovery:** Structured x402 response with
            `x402Version`, `resource`, `accepts`, and
            `extensions["sign-in-with-x"]`. The `accepts` array advertises Base
            and Solana payment requirements.


            **Authenticated x402 wallet users with insufficient credit:**
            Structured response with `PAYMENT_REQUIRED` code containing:

            - `topUpInstructions`: Step-by-step guide to top up via x402
            protocol

            - `supportedTokens` / `supportedChains`: Accepted payment methods

            - `siwxChallenge`: Fresh Sign-In-With-X challenge metadata


            The `PAYMENT-REQUIRED` header also contains a base64-encoded x402
            protocol object with the payment requirements for programmatic
            discovery.
          headers:
            PAYMENT-REQUIRED:
              description: Base64-encoded JSON with x402 payment requirements. Present on x402
                middleware 402 responses. Decode to choose and sign one accepted
                payment requirement programmatically.
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/StandardError"
                  - $ref: "#/components/schemas/X402InferencePaymentRequired"
        "403":
          description: Unauthorized access
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "429":
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "500":
          description: Inference processing failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
  /audio/complete:
    post:
      description: >-
        Mark an audio generation request as complete and clean up the generated
        media from storage. Call this after you have successfully downloaded the
        audio if you did not set delete_media_on_completion in the retrieve
        request.


        **Authentication:** This endpoint accepts either a Bearer API key or a
        `SIGN-IN-WITH-X` header for x402 wallet-based authentication. The legacy
        `X-Sign-In-With-X` header is also accepted during migration. When using
        x402, a `402 Payment Required` response indicates insufficient balance
        and includes top-up instructions.
      operationId: completeAudio
      security:
        - BearerAuth: []
        - siwx: []
      x-payment-info:
        price:
          mode: dynamic
          currency: USD
          min: "0.001"
          max: "10.00"
        protocols:
          - x402: {}
      summary: /api/v1/audio/complete
      tags:
        - Audio
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CompleteAudioRequest"
      responses:
        "200":
          description: Media cleanup result. A success value of false indicates cleanup
            did not complete and can be retried later.
          headers:
            X-Balance-Remaining:
              description: Remaining x402 credit balance in USD after this request (only
                present for x402 auth).
              required: false
              schema:
                type: string
                example: "4.230000"
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indicates whether the audio cleanup was successful.
                    example: true
                required:
                  - success
        "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"
        "402":
          description: >-
            Payment or balance required. Response varies by authentication
            state:


            **API Key users:** Standard error response with
            `INSUFFICIENT_BALANCE` code. Top up your Venice balance at
            venice.ai.


            **Unauthenticated x402 discovery:** Structured x402 response with
            `x402Version`, `resource`, `accepts`, and
            `extensions["sign-in-with-x"]`. The `accepts` array advertises Base
            and Solana payment requirements.


            **Authenticated x402 wallet users with insufficient credit:**
            Structured response with `PAYMENT_REQUIRED` code containing:

            - `topUpInstructions`: Step-by-step guide to top up via x402
            protocol

            - `supportedTokens` / `supportedChains`: Accepted payment methods

            - `siwxChallenge`: Fresh Sign-In-With-X challenge metadata


            The `PAYMENT-REQUIRED` header also contains a base64-encoded x402
            protocol object with the payment requirements for programmatic
            discovery.
          headers:
            PAYMENT-REQUIRED:
              description: Base64-encoded JSON with x402 payment requirements. Present on x402
                middleware 402 responses. Decode to choose and sign one accepted
                payment requirement programmatically.
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/StandardError"
                  - $ref: "#/components/schemas/X402InferencePaymentRequired"
        "500":
          description: Inference processing failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
  /audio/queue:
    post:
      description: >-
        Queue a new audio generation request.


        **Authentication:** This endpoint accepts either a Bearer API key or a
        `SIGN-IN-WITH-X` header for x402 wallet-based authentication. The legacy
        `X-Sign-In-With-X` header is also accepted during migration. When using
        x402, a `402 Payment Required` response indicates insufficient balance
        and includes top-up instructions.
      operationId: queueAudio
      security:
        - BearerAuth: []
        - siwx: []
      x-payment-info:
        price:
          mode: dynamic
          currency: USD
          min: "0.001"
          max: "10.00"
        protocols:
          - x402: {}
      summary: /api/v1/audio/queue
      tags:
        - Audio
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/QueueAudioRequest"
      responses:
        "200":
          description: Audio generation request queued successfully
          headers:
            X-Balance-Remaining:
              description: Remaining x402 credit balance in USD after this request (only
                present for x402 auth).
              required: false
              schema:
                type: string
                example: "4.230000"
          content:
            application/json:
              schema:
                type: object
                properties:
                  model:
                    type: string
                    description: The ID of the model used for audio generation.
                    example: elevenlabs-music
                  queue_id:
                    type: string
                    description: The ID of the audio generation request. Use this to poll for status
                      and retrieve the result.
                    example: 123e4567-e89b-12d3-a456-426614174000
                  status:
                    type: string
                    enum:
                      - QUEUED
                    description: The status of the audio generation request.
                    example: QUEUED
                required:
                  - model
                  - queue_id
                  - status
                additionalProperties: false
        "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"
        "402":
          description: >-
            Payment or balance required. Response varies by authentication
            state:


            **API Key users:** Standard error response with
            `INSUFFICIENT_BALANCE` code. Top up your Venice balance at
            venice.ai.


            **Unauthenticated x402 discovery:** Structured x402 response with
            `x402Version`, `resource`, `accepts`, and
            `extensions["sign-in-with-x"]`. The `accepts` array advertises Base
            and Solana payment requirements.


            **Authenticated x402 wallet users with insufficient credit:**
            Structured response with `PAYMENT_REQUIRED` code containing:

            - `topUpInstructions`: Step-by-step guide to top up via x402
            protocol

            - `supportedTokens` / `supportedChains`: Accepted payment methods

            - `siwxChallenge`: Fresh Sign-In-With-X challenge metadata


            The `PAYMENT-REQUIRED` header also contains a base64-encoded x402
            protocol object with the payment requirements for programmatic
            discovery.
          headers:
            PAYMENT-REQUIRED:
              description: Base64-encoded JSON with x402 payment requirements. Present on x402
                middleware 402 responses. Decode to choose and sign one accepted
                payment requirement programmatically.
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/StandardError"
                  - $ref: "#/components/schemas/X402InferencePaymentRequired"
        "422":
          description: Your prompt violates the content policy of Venice.ai or the model
            provider
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ContentViolationError"
        "429":
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "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"
  /audio/quote:
    post:
      description: Get a price quote for audio generation with the specified parameters.
      operationId: quoteAudio
      summary: /api/v1/audio/quote
      tags:
        - Audio
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/QuoteAudioRequest"
      responses:
        "200":
          description: Price quote for audio generation
          content:
            application/json:
              schema:
                type: object
                properties:
                  quote:
                    type: number
                    description: The estimated price in USD for the audio generation.
                    example: 0.75
                required:
                  - quote
        "400":
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DetailedError"
        "500":
          description: Inference processing failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
  /audio/retrieve:
    post:
      description: >-
        Retrieve the status or result of an audio generation request. If the
        audio is still being generated, returns processing status with estimated
        time. If complete, returns the audio data.


        **Authentication:** This endpoint accepts either a Bearer API key or a
        `SIGN-IN-WITH-X` header for x402 wallet-based authentication. The legacy
        `X-Sign-In-With-X` header is also accepted during migration. When using
        x402, a `402 Payment Required` response indicates insufficient balance
        and includes top-up instructions.
      operationId: retrieveAudio
      security:
        - BearerAuth: []
        - siwx: []
      x-payment-info:
        price:
          mode: dynamic
          currency: USD
          min: "0.001"
          max: "10.00"
        protocols:
          - x402: {}
      summary: /api/v1/audio/retrieve
      tags:
        - Audio
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RetrieveAudioRequest"
      responses:
        "200":
          description: Audio generation status or completed audio
          headers:
            X-Balance-Remaining:
              description: Remaining x402 credit balance in USD after this request (only
                present for x402 auth).
              required: false
              schema:
                type: string
                example: "4.230000"
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - PROCESSING
                    description: The status of the audio generation request.
                    example: PROCESSING
                  average_execution_time:
                    type: number
                    description: The estimated execution time of the audio generation request in
                      milliseconds (P80).
                    example: 20000
                  execution_duration:
                    type: number
                    description: The current duration of the audio generation request in
                      milliseconds.
                    example: 5200
                required:
                  - status
                  - average_execution_time
                  - execution_duration
            audio/mpeg:
              schema:
                type: string
                format: binary
            audio/wav:
              schema:
                type: string
                format: binary
            audio/flac:
              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"
        "402":
          description: >-
            Payment or balance required. Response varies by authentication
            state:


            **API Key users:** Standard error response with
            `INSUFFICIENT_BALANCE` code. Top up your Venice balance at
            venice.ai.


            **Unauthenticated x402 discovery:** Structured x402 response with
            `x402Version`, `resource`, `accepts`, and
            `extensions["sign-in-with-x"]`. The `accepts` array advertises Base
            and Solana payment requirements.


            **Authenticated x402 wallet users with insufficient credit:**
            Structured response with `PAYMENT_REQUIRED` code containing:

            - `topUpInstructions`: Step-by-step guide to top up via x402
            protocol

            - `supportedTokens` / `supportedChains`: Accepted payment methods

            - `siwxChallenge`: Fresh Sign-In-With-X challenge metadata


            The `PAYMENT-REQUIRED` header also contains a base64-encoded x402
            protocol object with the payment requirements for programmatic
            discovery.
          headers:
            PAYMENT-REQUIRED:
              description: Base64-encoded JSON with x402 payment requirements. Present on x402
                middleware 402 responses. Decode to choose and sign one accepted
                payment requirement programmatically.
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/StandardError"
                  - $ref: "#/components/schemas/X402InferencePaymentRequired"
        "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: Your prompt violates the content policy of Venice.ai or the model
            provider
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ContentViolationError"
        "429":
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "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"
  /billing/balance:
    get:
      description: Get current balance information for the authenticated user. Returns
        remaining DIEM/USD balances and total DIEM epoch allocation for
        calculating usage percentage.
      operationId: getBillingBalance
      summary: /api/v1/billing/balance
      tags:
        - Billing
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  canConsume:
                    type: boolean
                    description: Whether the user has sufficient balance to make API requests
                    example: true
                  consumptionCurrency:
                    type: string
                    nullable: true
                    enum:
                      - USD
                      - VCU
                      - DIEM
                      - BUNDLED_CREDITS
                    description: The currency that will be used for consumption (DIEM or USD)
                    example: DIEM
                  balances:
                    type: object
                    properties:
                      diem:
                        type: number
                        nullable: true
                        description: Remaining DIEM balance for current epoch. Null if not staking.
                        example: 90.5
                      usd:
                        type: number
                        nullable: true
                        description: Remaining USD balance. Null if not available.
                        example: 25
                    required:
                      - diem
                      - usd
                  diemEpochAllocation:
                    type: number
                    description: Total DIEM allocation for the current epoch (from staking). Use
                      with balances.diem to calculate usage percentage.
                    example: 100
                required:
                  - canConsume
                  - consumptionCurrency
                  - balances
                  - diemEpochAllocation
                additionalProperties: false
                description: Current balance information for the authenticated user
                example:
                  canConsume: true
                  consumptionCurrency: DIEM
                  balances:
                    diem: 90.5
                    usd: 25
                  diemEpochAllocation: 100
        "401":
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "500":
          description: Inference processing failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
  /billing/usage:
    get:
      deprecated: true
      description: "SUNSET as of 2026-09-16: this endpoint no longer returns usage
        data and answers every request with a 410. Use [GET
        /api/v1/billing/usage-history](https://docs.venice.ai/api-reference/end\
        point/billing/usage-history) instead, which returns the same ledger
        entries with cursor pagination: replace `page` and `limit` with
        `pageSize` plus the `nextCursor` from each response, and `startDate` and
        `endDate` with `startTimestamp` and `endTimestamp`."
      operationId: getBillingUsage
      security: []
      summary: /api/v1/billing/usage
      tags:
        - Billing
      responses:
        "410":
          description: Sunset on 2026-09-16. The error message names GET
            /api/v1/billing/usage-history and the parameters to rename.
          headers:
            Deprecation:
              schema:
                description: RFC 9745 date at which the endpoint was deprecated
                example: "@1783555200"
                type: string
            Link:
              schema:
                description: Points to the replacement endpoint
                example: </api/v1/billing/usage-history>; rel="successor-version"
                type: string
            Sunset:
              schema:
                description: RFC 8594 date at which the endpoint stopped returning usage data
                example: Wed, 16 Sep 2026 00:00:00 GMT
                type: string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
  /billing/usage-analytics:
    get:
      description: >-
        **Beta**: This endpoint is currently in beta and may be unstable.
        Request/response schemas and behavior may change without notice.


        Get aggregated usage analytics for the authenticated user with
        breakdowns by date, model, and API key. This endpoint provides summary
        views of your API usage, ideal for dashboards and usage monitoring. Data
        is cached for 10 minutes.
      operationId: getBillingUsageAnalytics
      summary: /api/v1/billing/usage-analytics
      tags:
        - Billing
      parameters:
        - schema:
            type: string
            pattern: ^[1-9]\d*d$
            default: 7d
            description: 'Lookback period for usage data. Format: number followed by "d"
              (e.g., "7d", "30d"). Maximum: 90d'
            example: 7d
          required: false
          name: lookback
          in: query
        - schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
            description: Start date for filtering records (YYYY-MM-DD). If provided, endDate
              is also required.
            example: 2024-01-01
          required: false
          name: startDate
          in: query
        - schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
            description: End date for filtering records (YYYY-MM-DD). If provided, startDate
              is also required.
            example: 2024-01-31
          required: false
          name: endDate
          in: query
      responses:
        "200":
          description: Successful response with aggregated usage analytics
          content:
            application/json:
              schema:
                type: object
                properties:
                  lookback:
                    type: string
                    description: The lookback period used for the query. Either "Nd" format or
                      "startDate:endDate" format.
                    example: 7d
                  byDate:
                    type: array
                    items:
                      type: object
                      properties:
                        date:
                          type: string
                          description: Date in YYYY-MM-DD format
                          example: 2024-01-15
                        USD:
                          type: number
                          description: Total USD usage for this date
                        DIEM:
                          type: number
                          description: Total DIEM usage for this date
                      required:
                        - date
                        - USD
                        - DIEM
                    description: Daily usage totals for the requested period
                  byModel:
                    type: array
                    items:
                      type: object
                      properties:
                        modelName:
                          type: string
                          description: Display name of the model
                          example: GLM 5.1
                        unitType:
                          type: string
                          description: Type of units (tokens, images, chars, minutes, seconds)
                          example: tokens
                        modelType:
                          type: string
                          nullable: true
                          description: Type of model (LLM, IMAGE, TTS, ASR, VIDEO)
                          example: LLM
                        totalUsd:
                          type: number
                          description: Total USD usage for this model
                        totalDiem:
                          type: number
                          description: Total DIEM usage for this model
                        totalUnits:
                          type: number
                          description: Total units consumed for this model
                        breakdown:
                          type: array
                          items:
                            type: object
                            properties:
                              type:
                                type: string
                                description: Token type (e.g., "Input", "Output", "Cache Read", "Cache Write")
                              usd:
                                type: number
                                description: USD amount for this breakdown
                              diem:
                                type: number
                                description: DIEM amount for this breakdown
                              units:
                                type: number
                                description: Number of units for this breakdown
                            required:
                              - type
                              - usd
                              - diem
                              - units
                          description: Breakdown by token type (only present if multiple types)
                      required:
                        - modelName
                        - unitType
                        - modelType
                        - totalUsd
                        - totalDiem
                        - totalUnits
                    description: Usage breakdown by model, sorted by total spend (highest first)
                  byModelDaily:
                    type: array
                    items:
                      type: object
                      additionalProperties:
                        type: number
                    description: Daily chart data for top 8 models. Each entry has "date"
                      (timestamp) plus model names as keys.
                  topModels:
                    type: array
                    items:
                      type: string
                    description: Names of the top 8 models by usage (for chart legends)
                  byKey:
                    type: array
                    items:
                      type: object
                      properties:
                        apiKeyId:
                          type: string
                          nullable: true
                          description: API key ID, or null if usage was from web app
                        description:
                          type: string
                          description: API key description or "Web App"
                          example: My Production Key
                        totalUsd:
                          type: number
                          description: Total USD usage for this key
                        totalDiem:
                          type: number
                          description: Total DIEM usage for this key
                        totalUnits:
                          type: number
                          description: Total units consumed for this key
                      required:
                        - apiKeyId
                        - description
                        - totalUsd
                        - totalDiem
                        - totalUnits
                    description: Usage breakdown by API key, sorted by total spend (highest first)
                  byKeyDaily:
                    type: array
                    items:
                      type: object
                      additionalProperties:
                        type: number
                    description: Daily chart data for top 8 API keys. Each entry has "date"
                      (timestamp) plus key descriptions as keys.
                  topKeyNames:
                    type: array
                    items:
                      type: string
                    description: Descriptions of the top 8 API keys by usage (for chart legends)
                required:
                  - lookback
                  - byDate
                  - byModel
                  - byModelDaily
                  - topModels
                  - byKey
                  - byKeyDaily
                  - topKeyNames
                additionalProperties: false
                description: Aggregated usage analytics response with breakdowns by date, model,
                  and API key
                example:
                  lookback: 7d
                  byDate:
                    - date: 2024-01-15
                      USD: 0.5
                      DIEM: 10.25
                    - date: 2024-01-14
                      USD: 0.3
                      DIEM: 8.75
                  byModel:
                    - modelName: GLM 5.1
                      unitType: tokens
                      modelType: LLM
                      totalUsd: 0.4
                      totalDiem: 12.5
                      totalUnits: 50000
                      breakdown:
                        - type: Output
                          usd: 0.3
                          diem: 10
                          units: 35000
                        - type: Input
                          usd: 0.1
                          diem: 2.5
                          units: 15000
                  byModelDaily:
                    - date: 1705276800000
                      GLM 5.1: 5.5
                      Kimi K2.6: 3.2
                  topModels:
                    - GLM 5.1
                    - Kimi K2.6
                  byKey:
                    - apiKeyId: key_abc123
                      description: Production Key
                      totalUsd: 0.8
                      totalDiem: 15
                      totalUnits: 75000
                    - apiKeyId: null
                      description: Web App
                      totalUsd: 0
                      totalDiem: 4
                      totalUnits: 25000
                  byKeyDaily:
                    - date: 1705276800000
                      Production Key: 8.5
                      Web App: 2
                  topKeyNames:
                    - Production Key
                    - Web App
        "400":
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DetailedError"
        "401":
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "500":
          description: Inference processing failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "504":
          description: Query timed out - try reducing the lookback period
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: Error message indicating query timeout
                    type: string
                type: object
  /billing/usage-history:
    get:
      description: Get billing usage data for the authenticated user as a
        cursor-paginated walk in ascending timestamp order. The first request
        takes filter parameters; while more entries remain, each response
        carries a nextCursor token that fetches the next page. A continuation
        request sends the cursor and nothing else — the filters travel inside
        the cursor, and filter parameters sent alongside one are rejected. A
        rejected cursor (expired, tampered with, or issued to another user)
        yields a 400 response; restart the walk from the first page. Page
        contents are stable while new usage is recorded, and no result totals
        are reported. Include text/csv in the Accept header to receive the page
        as a CSV export instead of JSON.
      operationId: getBillingUsageHistory
      summary: /api/v1/billing/usage-history
      tags:
        - Billing
      parameters:
        - schema:
            type: string
            enum:
              - USD
              - DIEM
              - BUNDLED_CREDITS
            description: Filter by consumable currency
            example: USD
          required: false
          name: currency
          in: query
        - schema:
            type: string
            maxLength: 512
            pattern: ^[A-Za-z0-9_-]+$
            description: Opaque continuation token from a previous response's nextCursor.
              The cursor carries the filters of the walk it continues, so no
              filter parameters may be sent alongside it.
            example: AZq3fK9tXhIVDm2j4vN8cQwYt1sB6uEoLxRgPzKaJdHfM5nC7yW0K3w
          required: false
          name: cursor
          in: query
        - schema:
            type: string
            maxLength: 40
            format: date-time
            description: Exclusive upper bound on entry timestamps (ISO 8601 UTC, "Z"
              suffix). Must be later than startTimestamp; consecutive windows
              sharing a boundary walk the history without gaps or overlaps.
              Carried forward by the cursor.
            example: 2026-07-01T00:00:00Z
          required: false
          name: endTimestamp
          in: query
        - schema:
            type: integer
            minimum: 10
            maximum: 1000
            default: 1000
            description: Number of entries per page. Carried forward by the cursor.
            example: 1000
          required: false
          name: pageSize
          in: query
        - schema:
            type: string
            maxLength: 40
            format: date-time
            description: 'Inclusive lower bound on entry timestamps (ISO 8601 UTC, "Z"
              suffix). First page only: a continuation resumes from the cursor
              position instead.'
            example: 2026-06-01T00:00:00Z
          required: false
          name: startTimestamp
          in: query
      responses:
        "200":
          description: Successful response
          headers:
            Content-Disposition:
              schema:
                description: "CSV responses only: attachment whose filename is stamped with the
                  export time (UTC, compact ISO 8601), so each page of a paged
                  walk downloads under a unique name and filenames sort in walk
                  order"
                example: attachment; filename=billing-usage-history-20260708T091530123Z.csv
                pattern: ^attachment; filename=billing-usage-history-\d{8}T\d{9}Z\.csv$
                type: string
            x-next-cursor:
              schema:
                description: "CSV responses only: continuation token for the next page, sent as
                  the cursor query parameter. Absent when this is the last page.
                  JSON responses carry the token in the nextCursor body field
                  instead."
                example: AZq3fK9tXhIVDm2j4vN8cQwYt1sB6uEoLxRgPzKaJdHfM5nC7yW0K3w
                maxLength: 512
                minLength: 1
                pattern: ^[A-Za-z0-9_-]+$
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        amount:
                          type: number
                          description: The total amount charged for the billing usage entry
                        currency:
                          type: string
                          enum:
                            - USD
                            - DIEM
                            - BUNDLED_CREDITS
                          description: The currency charged for the billing usage entry
                          example: USD
                        inferenceDetails:
                          type: object
                          nullable: true
                          properties:
                            completionTokens:
                              type: integer
                              nullable: true
                              minimum: 0
                              description: Number of tokens used in the completion. null for non-LLM usage or
                                when the count was not recorded.
                            inferenceExecutionTime:
                              type: integer
                              nullable: true
                              minimum: 0
                              description: Time taken for inference execution in milliseconds. null when the
                                timing was not recorded.
                            promptTokens:
                              type: integer
                              nullable: true
                              minimum: 0
                              description: Number of tokens requested in the prompt. null for non-LLM usage or
                                when the count was not recorded.
                            requestId:
                              type: string
                              description: Unique identifier for the inference request
                          required:
                            - completionTokens
                            - inferenceExecutionTime
                            - promptTokens
                            - requestId
                          additionalProperties: false
                          description: Details about the related inference request, if applicable
                        notes:
                          type: string
                          description: Notes about the billing usage entry
                        pricePerUnitUsd:
                          type: number
                          description: The price per unit in USD
                        sku:
                          type: string
                          description: The product associated with the billing usage entry
                        timestamp:
                          type: string
                          maxLength: 40
                          format: date-time
                          description: The timestamp the billing usage entry was created (ISO 8601)
                          example: 2026-06-15T19:05:10.504Z
                        units:
                          type: number
                          description: The number of units consumed
                      required:
                        - amount
                        - currency
                        - inferenceDetails
                        - notes
                        - pricePerUnitUsd
                        - sku
                        - timestamp
                        - units
                      additionalProperties: false
                    maxItems: 1000
                    description: Usage entries in ascending timestamp order
                  nextCursor:
                    type: string
                    nullable: true
                    maxLength: 512
                    pattern: ^[A-Za-z0-9_-]+$
                    description: Continuation token for the next page, to be sent as the cursor
                      query parameter. null means this is the last page.
                required:
                  - data
                  - nextCursor
                additionalProperties: false
                description: The response schema for the billing usage history endpoint
                example:
                  data:
                    - amount: -0.1
                      currency: DIEM
                      inferenceDetails: null
                      notes: API Inference
                      pricePerUnitUsd: 0.1
                      sku: grok-imagine-image-image-unit
                      timestamp: 2026-06-14T19:52:45.087Z
                      units: 1
                    - amount: -0.06356
                      currency: DIEM
                      inferenceDetails:
                        completionTokens: 227
                        inferenceExecutionTime: 2964
                        promptTokens: 339
                        requestId: chatcmpl-4007fd29f42b7d3c4107f4345e8d174a
                      notes: API Inference
                      pricePerUnitUsd: 2.8
                      sku: zai-org-glm-5-1-llm-output-mtoken
                      timestamp: 2026-06-15T19:05:10.504Z
                      units: 0.000227
                  nextCursor: AZq3fK9tXhIVDm2j4vN8cQwYt1sB6uEoLxRgPzKaJdHfM5nC7yW0K3w
            text/csv:
              schema:
                description: CSV formatted billing usage history data
                type: string
        "400":
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DetailedError"
        "401":
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "500":
          description: An unknown error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
  /crypto/rpc/networks:
    get:
      description: >-
        Returns the alphabetically sorted list of network slugs supported by the
        Venice crypto RPC proxy.


        This endpoint is **public** — no authentication required. Use it to
        discover which `:network` values are valid for `POST
        /api/v1/crypto/rpc/{network}`.
      operationId: listCryptoRpcNetworks
      security:
        - {}
      summary: List supported crypto RPC networks
      tags:
        - Crypto RPC
      responses:
        "200":
          description: The list of supported network slugs.
          content:
            application/json:
              schema:
                type: object
                required:
                  - networks
                properties:
                  networks:
                    type: array
                    items:
                      type: string
                    description: Sorted Venice-side network slugs.
                    example:
                      - arbitrum-mainnet
                      - arbitrum-sepolia
                      - avalanche-fuji
                      - avalanche-mainnet
                      - base-mainnet
                      - base-sepolia
                      - bsc-mainnet
                      - bsc-testnet
                      - ethereum-holesky
                      - ethereum-mainnet
                      - ethereum-sepolia
                      - linea-mainnet
                      - linea-sepolia
                      - optimism-mainnet
                      - optimism-sepolia
                      - polygon-amoy
                      - polygon-mainnet
                      - robinhood-mainnet
                      - robinhood-testnet
                      - solana-devnet
                      - solana-mainnet
                      - starknet-mainnet
                      - starknet-sepolia
                      - zksync-mainnet
                      - zksync-sepolia
  /crypto/rpc/{network}:
    post:
      description: >-
        Proxy a JSON-RPC request to a supported blockchain node and bill per
        credit.


        ## Request shapes

        - **Single request**: a JSON-RPC 2.0 object (`{ "jsonrpc":"2.0",
        "method":"…", "params":[…], "id":1 }`).

        - **Batch**: an array of up to 100 JSON-RPC 2.0 objects. If any item
        references an unsupported method, the entire batch is rejected with 400
        and the offending methods are listed.


        ## Supported methods

        Methods are classified into three pricing tiers:

        - **Standard (1×)**: `eth_call`, `eth_getBalance`, `eth_blockNumber`,
        `eth_sendRawTransaction`, `eth_getLogs`, `net_version`,
        `web3_clientVersion`, ERC-4337 bundler methods (`eth_sendUserOperation`,
        etc.), chain-family extensions (`zks_*`, `linea_*`, `bor_*`,
        `starknet_*`), and Solana methods (`getAccountInfo`, `getBalance`,
        `getLatestBlockhash`, `sendTransaction`, etc.).

        - **Advanced (2×)**: `trace_*`, `debug_*`, `txpool_inspect`,
        `txpool_status`, `arbtrace_*`.

        - **Large (4×)**: `trace_replayBlockTransactions`,
        `trace_replayTransaction`, `txpool_content`, `arbtrace_replay*`, and
        Solana `getLargestAccounts`, `getSupply`.


        Stateful filter methods (`eth_newFilter`, `eth_getFilterChanges`,
        `eth_uninstallFilter`, etc.) are **not supported** — they break on a
        load-balanced HTTP proxy because filter state is pinned to a single
        upstream backend. Use `eth_getLogs` instead.


        WebSocket-only methods (EVM `eth_subscribe`/`eth_unsubscribe` and Solana
        `*Subscribe`/`*Unsubscribe`) return 400 because this proxy is HTTP-only.


        ## Pricing

        Credits consumed per call = `baseCredits[chain] × methodTier`.
        `baseCredits` is 20 for most EVM chains (Ethereum, Base, Optimism,
        Arbitrum, Polygon, Linea, Avalanche, BSC, Blast) and Starknet; 30 for
        zkSync Era and Solana. The USD price per credit is `~7e-7` — a single
        standard EVM call costs ≈ $0.000014 and a large trace-replay costs ≈
        $0.000056.


        Per-request errors at the JSON-RPC layer (HTTP 200 with an `error` field
        in a response item) are billed at 5 credits instead of the full method
        tier — a small concession for methods not supported on a given chain or
        bad-parameter responses.


        ## Rate limits

        Two caps apply per caller:

        - **Requests per minute**: 100 on the paid tier.

        - **Credits per rolling 24 hours**: 10,000,000 on the paid tier.

        When either cap is exceeded, the request returns 429 with a
        `customMessage` identifying which cap tripped. The per-minute cap also
        sets the `X-RateLimit-*` response headers.


        ## Idempotency

        Set the `Idempotency-Key` request header to any string matching
        `[A-Za-z0-9_-]{1,255}` to enable safe retries. The response is cached
        for 24 hours keyed on `(user, idempotency-key)`; replaying the same key
        with the same body returns the cached response with
        `Idempotent-Replayed: true`. Reusing the same key with a different body
        returns 400 to prevent silent corruption.


        **Authentication:** This endpoint accepts either a Bearer API key or a
        `SIGN-IN-WITH-X` header for x402 wallet-based authentication. The legacy
        `X-Sign-In-With-X` header is also accepted during migration. When using
        x402, a `402 Payment Required` response indicates insufficient balance
        and includes top-up instructions.
      operationId: cryptoRpcProxy
      parameters:
        - description: Venice-side network slug. Call `GET /api/v1/crypto/rpc/networks`
            for the current list.
          in: path
          name: network
          required: true
          schema:
            example: ethereum-mainnet
            type: string
        - description: "Optional idempotency key for safe retries. Pattern:
            `[A-Za-z0-9_-]{1,255}`. Retrying within 24 hours with the same key +
            same body replays the cached response with `Idempotent-Replayed:
            true`. Same key + different body returns 400."
          in: header
          name: Idempotency-Key
          required: false
          schema:
            type: string
            pattern: ^[A-Za-z0-9_-]{1,255}$
            example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
      security:
        - BearerAuth: []
        - siwx: []
      x-payment-info:
        price:
          mode: dynamic
          currency: USD
          min: "0.001"
          max: "10.00"
        protocols:
          - x402: {}
      summary: Proxy a JSON-RPC request to a supported blockchain
      tags:
        - Crypto RPC
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  required:
                    - method
                  properties:
                    jsonrpc:
                      type: string
                      enum:
                        - "2.0"
                      example: "2.0"
                    method:
                      type: string
                      description: JSON-RPC method name. See the "Supported methods" section of the
                        endpoint description for the classification into
                        1×/2×/4× pricing tiers.
                      example: eth_chainId
                    params:
                      type: array
                      items: {}
                      description: Method parameters. Shape depends on the method; see the upstream
                        chain documentation.
                      example: []
                    id:
                      description: Caller-supplied request ID echoed back in the response. Required
                        for batch request correlation.
                      oneOf:
                        - type: integer
                        - type: string
                      example: 1
                - type: array
                  maxItems: 100
                  items:
                    type: object
                    required:
                      - method
                    properties:
                      jsonrpc:
                        type: string
                        enum:
                          - "2.0"
                        example: "2.0"
                      method:
                        type: string
                        description: JSON-RPC method name. See the "Supported methods" section of the
                          endpoint description for the classification into
                          1×/2×/4× pricing tiers.
                        example: eth_chainId
                      params:
                        type: array
                        items: {}
                        description: Method parameters. Shape depends on the method; see the upstream
                          chain documentation.
                        example: []
                      id:
                        description: Caller-supplied request ID echoed back in the response. Required
                          for batch request correlation.
                        oneOf:
                          - type: integer
                          - type: string
                        example: 1
            examples:
              singleRequest:
                summary: Single JSON-RPC call
                value:
                  jsonrpc: "2.0"
                  method: eth_chainId
                  params: []
                  id: 1
              batchRequest:
                summary: Batch of 2 calls
                value:
                  - jsonrpc: "2.0"
                    method: eth_chainId
                    params: []
                    id: 1
                  - jsonrpc: "2.0"
                    method: eth_blockNumber
                    params: []
                    id: 2
      responses:
        "200":
          description: JSON-RPC response forwarded from the upstream node. `Content-Type`
            is forced to `application/json` regardless of upstream headers.
          headers:
            X-Balance-Remaining:
              description: Remaining x402 credit balance in USD after this request (only
                present for x402 auth).
              required: false
              schema:
                type: string
                example: "4.230000"
            X-Venice-RPC-Credits:
              description: Credits charged for this request. On batch requests this is the sum
                across items, with individual RPC-level errors billed at 5
                credits instead of the full method tier.
              schema:
                type: integer
                example: 20
            X-Venice-RPC-Cost-USD:
              description: Dollar cost charged to the caller for this request, to 8 decimal
                places. Equal to `X-Venice-RPC-Credits *
                CRYPTO_RPC_PRICE_PER_CREDIT_USD`.
              schema:
                type: string
                example: "0.00001400"
            X-Request-ID:
              description: 32-character correlation ID generated by Venice for this request.
                Include this in any support correspondence.
              schema:
                type: string
                example: aBCdEFghIjKlMnOpQrStUvWxYz012345
            Idempotent-Replayed:
              description: Present and set to `"true"` when the response is being served from
                the idempotency cache rather than freshly forwarded to the
                upstream.
              schema:
                type: string
                enum:
                  - "true"
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      jsonrpc:
                        type: string
                        example: "2.0"
                      id:
                        oneOf:
                          - type: integer
                          - type: string
                      result:
                        description: Method-dependent result. Present on success.
                      error:
                        type: object
                        description: JSON-RPC error object. Present on per-request failure (HTTP status
                          is still 200 in that case).
                        properties:
                          code:
                            type: integer
                            example: -32602
                          message:
                            type: string
                            example: invalid params
                          data: {}
                  - type: array
                    items:
                      type: object
                      properties:
                        jsonrpc:
                          type: string
                          example: "2.0"
                        id:
                          oneOf:
                            - type: integer
                            - type: string
                        result:
                          description: Method-dependent result. Present on success.
                        error:
                          type: object
                          description: JSON-RPC error object. Present on per-request failure (HTTP status
                            is still 200 in that case).
                          properties:
                            code:
                              type: integer
                              example: -32602
                            message:
                              type: string
                              example: invalid params
                            data: {}
              examples:
                singleSuccess:
                  summary: Single-call success
                  value:
                    jsonrpc: "2.0"
                    id: 1
                    result: "0x1"
                batchMixed:
                  summary: Batch with one RPC-level error
                  value:
                    - jsonrpc: "2.0"
                      id: 1
                      result: "0x1"
                    - jsonrpc: "2.0"
                      id: 2
                      error:
                        code: -32602
                        message: invalid params
        "400":
          description: "Invalid request. Examples: unsupported network, empty body, batch
            > 100, WebSocket-only method, unmapped method, cross-family
            EVM-on-Starknet call, or `Idempotency-Key` reuse with a different
            body."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DetailedError"
        "401":
          description: Missing or invalid API key or x402 wallet signature. The
            `/crypto/rpc/networks` listing is public, but this proxy endpoint
            requires authentication.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "402":
          description: Insufficient balance. For API key users, top up at venice.ai. For
            x402 wallet users, the response includes structured top-up
            instructions and payment requirements per the x402 v2 spec.
          headers:
            PAYMENT-REQUIRED:
              description: Base64-encoded JSON with x402 payment requirements. Present on x402
                middleware 402 responses. Decode to choose and sign one accepted
                payment requirement programmatically.
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/StandardError"
                  - $ref: "#/components/schemas/X402InferencePaymentRequired"
        "429":
          description: Rate limit tripped. Either the per-minute request cap, the per-day
            credit cap, or a concurrent-call collision on the per-user mutex.
            The `customMessage` identifies which.
          headers:
            X-RateLimit-Limit:
              description: "Per-minute request cap for the caller's tier (paid: 100). Set only
                when the rate limit is tripped."
              schema:
                type: integer
                example: 100
            X-RateLimit-Remaining:
              description: Requests remaining in the current 60-second window. Set only on
                rate-limit responses.
              schema:
                type: integer
                example: 0
            X-RateLimit-Reset:
              description: Unix timestamp (seconds) when the current rate-limit window resets.
              schema:
                type: integer
                example: 1704067260
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "500":
          description: Either the upstream fetch failed (network error / timeout) or the
            service is misconfigured.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
  /x402/balance/{walletAddress}:
    get:
      description: Get the x402 credit balance for a wallet address. Requires
        Sign-in-with-x authentication for the same EVM or Solana wallet.
      operationId: getX402Balance
      parameters:
        - description: base64-encoded JSON SIWX payload proving EVM or Solana wallet
            ownership. The legacy `X-Sign-In-With-X` header is also accepted
            during migration.
          in: header
          name: SIGN-IN-WITH-X
          required: true
          schema:
            example: siwx_example_token
            type: string
        - schema:
            type: string
            pattern: ^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$
            description: EVM or Solana wallet address.
            example: 0xYOUR_WALLET_ADDRESS
          required: true
          name: walletAddress
          in: path
      security:
        - siwx: []
      summary: /api/v1/x402/balance/{walletAddress}
      tags:
        - x402
      responses:
        "200":
          description: Current x402 balance for the wallet.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    properties:
                      walletAddress:
                        type: string
                        description: Normalized wallet address.
                        example: 0xyour_wallet_address
                      balanceUsd:
                        type: number
                        description: Current x402 credit balance in USD.
                        example: 12.5
                      canConsume:
                        type: boolean
                        description: Whether the wallet can currently consume paid x402-backed
                          endpoints.
                        example: true
                      minimumTopUpUsd:
                        type: number
                        description: Minimum allowed top-up amount in USD.
                        example: 5
                      suggestedTopUpUsd:
                        type: number
                        description: Suggested top-up amount in USD.
                        example: 10
                      diemBalanceUsd:
                        type: number
                        description: Optional DIEM balance available for a linked Venice user.
                        example: 5.25
                    required:
                      - walletAddress
                      - balanceUsd
                      - canConsume
                      - minimumTopUpUsd
                      - suggestedTopUpUsd
                    additionalProperties: false
                required:
                  - success
                  - data
                additionalProperties: false
        "400":
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DetailedError"
        "401":
          description: Missing or invalid Sign-in-with-x authentication.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "403":
          description: Authenticated wallet does not match the requested wallet.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "429":
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "500":
          description: An unknown error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
  /x402/top-up:
    post:
      description: >-
        Top up your Venice credit balance using a `PAYMENT-SIGNATURE` header
        (the legacy `X-402-Payment` and `X-PAYMENT` header names are also
        accepted). If the header is missing, the endpoint returns payment
        requirements.


        This is the primary x402 payment endpoint. It currently returns Base and
        Solana USDC payment options in the `accepts` array. All inference
        endpoints (chat, image, audio, video) consume from the credit balance
        you establish here.
      operationId: topUpX402Balance
      parameters:
        - description: Signed x402 v2 payment payload (base64-encoded `PaymentPayload`)
            used to top up the wallet balance on a supported rail such as Base
            or Solana. The canonical header is `PAYMENT-SIGNATURE`; the
            `X-402-Payment` and `X-PAYMENT` names are also accepted for
            backwards compatibility. If no payment header is present, the
            endpoint returns the 402 payment requirements.
          in: header
          name: PAYMENT-SIGNATURE
          required: false
          schema:
            example: eyJ4NDAyVmVyc2lvbiI6MiwicGF5bG9hZCI6Ii4uLiJ9
            type: string
      security: []
      x-payment-info:
        price:
          mode: dynamic
          currency: USD
          min: "5"
          max: "10000"
        protocols:
          - x402: {}
      summary: /api/v1/x402/top-up
      tags:
        - x402
      requestBody:
        description: No JSON body required. Payment is sent via the X-402-Payment
          header. Send an empty POST to discover payment requirements.
        required: false
        content:
          application/json:
            schema:
              type: object
              properties: {}
      responses:
        "200":
          description: Top-up completed successfully.
          headers:
            PAYMENT-RESPONSE:
              description: Base64-encoded x402 v2 settlement result (`{ success, network,
                payer, transaction }`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    properties:
                      walletAddress:
                        type: string
                        description: Wallet that received the credited balance.
                        example: 0xyour_wallet_address
                      amountCredited:
                        type: number
                        description: Amount credited to the wallet in USD.
                        example: 10
                      newBalance:
                        type: number
                        description: Updated wallet balance in USD after the top-up.
                        example: 22.5
                      paymentId:
                        type: string
                        description: Unique identifier for the x402 payment.
                        example: payment_01HZY8M4W4Y6QZ8B6Q4P0V3J2K
                    required:
                      - walletAddress
                      - amountCredited
                      - newBalance
                      - paymentId
                    additionalProperties: false
                required:
                  - success
                  - data
                additionalProperties: false
        "400":
          description: Invalid request parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine-readable x402 error code.
                    example: X402_INVALID_PAYMENT
                  message:
                    type: string
                    description: Human-readable description of the x402 failure.
                    example: Invalid payment header
                  details:
                    type: object
                    properties: {}
                    description: Optional structured details about the x402 error.
                    example:
                      reason: signature_mismatch
                required:
                  - error
                  - message
                additionalProperties: false
        "402":
          description: Payment information required before the top-up can be processed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  x402Version:
                    type: number
                    description: x402 protocol version.
                    example: 2
                  accepts:
                    type: array
                    items:
                      type: object
                      properties:
                        scheme:
                          type: string
                          enum:
                            - exact
                          description: x402 payment scheme.
                          example: exact
                        network:
                          type: string
                          description: Payment network in CAIP-2 form (e.g. `eip155:8453` for Base,
                            `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` for Solana
                            mainnet).
                          example: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
                        amount:
                          type: string
                          description: Minimum payment amount in base units (USDC has 6 decimals).
                          example: "5000000"
                        asset:
                          type: string
                          description: USDC token address or mint for the selected network.
                          example: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                        payTo:
                          type: string
                          description: Receiver wallet address.
                          example: 8qUL23aSj7mDWdoLMXGHFvnVCT9wd7jXcysiekroADEL
                        maxTimeoutSeconds:
                          type: number
                          description: Maximum time allowed for payment settlement, in seconds.
                          example: 300
                        extra:
                          type: object
                          properties: {}
                          description: Network-specific x402 metadata. Solana accepts include a feePayer.
                          example:
                            name: USD Coin
                            version: "2"
                            feePayer: BFK9TLC3edb13K6v4YyH3DwPb5DSUpkWvb7XnqCL9b4F
                      required:
                        - scheme
                        - network
                        - amount
                        - asset
                        - payTo
                        - maxTimeoutSeconds
                      additionalProperties: false
                    description: Array of accepted payment options.
                required:
                  - x402Version
                  - accepts
                additionalProperties: false
        "429":
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "500":
          description: An unknown error occurred
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine-readable x402 error code.
                    example: X402_INVALID_PAYMENT
                  message:
                    type: string
                    description: Human-readable description of the x402 failure.
                    example: Invalid payment header
                  details:
                    type: object
                    properties: {}
                    description: Optional structured details about the x402 error.
                    example:
                      reason: signature_mismatch
                required:
                  - error
                  - message
                additionalProperties: false
  /x402/transactions/{walletAddress}:
    get:
      description: Get paginated x402 transaction history for a wallet address.
        Requires Sign-in-with-x authentication for the same EVM or Solana
        wallet.
      operationId: getX402Transactions
      parameters:
        - description: base64-encoded JSON SIWX payload proving EVM or Solana wallet
            ownership. The legacy `X-Sign-In-With-X` header is also accepted
            during migration.
          in: header
          name: SIGN-IN-WITH-X
          required: true
          schema:
            example: siwx_example_token
            type: string
        - schema:
            type: string
            pattern: ^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$
            description: EVM or Solana wallet address.
            example: 0xYOUR_WALLET_ADDRESS
          required: true
          name: walletAddress
          in: path
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
            description: Maximum number of transactions to return.
            example: 50
          required: false
          name: limit
          in: query
        - schema:
            type: integer
            nullable: true
            minimum: 0
            default: 0
            description: Number of transactions to skip before returning results.
            example: 0
          required: false
          name: offset
          in: query
      security:
        - siwx: []
      summary: /api/v1/x402/transactions/{walletAddress}
      tags:
        - x402
      responses:
        "200":
          description: x402 transaction history for the wallet.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    properties:
                      walletAddress:
                        type: string
                        description: Normalized wallet address.
                        example: 0xyour_wallet_address
                      currentBalance:
                        type: number
                        description: Current wallet balance in USD.
                        example: 12.35
                      transactions:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: Ledger entry identifier.
                              example: ledger_01HZY8M4W4Y6QZ8B6Q4P0V3J2K
                            amount:
                              type: number
                              description: Signed USD amount for the transaction.
                              example: -0.15
                            balanceAfter:
                              type: number
                              description: Wallet balance in USD after the transaction was applied.
                              example: 12.35
                            type:
                              type: string
                              description: Transaction type such as TOP_UP, CHARGE, or REFUND.
                              example: TOP_UP
                            createdAt:
                              type: string
                              description: ISO timestamp when the transaction was created.
                              example: 2026-04-03T12:34:56.000Z
                            requestId:
                              type: string
                              nullable: true
                              description: Associated request identifier when the transaction came from usage.
                            modelId:
                              type: string
                              nullable: true
                              description: Associated model identifier when the transaction came from usage.
                          required:
                            - id
                            - amount
                            - balanceAfter
                            - type
                            - createdAt
                            - requestId
                            - modelId
                          additionalProperties: false
                      pagination:
                        type: object
                        properties:
                          limit:
                            type: number
                            description: Maximum number of transactions returned.
                            example: 50
                          offset:
                            type: number
                            description: Number of transactions skipped.
                            example: 0
                          hasMore:
                            type: boolean
                            description: Whether more results are available after this page.
                            example: false
                        required:
                          - limit
                          - offset
                          - hasMore
                        additionalProperties: false
                    required:
                      - walletAddress
                      - currentBalance
                      - transactions
                      - pagination
                    additionalProperties: false
                required:
                  - success
                  - data
                additionalProperties: false
        "400":
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DetailedError"
        "401":
          description: Missing or invalid Sign-in-with-x authentication.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "403":
          description: Authenticated wallet does not match the requested wallet.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "429":
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "500":
          description: An unknown error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
  /augment/scrape:
    post:
      description: >-
        Scrape a web page and return its content as markdown. Supports most
        public web pages; some sites (e.g. X/Twitter, Reddit) that block
        automated access are rejected immediately.


        **Authentication:** This endpoint accepts either a Bearer API key or a
        `SIGN-IN-WITH-X` header for x402 wallet-based authentication. The legacy
        `X-Sign-In-With-X` header is also accepted during migration. When using
        x402, a `402 Payment Required` response indicates insufficient balance
        and includes top-up instructions.
      operationId: webScrape
      security:
        - BearerAuth: []
        - siwx: []
      x-payment-info:
        price:
          mode: dynamic
          currency: USD
          min: "0.001"
          max: "10.00"
        protocols:
          - x402: {}
      summary: /api/v1/augment/scrape
      tags:
        - Augment
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebScrapeRequest"
      responses:
        "200":
          description: Successfully scraped the URL
          headers:
            X-Balance-Remaining:
              description: Remaining x402 credit balance in USD after this request (only
                present for x402 auth).
              required: false
              schema:
                type: string
                example: "4.230000"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WebScrapeResponse"
        "400":
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DetailedError"
        "401":
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "402":
          description: >-
            Payment or balance required. Response varies by authentication
            state:


            **API Key users:** Standard error response with
            `INSUFFICIENT_BALANCE` code. Top up your Venice balance at
            venice.ai.


            **Unauthenticated x402 discovery:** Structured x402 response with
            `x402Version`, `resource`, `accepts`, and
            `extensions["sign-in-with-x"]`. The `accepts` array advertises Base
            and Solana payment requirements.


            **Authenticated x402 wallet users with insufficient credit:**
            Structured response with `PAYMENT_REQUIRED` code containing:

            - `topUpInstructions`: Step-by-step guide to top up via x402
            protocol

            - `supportedTokens` / `supportedChains`: Accepted payment methods

            - `siwxChallenge`: Fresh Sign-In-With-X challenge metadata


            The `PAYMENT-REQUIRED` header also contains a base64-encoded x402
            protocol object with the payment requirements for programmatic
            discovery.
          headers:
            PAYMENT-REQUIRED:
              description: Base64-encoded JSON with x402 payment requirements. Present on x402
                middleware 402 responses. Decode to choose and sign one accepted
                payment requirement programmatically.
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/StandardError"
                  - $ref: "#/components/schemas/X402InferencePaymentRequired"
        "403":
          description: Unauthorized access
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "429":
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "500":
          description: An unknown error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
  /augment/search:
    post:
      description: >-
        Search the web and return results directly. Returns structured search
        results including titles, URLs, content snippets, and dates.


        **Search providers:**

        - `brave` (default) — Brave Search with Zero Data Retention (ZDR).
        Search queries are never stored or logged by the search provider.

        - `google` — Google Search with anonymized queries. Searches are proxied
        through Venice's infrastructure so that your identity is not associated
        with the search request sent to Google. Venice does not store or log
        search queries.


        **Authentication:** This endpoint accepts either a Bearer API key or a
        `SIGN-IN-WITH-X` header for x402 wallet-based authentication. The legacy
        `X-Sign-In-With-X` header is also accepted during migration. When using
        x402, a `402 Payment Required` response indicates insufficient balance
        and includes top-up instructions.
      operationId: webSearch
      security:
        - BearerAuth: []
        - siwx: []
      x-payment-info:
        price:
          mode: dynamic
          currency: USD
          min: "0.001"
          max: "10.00"
        protocols:
          - x402: {}
      summary: /api/v1/augment/search
      tags:
        - Augment
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebSearchRequest"
      responses:
        "200":
          description: Successfully executed search
          headers:
            X-Balance-Remaining:
              description: Remaining x402 credit balance in USD after this request (only
                present for x402 auth).
              required: false
              schema:
                type: string
                example: "4.230000"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WebSearchResponse"
        "400":
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DetailedError"
        "401":
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "402":
          description: >-
            Payment or balance required. Response varies by authentication
            state:


            **API Key users:** Standard error response with
            `INSUFFICIENT_BALANCE` code. Top up your Venice balance at
            venice.ai.


            **Unauthenticated x402 discovery:** Structured x402 response with
            `x402Version`, `resource`, `accepts`, and
            `extensions["sign-in-with-x"]`. The `accepts` array advertises Base
            and Solana payment requirements.


            **Authenticated x402 wallet users with insufficient credit:**
            Structured response with `PAYMENT_REQUIRED` code containing:

            - `topUpInstructions`: Step-by-step guide to top up via x402
            protocol

            - `supportedTokens` / `supportedChains`: Accepted payment methods

            - `siwxChallenge`: Fresh Sign-In-With-X challenge metadata


            The `PAYMENT-REQUIRED` header also contains a base64-encoded x402
            protocol object with the payment requirements for programmatic
            discovery.
          headers:
            PAYMENT-REQUIRED:
              description: Base64-encoded JSON with x402 payment requirements. Present on x402
                middleware 402 responses. Decode to choose and sign one accepted
                payment requirement programmatically.
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/StandardError"
                  - $ref: "#/components/schemas/X402InferencePaymentRequired"
        "403":
          description: Unauthorized access
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "429":
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
        "500":
          description: An unknown error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StandardError"
