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

# 청구 사용 내역

> 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.



## OpenAPI

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


    **Authentication options:**

    - API Key: Use Bearer token in Authorization header

    - x402 Wallet: Use USDC credits via EVM or Solana wallet (no account
    required)


    **For x402 wallet access:**

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

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

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

    4. Call any inference endpoint with SIGN-IN-WITH-X header


    **Pricing:** Prepaid credits consumed per request. Check /models for
    available models and their capabilities.
servers:
  - url: https://api.venice.ai/api/v1
security:
  - BearerAuth: []
tags:
  - description: >-
      Generate speech/audio, transcribe audio, and manage asynchronous audio
      generation jobs.
    name: Audio
  - description: >-
      Given a list of messages comprising a conversation, the model will return
      a response. Supports multimodal inputs including text, images, audio
      (input_audio), and video (video_url) for compatible models.
    name: Chat
  - description: List and describe the various models available in the API.
    name: Models
  - description: Generate and manipulate images using AI models.
    name: Image
  - description: Generate videos using AI models.
    name: Video
  - description: List and retrieve character information for use in completions.
    name: Characters
  - description: >-
      Billing and usage analytics. **Beta**: This API is currently in beta and
      may be unstable. Endpoints, request/response schemas, and behavior may
      change without notice.
    name: Billing
  - description: Proxy JSON-RPC requests to blockchain nodes. Billed per credit.
    name: Crypto RPC
  - description: >-
      Wallet-based API access using the x402 protocol. No API key required —
      authenticate with an EVM or Solana wallet.


      **How it works:**

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

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

      3. **Use any endpoint** — All inference endpoints (chat, image, audio,
      video, embeddings) accept `siwx` as an alternative to `BearerAuth`.
      Charges are deducted from your USDC credit balance.

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


      **Quick start (5 lines):**

      ```

      import { VeniceClient } from '@venice-ai/x402-client'

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

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

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

      ```


      **Payment:** USDC on Base (chain ID 8453) or Solana mainnet. Minimum
      top-up: $5. Alternatively, stake DIEM tokens for daily credits (1 DIEM =
      $1/day).
    name: x402
externalDocs:
  description: Venice.ai API documentation
  url: https://docs.venice.ai
paths:
  /billing/usage-history:
    get:
      tags:
        - Billing
      summary: /api/v1/billing/usage-history
      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
      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:00.000Z'
          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:00.000Z'
          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'
components:
  schemas:
    DetailedError:
      type: object
      properties:
        details:
          type: object
          properties: {}
          description: Details about the incorrect input
          example:
            _errors: []
            field:
              _errors:
                - Field is required
        error:
          type: string
          description: A description of the error
      required:
        - error
    StandardError:
      type: object
      properties:
        error:
          type: string
          description: A description of the error
      required:
        - error
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````