Get session cost
Best-effort refresh the session durable-object export and return the latest persisted token totals and cost for a specific session. This can be used while a session is still running, without waiting for the scheduled export job. Laminar-runtime sessions return Laminar usage totals, including the usage of the session's subagents such as Verification agent runs, and messageCount is always 0 for them. Use GET /sessions/{session_id}/subagents/{subagent_id}/cost for a single subagent's usage. A Laminar-runtime session that was never bound to a Laminar session returns zero totals.
Best-effort refresh the session durable-object export and return the latest persisted token totals and cost for a specific session. This can be used while a session is still running, without waiting for the scheduled export job. Laminar-runtime sessions return Laminar usage totals, including the usage of the session's subagents such as Verification agent runs, and messageCount is always 0 for them. Use GET /sessions/{session_id}/subagents/{subagent_id}/cost for a single subagent's usage. A Laminar-runtime session that was never bound to a Laminar session returns zero totals.
bearerAuth sessions:readAuthorizationBearer <token>API key authentication. Use your API key as the bearer token.
Scope: sessions:read
session_id*stringThe unique identifier of the session
Latest session cost and token totals
application/json- response
data*curl -X GET 'https://app.inspect.com/api/v2/sessions/h2k9x4m7q1pd/cost'{ "data": { "session_id": "h2k9x4m7q1pd", "message_count": 0, "total_input_tokens": 1284530, "total_output_tokens": 38214, "total_reasoning_tokens": 12907, "total_cache_read_tokens": 1102345, "total_cache_write_tokens": 96410, "total_tokens": 1322744, "total_cost": 4.82, "updated_at": "2026-10-28T16:07:46.302Z" }}