Usage, cost and time
Read retained token usage, API-equivalent cost estimates and elapsed/waiting time in alpha.14.
Start with Studio, logs and usage for how to interpret these measurements. Accounting describes retained provider observations; missing coverage is unknown, not zero.
Where to read each measurement
| Surface | Contains |
|---|---|
| Studio run facts | Tokens, estimated API cost, elapsed and human waiting time |
GET /api/runs/:runId/inspection | Run inspection, including the aggregate run.usage |
GET /api/runs/:runId/usage | { usage: UsageSummary }, optionally scoped |
timings RUN_ID --json | Per-operation elapsed time, available setup/first-event timing and reported slice usage |
The timings command does not return the complete aggregate accounting model.
Use the usage endpoint or run inspection for pricing and coverage.
UsageSummary
The type is exported from @laufwerk/protocol.
| Field | Type | Meaning |
|---|---|---|
version | 1 | Summary format version |
tokens | UsageTokens | Known retained token counts |
totalTokens | Optional number | Input + output when known; not a sum of every breakdown field |
estimatedCostUsd | Optional decimal string | Sum of applicable saved API-equivalent estimates |
reportedCostUsd | Optional decimal string | Cost directly reported by captured provider observations, where available |
usageStatus | Coverage status | Completeness of token reporting |
pricingStatus | Coverage status | Completeness of applicable saved price estimates |
scopes | Number | Count of accounting scopes in the summary |
unreportedScopes | Number | Scopes with incomplete usage |
unpricedScopes | Number | Scopes without an applicable saved estimate |
reasons | Array of strings | Explanation of coverage limits |
Coverage status is "complete", "partial", "pending" or "unavailable".
Read the status alongside a numeric total: a partial dollar amount is not a full
run price. Pending means reporting may still arrive; unavailable means the
retained evidence cannot currently supply it. Runs predating durable accounting
are marked unavailable. A run with no agent accounting scopes can correctly show
zero model usage; that does not mean the host or other services cost nothing.
UsageTokens has optional numeric input, output, cacheRead, cacheWrite,
cacheWrite5m, cacheWrite1h and reasoning fields. Breakdown fields may overlap
with the main counts; do not add all fields to calculate a new total.
Usage endpoint filters
GET /api/runs/:runId/usage accepts:
| Query parameter | Meaning |
|---|---|
invocationId | Select an evidence invocation and its descendants |
sessionKey | Select a session's retained accounting |
turnKey | Select a turn within the query |
eventCutoff | Nonnegative safe integer event ID; read only observations at or before it |
Filters can be combined. Use identities returned in the run's records rather than guessing them. The endpoint requires management authentication, like other HTTP management routes.
How to interpret estimated API cost
Studio labels this Estimated API cost. The basis is standard API-equivalent model usage with saved rates. Pricing is looked up for the native OpenAI or Anthropic endpoint through OpenRouter's model endpoint metadata and retained with its source, retrieval time and estimate. This lookup does not route model inference through OpenRouter. Applicable cached rates can remain in use when a refresh fails.
The estimate excludes tools and infrastructure. It is not a provider invoice, an extra charge on top of a coding subscription, a universal money calculator, or a hard spend limit. Unsupported prices, incomplete reporting and uncertain rate applicability leave partial/unavailable coverage instead of a fabricated zero. Preserve external receipts when actual billed cost matters.
Elapsed and human waiting time
Studio's Elapsed / waiting display gives total wall-clock time and the portion spent awaiting human input. Waiting is included in elapsed. Other parallel work can continue while a human interaction is open, so elapsed minus waiting is not CPU time or a precise measure of agent computation.
Operation durations also overlap when work runs in parallel. Do not sum them to estimate total run duration. Use them to identify slow setup, turns or verification, and compare equivalent inputs and environments.
Related: Inspect and debug · Benchmark