Console
Usage & billing
See exactly what you are consuming and what it costs, from the whole organization down to a single key.
Where to look
- Total usage — organization-wide spend and volume, with a daily time series and a breakdown by project and by user.
- Inference API → Usage — usage for the selected project and per individual key.
- Events — the request log: every call with its model, tokens (including cached input tokens) and status.
How cost is calculated
Every call to the inference API is metered. Cost is usage multiplied by the price of the model, and for text models it is made of three parts:
cost = ( (input_tokens - cached_input_tokens) × input price
+ cached_input_tokens × cached input price
+ output_tokens × output price ) / 1,000,000- Cached input tokens are the part of your prompt served from the prompt cache — typically a long system prompt or document you send again and again. They are a subset of
input_tokensand are billed at the model's cached input rate. When a model has no separate cached rate, they are billed at the normal input price. - Only successful calls (HTTP
2xx) are billed. Failed calls appear in the request log with their status but cost nothing. - Media is priced per image, per second of video or per minute of audio, depending on the model.
- Prices have an effective date. Usage is costed per UTC day with the price in effect on that day, so a price change never alters the cost of usage that already happened.
Time ranges
Aggregated usage (totals, per-model breakdowns and the daily series) is kept per UTC day. The from and to parameters of these endpoints are rounded to whole days: from down to 00:00 UTC, and to (exclusive) up to the next 00:00 UTC unless it already is midnight. The response echoes the rounded range. Without parameters you get the last 30 days. Today's numbers update continuously, typically within a minute.
Reading it programmatically
The same numbers are available from the API. Aggregate cost for an organization:
curl "https://api.upgreat.ai/v1/orgs/{orgId}/usage" \
-H "Authorization: Bearer <access-token>"A daily time series, ideal for charts and finance exports:
curl "https://api.upgreat.ai/v1/orgs/{orgId}/usage/daily" \
-H "Authorization: Bearer <access-token>"Drill into one project, or one key:
# Aggregated for a project
curl "https://api.upgreat.ai/v1/projects/{projectId}/usage" \
-H "Authorization: Bearer <access-token>"
# Line items for a project
curl "https://api.upgreat.ai/v1/projects/{projectId}/usage/events" \
-H "Authorization: Bearer <access-token>"
# Usage and cost for a single inference key
curl "https://api.upgreat.ai/v1/inference/keys/{keyId}/usage" \
-H "Authorization: Bearer <access-token>"Request log
GET /v1/projects/{projectId}/usage/events returns individual calls, newest first, with cursor pagination (limit up to 100, then pass next_cursor as cursor). Unlike the aggregates, from and to are exact timestamps here.
{
"request_id": "3f6b0c7e-8a1d-4c55-9b0e-2d7f1a9c4e21",
"ts": "2026-10-09T08:12:44.512Z",
"product": "inference",
"model": "qwen3.8-27b",
"region": "dc1",
"key_id": "8c0e5a52-1f4b-4c2e-a7a9-6d1c2b3e4f50",
"input_tokens": 5210,
"cached_input_tokens": 4864,
"output_tokens": 312,
"status": 200,
"media_kind": null,
"units": null,
"duration_seconds": null,
"duration_ms": 1840
}Fields to know
request_idmatches theX-Request-Idheader the inference API returned for that call.cached_input_tokens— prompt-cache hits, included ininput_tokens.nullfor media events.status— the HTTP status of the call. Only2xxcalls are billed.
The request log keeps calls for 13 months. Aggregated usage and cost are kept indefinitely. If the request log is temporarily unavailable the endpoint answers 503 with error code usage_log_unavailable; aggregated usage keeps working, so retry the log later.
Pricing per model
The models available to an organization (only those it has access to), with their pricing, come fromGET /v1/orgs/{orgId}/models, including cached_input_per_mtokens for text models (null means cached input is billed at the input price). Combine that with usage events to reconcile spend down to the request.Cost attribution
Because keys are scoped to projects, splitting workloads across projects and keys gives you usage that maps cleanly onto teams, environments or customers.