Skip to main content
GET
/api/v1/billing/usage
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,
DIEM,
BUNDLED_CREDITS
Example:

"USD"

endDate
string<date-time>

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<date-time>

Start date for filtering records (ISO 8601)

Example:

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

Response

Successful response

The response schema for the billing usage endpoint

data
object[]
required
pagination
object
required
warningMessage
string

A warning message to disambiguate DIEM usage from legacy DIEM (formerly VCU) usage