Usage

View daily charges by service, meter, and key. Free. The base URL is https://www.motor.dev/meta, and the OpenAPI 3.1 specification describes each endpoint.

Try it

Sign in to try the API here with one of your team's keys. Requests use that key's permissions and spending limit. Standard charges apply.

Read your usage

GET /meta/usage reports your team's charges, grouped by day, service, meter, mode, key, and rate version. Use it to reconcile charges with your own records or break down a bill by key. Usage reports are free.

Select a UTC month with month, in the format YYYY-MM. You can read the current month and the 24 completed months before it. Usage updates as you use Motor. Once Motor creates an invoice for a month, that month's usage is final.

curl 'https://api.motor.dev/meta/usage?month=2026-10&service_id=feature_flags' \
  -H 'Authorization: Bearer <MOTOR_SECRET_KEY>'

Narrow the report with service_id, meter_id, mode, or key_id. Each page has up to limit rows (1 to 200, 50 by default), ordered by day. When next_cursor isn't null, use it as the cursor parameter to read the next page. Keep the month and filters the same.

Rows, units, and amounts

Each row has these fields:

{
  "day": "2026-10-05",
  "service_id": "feature_flags",
  "meter_id": "feature_flags.evaluations",
  "mode": "live",
  "key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
  "rate_version": null,
  "unit": "evaluation requests",
  "quantity": 412000,
  "unit_price_usd": "0.00003",
  "amount_usd": "12.36"
}

A service can have multiple meters. Each meter has separate rows, even when the prices are the same. For example, feature flag evaluation requests and metric events each cost $0.03 per 1,000, but appear in separate rows. Rows are also grouped by mode and rate_version, which identifies the published rates used to calculate the charge. rate_version is null for services without versioned rates.

quantity is the number of units used, measured in the row's unit. unit_price_usd and amount_usd are exact amounts in US dollars, returned as decimal strings with up to twelve decimal places. This preserves sub-cent amounts. Motor rounds each invoice line to the nearest cent, so the total in the usage report can differ from the invoice total by less than a cent per invoice line.

The report summarizes charges. Motor's automatic retries are included in the original charge. Submitting a new request incurs a separate charge.

Access and errors

Authenticate with a secret key. Publishable keys and client tokens can't read usage. Your secret key can read usage across all keys on your team, but only for services it has permission to use. A key with access to all services can read all of your team's usage.

Errors use the standard {"error": {"code": ..., "message": ...}} format. A missing or invalid key returns 401 unauthorized; a suspended team returns 403 account_suspended. service_id for a service the key cannot access returns 403 forbidden. key_id for an unknown key or a key outside your team returns 404 not_found. A missing or malformed month, a month outside the supported range, an invalid limit, or a cursor from a different month or set of filters returns 422 invalid_field.

Usage

GET/meta/usage

List usage

Lists your team's daily usage for a UTC month, ordered by day. Usage updates until Motor creates the month's invoice. Requires a secret key, which can read usage across all keys on your team for services it has permission to use. Invoice totals may differ from usage totals because each invoice line is rounded to the nearest cent.

ParameterLocationDescription
monthqueryThe month in UTC, YYYY-MM: the current month or one of the 24 completed months before it.
service_idqueryFilter by service, such as feature_flags. The key must be allowed to use it.
meter_idqueryFilter by meter, such as feature_flags.evaluations.
modequeryFilter by mode, such as live.
key_idqueryFilter by a key on your team, such as key_BWBeN28Vb7cMEx7Ym8AUzs.
limitqueryMaximum number of rows per page: 1 to 200. Defaults to 50.
cursorqueryThe next_cursor value returned by the previous page. Keep the month and filters the same.
Responses

200Success.

{
  "data": [
    {
      "day": "2026-10-05",
      "service_id": "feature_flags",
      "meter_id": "feature_flags.evaluations",
      "mode": "live",
      "key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
      "rate_version": null,
      "unit": "evaluation requests",
      "quantity": 412000,
      "unit_price_usd": "0.00003",
      "amount_usd": "12.36"
    },
    {
      "day": "2026-10-05",
      "service_id": "feature_flags",
      "meter_id": "feature_flags.metric_events",
      "mode": "live",
      "key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
      "rate_version": null,
      "unit": "metric events",
      "quantity": 5000,
      "unit_price_usd": "0.00003",
      "amount_usd": "0.15"
    }
  ],
  "next_cursor": null
}

401The key is missing, invalid or revoked, or it's a publishable key.

{
  "error": {
    "code": "unauthorized",
    "message": "Use a secret key to read usage. Publishable keys can't read it."
  }
}

403The team is suspended (account_suspended), or the key cannot access the service specified by service_id (forbidden).

{
  "error": {
    "code": "forbidden",
    "message": "This key can't use search_index, so it can't read its usage. Update the key's permissions on the API keys page."
  }
}

404key_id is unknown or belongs to another team.

{
  "error": {
    "code": "not_found",
    "message": "The key doesn't exist."
  }
}

422month is missing, or month, limit or cursor is invalid.

{
  "error": {
    "code": "invalid_field",
    "message": "`month` must be from 2024-10 to 2026-10: the current month and the 24 months before it."
  }
}