Public Get Billing Spend By Tenant
Changed onSpend and usage by your own customers (TRA-1307).
Send your customer's organization id as the X-Tenant-Id header on each inference request, and its display name as X-Tenant-Name. This returns one row per X-Tenant-Id your requests carried between start and end. Rows are priced at the team's rates and sorted by tokens, most first. tenant_name is the name that tenant sent most recently. Requests sent without the header form one row with a null tenant_id, so the rows add up to what /v1/billing/spend reports for the same window and model. A dedicated GPU day is split across the tenants that ran on the GPU by their share of each 15-minute cell, so tenants that shared the GPU share its cost rather than each paying for it.
The window and model work as they do on /v1/billing/spend. A 503 means the gateway has not finished building per-tenant usage for the window yet. Its detail names the first day it can answer for.
Request
- Base URLhttps://api.trainloop.ai (the document declares no server; this is the origin it was published from)
- Authnone declared
Query parameters
The first UTC day of the window. The default is 30 days before end.
The first UTC day after the window. The default is tomorrow, which puts today inside the window.
One model slug, as the /v1/billing/spend models list names it. The default is every model.
Headers
Response
Successful Response
Changes
- info
endpoint added
- info