Usage

List Source Usage

Returns credits spent per source instance in the requested window, ranked by credits. Defaults to the current calendar month (UTC).

source_instance_id is the same id GET /api/v1/sources returns under that name — the source INSTANCE, not the source_id source-type slug. Pass it to GET /api/v1/sources/{source_instance_id}/data to see what the spend produced.

Source runs are reported here and excluded from List Workflow Usage, so the two never double-count.

Not paginated, and capped at 100 rows — but that cap is applied to workflow sheets and sources together before they are split, so an organization whose highest spenders are all sheets can see fewer than 100 sources here, or none at all. Narrow the window to bring sources into the top 100.

What the key can see. A key holding org:read (admin only) reports the whole organization. Any other key reports only the usage of the member who created it.

codeStatusMeaning
LEDGER_CUTOVER_SPAN400The window crosses the date this organization's usage history moved stores. Request the window on one side of cutover_at.

Requires the billing:read scope, which every role holds.

get/api/v1/usage/sources

Request

  • Base URL
    http://localhost:3009
  • Auth
    HTTP bearer

Query parameters

fromstring

Inclusive start of the window, ISO 8601. Defaults to the first day of the current UTC month.

tostring

Exclusive end of the window, ISO 8601. Defaults to now.

Response

Default Response

statusinteger required

Changes

No recorded changes to this operation across all 1 revision of this API.