LaufwerkLaufwerk

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

SurfaceContains
Studio run factsTokens, estimated API cost, elapsed and human waiting time
GET /api/runs/:runId/inspectionRun inspection, including the aggregate run.usage
GET /api/runs/:runId/usage{ usage: UsageSummary }, optionally scoped
timings RUN_ID --jsonPer-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.

FieldTypeMeaning
version1Summary format version
tokensUsageTokensKnown retained token counts
totalTokensOptional numberInput + output when known; not a sum of every breakdown field
estimatedCostUsdOptional decimal stringSum of applicable saved API-equivalent estimates
reportedCostUsdOptional decimal stringCost directly reported by captured provider observations, where available
usageStatusCoverage statusCompleteness of token reporting
pricingStatusCoverage statusCompleteness of applicable saved price estimates
scopesNumberCount of accounting scopes in the summary
unreportedScopesNumberScopes with incomplete usage
unpricedScopesNumberScopes without an applicable saved estimate
reasonsArray of stringsExplanation 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 parameterMeaning
invocationIdSelect an evidence invocation and its descendants
sessionKeySelect a session's retained accounting
turnKeySelect a turn within the query
eventCutoffNonnegative 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

On this page