Receipts: Get session receipt
metrecept_get_session_receiptRetrieves one signed, aggregated receipt for a session, covering every chat completion, web fetch and API call tagged with that session_id, plus totals, timestamps and a verify_url anyone can check in a browser.
Instructions
Get one signed, aggregated receipt for a session: every chat completion, web fetch and API call tagged with the same session_id, with event count, total billed USD, cache hits/misses, fetch and API counts, first/last timestamps, the compact JWS and a verify_url. Use it at the end of an agent run and put verify_url in the PR, ticket or email the run produced; anyone can verify it in a browser, no account needed. Not for a public savings snapshot: use metrecept_publish_savings_receipt. Not for tenant totals: use metrecept_get_usage. Read-only, makes no upstream call, not billed. An unknown id returns event_count 0, not an error. Requires a Metrecept API key (METRECEPT_API_KEY env on stdio, or Authorization: Bearer on remote HTTP); results are scoped to that key's tenant only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | The same session_id passed on the tagged chat, fetch and API calls. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |