signals

Get what each scout spent over a window

Return what every scout on this project spent on model calls over the last window_days, with how many runs it started, how many of those had spend attributed, and how many inbox reports it filed or added to. Cost per day, per run, and per report are derived from those numbers by the caller, so the endpoint stays a fact table and the definitions live in one place. Spend is summed from the $ai_generation events the runs' sandboxes produced and joined to the run rows by task run id, because a team-authored scout's generations all carry the same stage tag and so cannot name it. Cached per project for 15 minutes: the window's trailing edge moves and the newest runs may still be settling, so this is a roughly current number, not a live one. available is false where the internal AI observability project holding those events can't be read, so an unknown spend never reads as zero. Staff-only, same gate as the per-run cost read. Strictly team-scoped.

get/api/projects/{project_id}/signals/scout/runs/costs/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/signals/scout/runs/costs/
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer

Path parameters

project_idstring required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Query parameters

window_daysinteger

Window in days over runs' created_at (default 7). Only 7 is accepted today — it matches the window the roster's fleet headline spans, so every number on the page describes one span.

Response

Model spend and output per scout over the window.

window_daysinteger required

Window the rows describe, in days.

availableboolean required

False when this deployment has no internal AI observability project to read the generations from, so scouts is empty and every spend is unknown rather than zero.

Changes

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