Note: Access to the Token Index API is gated per subscription. Your subscription may restrict the availabletoken,index_version, and queryable date range.
POST /api/token-index/index
Get daily LLM token index data for a requested token, index version, and date range. If no date range is provided, data for the server current date is used by default. Missing dates are returned as"-1".
Authorization
This endpoint requires a valid user token or application token. 🔒OAuth2: OAuth2PasswordBearerFlow type: password
Token URL: token
Request Body
The request body must be inapplication/json format.
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
token | string | YES | LLM token index type (case-insensitive). Currently supported: expenditure. | 1 to 60 characters |
index_version | string | NO | Token index version. Defaults to v1 (case-insensitive). | 1 to 60 characters |
starting_date | string or null | NO | The start date for the query in YYYY-MM-DD format. Defaults to the server current date. | On or after 2025-12-01, unless deployment config overrides it; not in the future |
ending_date | string or null | NO | The end date for the query in YYYY-MM-DD format. Defaults to the server current date. | Not in the future |
starting_date must be less than or equal to ending_date.
Request Example
Responses
-
200: Successful Response
Index values are returned as strings formatted to four decimal places.
index_nameis taken from the underlying data and may benullif no data exists for the range.
- 422: Validation Error
- 10008: Date range error
- 34004: Product permission is missing
GET /api/token-index/specs-list
Get the list of supported parameters for the Token Index API (supported tokens, index versions, and related metadata).Authorization
This endpoint requires a valid user token or application token. 🔒OAuth2: OAuth2PasswordBearerFlow type: password
Token URL: token
Query Parameters
This endpoint takes no query parameters.Request Example
Responses
-
200: Successful Response
The
datapayload is returned directly from the data store. The exact shape depends on the configured tokens and index versions.
GET /api/token-index/latest-date
Get the latest date for which a valid token index value has been generated.Authorization
This endpoint requires a valid user token or application token. 🔒OAuth2: OAuth2PasswordBearerFlow type: password
Token URL: token
Query Parameters
This endpoint takes no query parameters.Request Example
Responses
- 200: Successful Response
POST /api/token-index/dashboard
Get all token index data for the requested date range (used to power the dashboard view). If no date range is provided, data for the server current date is used by default. Your subscription may restrict the queryable date range.Authorization
This endpoint requires a valid user token or application token. 🔒OAuth2: OAuth2PasswordBearerFlow type: password
Token URL: token
Request Body
The request body must be inapplication/json format.
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
starting_date | string or null | NO | The start date for the query in YYYY-MM-DD format. Defaults to the server current date. | On or after 2025-12-01, unless deployment config overrides it; not in the future |
ending_date | string or null | NO | The end date for the query in YYYY-MM-DD format. Defaults to the server current date. | Not in the future |
starting_date must be less than or equal to ending_date.
Request Example
Responses
- 200: Successful Response The response includes the date range echoed back plus the aggregated token index payload.
- 10008: Parameter limit error