Billing & usage
Telemetry
Every call through the gateway is metered. Read your usage and spend over the API with the same org key, or bring traces from your existing stack in as telemetry.
Usage rollups
GET /api/gateway/usage/daily returns a grouped rollup of requests, tokens, and spend. Pass org_id and group_by; an API key reads at scope=org (scope=self needs an end-user session). Spend is reported in spend_micro_usd (millionths of a US dollar).
curl "https://api-pr-668.preview.experientiallabs.ai/api/gateway/usage/daily?org_id=$ORG_ID&scope=org&group_by=day" \-H "Authorization: Bearer $EXPLABS_API_KEY"
| group_by | One row per |
|---|---|
| day | Calendar day (the row carries day). |
| model | Model slug (the row carries alias). |
| member | Org member or end user (the row carries user_id). |
Per-request events
GET /api/gateway/usage/events is the paginated per-request stream behind the rollup: one row per call, with its model, lane, tokens, and spend. Use it to attribute cost to a specific request or to export raw usage.
curl "https://api-pr-668.preview.experientiallabs.ai/api/gateway/usage/events?org_id=$ORG_ID&limit=50" \-H "Authorization: Bearer $EXPLABS_API_KEY"
Bring your own traces
Beyond gateway metering, you can land traces from your existing observability stack as telemetry. This never builds a router or spends credits; it just stores the traces under your organization.
Live pull from a provider
POST /api/orgs/<org_id>/telemetry/traces/pull pulls from a provider you name in transport_kind (one of braintrust, langsmith, langfuse, posthog, mastra, postgres). The credential is a single string, used once and never stored on the row: for Langfuse it is the public_key:secret_key pair; for the token-based providers it is the API key; for postgres it is the connection string.
curl -X POST "https://api-pr-668.preview.experientiallabs.ai/api/orgs/$ORG_ID/telemetry/traces/pull" \-H "Authorization: Bearer $EXPLABS_API_KEY" \-H "Content-Type: application/json" \-d '{"transport_kind": "langfuse","source_kind": "langfuse","source_label": "prod","credential": "pk-lf-...:sk-lf-..."}'
Upload a file
POST /api/orgs/<org_id>/telemetry/traces/upload takes a multipart file with a source_kind (one of otel-genai, otlp, langfuse, langsmith, phoenix, braintrust, mastra, posthog, chat-json) and a source_label. UTF-8 JSON or JSONL, up to 50MB. Arize and Phoenix have no live pull yet, so upload them with source_kind=phoenix (or otlp).
GET /api/orgs/<org_id>/telemetry/traceslists the org's landed traces with total_ingests and total_traces, the verify count.
See also
How each call is paid for and how to cap spend is in Credits & billing, and every usage endpoint is in the API reference.