GET
/
billing
/
usage
curl --request GET \
  --url https://api.venice.ai/api/v1/billing/usage \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "amount": -0.1,
      "currency": "VCU",
      "inferenceDetails": null,
      "notes": "API Inference",
      "pricePerUnitUsd": 0.01,
      "sku": "venice-sd35-image-unit",
      "timestamp": {},
      "units": 1
    },
    {
      "amount": -0.006356,
      "currency": "VCU",
      "inferenceDetails": {
        "completionTokens": 227,
        "inferenceExecutionTime": 2964,
        "promptTokens": 339,
        "requestId": "chatcmpl-4007fd29f42b7d3c4107f4345e8d174a"
      },
      "notes": "API Inference",
      "pricePerUnitUsd": 2.8,
      "sku": "llama-3.3-70b-llm-output-mtoken",
      "timestamp": {},
      "units": 0.000227
    }
  ],
  "pagination": {
    "limit": 1,
    "page": 200,
    "total": 56090,
    "totalPages": 56090
  }
}

Exports usage data for a user. Descriptions of response fields can be found below:

  • timestamp: The timestamp the billing usage entry was created
  • sku: The product associated with the billing usage entry
  • pricePerUnitUsd: The price per unit in USD
  • unit: The number of units consumed
  • amount: The total amount charged for the billing usage entry
  • currency: The currency charged for the billing usage entry
  • notes: Notes about the billing usage entry
  • inferenceDetails.requestId: The request ID associated with the inference
  • inferenceDetails.inferenceExecutionTime: Time taken for inference execution in milliseconds
  • inferenceDetails.promptTokens: Number of tokens requested in the prompt. Only present for LLM usage.
  • inferenceDetails.completionTokens: Number of tokens used in the completion. Only present for LLM usage.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Accept
string

Accept header to specify the response format

Example:

"application/json, text/csv"

Query Parameters

currency
enum<string>

Filter by currency

Available options:
USD,
VCU
Example:

"USD"

endDate
string

End date for filtering records (ISO 8601)

Example:

"2024-12-31T23:59:59.000Z"

limit
integer
default:200

Number of items per page

Required range: 0 < x <= 500
Example:

200

page
integer
default:1

Page number for pagination

Required range: x > 0
Example:

1

sortOrder
enum<string>
default:desc

Sort order for createdAt field

Available options:
asc,
desc
Example:

"desc"

startDate
string

Start date for filtering records (ISO 8601)

Example:

"2024-01-01T00:00:00.000Z"

Response

200
application/json

Successful response

The response schema for the billing usage endpoint