Get session subagent cost
Return the token totals and cost of a subagent of the session, including its own subagents. `sessionId` is the subagent ID and messageCount is always 0. Returns 404 when the subagent does not belong to the session.
Base URL
GET
Return the token totals and cost of a subagent of the session, including its own subagents. sessionId is the subagent ID and messageCount is always 0. Returns 404 when the subagent does not belong to the session.
bearerAuthheader
AuthorizationBearer <token>API key authentication. Use your API key as the bearer token.
session_id*stringThe unique identifier of the session
subagent_id*stringThe unique identifier of a subagent of the session
Latest session cost and token totals
application/json- response
data*curl -X GET 'https://your-org.inspect.com/api/public/v1/sessions/string/subagents/string/cost'Example Response
{ "data": { "sessionId": "string", "messageCount": 0, "totalInputTokens": 0, "totalOutputTokens": 0, "totalReasoningTokens": 0, "totalCacheReadTokens": 0, "totalCacheWriteTokens": 0, "totalTokens": 0, "totalCost": 0.1, "updatedAt": "2019-08-24T14:15:22Z" }}