Session Data

Store session cost record

post/api/session-costs

Request body

sessionIdstring required
agentIdstring required
totalCostUsdnumber required
taskIdstring
inputTokensinteger
outputTokensinteger
cacheReadTokensinteger
cacheWriteTokensinteger nullable
cacheWrite5mTokensinteger nullable
cacheWrite1hTokensinteger nullable
reasoningOutputTokensinteger
thinkingTokensinteger
durationMsinteger
numTurnsinteger nullable
modelstring
isErrorboolean
provider'claude' | 'claude-managed' | 'codex' | 'pi' | 'opencode' | 'devin' | 'gemini' | 'acp'
createdAtinteger

Response

Cost record stored

successtrue required

Changes

Changed in 3 of the 104 revisions of this API.46

    • added the new acp enum value to the request property

      request-property-enum-value-added

    • added the media type application/json for the response with the status

      response-media-type-added

    • added the media type application/json for the response with the status

      response-media-type-added

    • the request property's min was set to 0.00

      request-property-min-set

    • the request property's min was set to 0.00

      request-property-min-set

    • the request property's min was set to 0.00

      request-property-min-set

    • the request property's min was set to 0.00

      request-property-min-set

    • added the new optional request property

      new-optional-request-property

    • added the new optional request property

      new-optional-request-property

    • added the new optional request property

      new-optional-request-property