---
title: "Public Get Billing Spend By Tenant"
method: GET
path: "/v1/billing/spend/tenants"
tags: ["public-api"]
---

# Public Get Billing Spend By Tenant

`GET /v1/billing/spend/tenants`

## Request

- Base URL: `https://api.trainloop.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.trainloop.ai/v1/billing/spend/tenants`
- Auth: none declared

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

## Query parameters

- `start` string, date, nullable: The first UTC day of the window. The default is 30 days before `end`.
- `end` string, date, nullable: The first UTC day after the window. The default is tomorrow, which puts today inside the window.
- `model` string, nullable: One model slug, as the /v1/billing/spend `models` list names it. The default is every model.

## Headers

- `authorization` string, nullable

## Response `200`

Successful Response

- BillingTenantSpendResponse: Priced usage over a window by the team's own customers, the `X-Tenant-Id` each request carried (TRA-1307). The same traffic and rates as BillingSpendResponse over the same window, so the tenants' `cost_usd` sums to its total. A dedicated GPU day is split across the tenants that ran on the GPU by their share of each 15-minute cell, so ten tenants that shared the GPU for an hour each carry a tenth of it. Served by GET /v1/billing/spend/tenants.
  - `start` string, required
  - `end` string, required
  - `tenants` BillingSpendTenant[], required
    - `tenant_id` string, nullable, required
    - `tenant_name` string, nullable, required
    - `request_count` integer, required
    - `priced_request_count` integer, required
    - `prompt_tokens` integer, required
    - `cached_prompt_tokens` integer, required
    - `completion_tokens` integer, required
    - `total_tokens` integer, required
    - `cost_usd` string, nullable, required
    - `pricing_status` 'priced' | 'unavailable', required

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-23** `2f4eac415ecb`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/trainloop/apis/trainloop-api/changes/v1/billing/spend/tenants/get.md)

---

[API](https://skmtc.dev/trainloop/apis/trainloop-api.md) - [All operations](https://skmtc.dev/trainloop/apis/trainloop-api/llms.txt) - [OpenAPI document](https://skmtc.dev/trainloop/apis/trainloop-api/revisions/f11e38cf6836?raw)
