Skip to main content
GET
Get usage data

Authorizations

X-Api-Key
string
header
required

Management token from the RouteMesh dashboard (Settings → Management Tokens). Required for customer API endpoints (/api-keys, /usage). Tokens are prefixed rmtm_ and scoped to your account. Authenticate by passing the token in the X-Api-Key header. Separate from RPC service keys (rm_), which authenticate dApp traffic to the routing layer.

Query Parameters

from
string<date-time>

Start time (RFC3339). Defaults to 30 days ago.

to
string<date-time>

End time (RFC3339). Defaults to now.

include
string

Comma-separated list of sections to include. Options: summary, balance, by_chain, by_api_key, by_api_key_chain, top_methods, time_series, by_scenario. Default: summary,balance.

Example:

"summary,balance,by_chain,by_api_key"

group_by
string

Group usage by a dimension. Options: chain, api_key, api_key,chain, method, day.

Example:

"chain"

granularity
enum<string>

Time bucket size. Options: day, hour. Default: day.

Available options:
day,
hour
chain_id
string

Filter by chain ID (e.g. 1, 137, 8453).

api_key_id
integer

Filter by API key numeric ID (found in list response).

limit
integer

Maximum number of rows returned (default and max depend on config).

Required range: x >= 1

Response

Usage data

customer_id
integer
required
period
object
required
summary
object

Aggregate credits and request count.

balance
object

Current credit balance.

by_chain
object[]

Per-chain breakdown.

by_api_key
object[]

Per-API-key breakdown.

by_api_key_chain
object[]

Per-API-key, per-chain breakdown.

top_methods
object[]

Top RPC methods by spend.

time_series
object[]

Time-bucketed usage data.

by_scenario
object[]

Usage by routing outcome scenario.

groups
object[]

Grouped results when group_by is specified.