Skip to main content
Query SDK estimated spend
Requires spend:read. Use groupBy to break down spend. The total covers all matching requests, and pagination applies to groups. See Query usage and reports for filters, units, and unknown costs.

Authorizations

Authorization
string
header
required

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

Query Parameters

from
string<date>
to
string<date>
environment
enum<string>
default:all
Available options:
all,
live,
test
provider
enum<string>
Available options:
openai,
anthropic
model
string
Required string length: 1 - 256
sdkKeyId
string<uuid>
endUserId
string<uuid>
providerKeyFingerprint
string
Pattern: ^[a-f0-9]{64}$
feature
string
Required string length: 1 - 64
groupBy
enum<string>
default:day
Available options:
day,
model,
key,
providerKey,
endUser,
feature,
provider
limit
integer
default:50
Required range: 1 <= x <= 100
offset
integer | null
default:0
Required range: 0 <= x <= 10000

Response

Estimated spend. A null total means some requests could not be priced.

data
object
required