Retrieve a run
Revenue, model cost and margin for one run, built from the events and costs that carry its run_id. Prepaid credits are valued at the cost basis of the grants they were drawn from. has_margin says whether the run has a margin: a confirmed charge and a traced cost. When it is false, margin and margin_percent are null, and the revenue and cost fields still show what is known.
Authentication
A secret key (rl_sk_test_..., rl_sk_live_...) or a restricted key with limited scopes (rl_rk_test_..., rl_rk_live_...). A restricted key can carry agent: true and an expires_at, and is what a coding agent should hold. Keys end in a checksum so secret scanners can recognize them. People create, roll and revoke keys in the dashboard; GET /v1/api_keys lists them, masked.
Path parameters
Response
true when the run has at least one confirmed charge and at least one traced cost (costs_count above zero). It is what the has_margin filter selects on.
Decimal minor units: revenue_confirmed minus cost. null when has_margin is false. It can be negative, a loss.
margin as a share of confirmed revenue. null when has_margin is false. The share is negative for a loss, and can be below -1.