Stream receipts since a given timestamp (tail)
GET /api/receipts/since/{timestamp}
Returns JSON usage-record metadata for the authenticated user at or after the path timestamp. The timestamp may be ISO 8601 or Unix seconds; page_size defaults to 100 and is capped at 1,000, with cursor for the next page. The response contains usage metadata, not prompt or completion content; invalid timestamps return 400.
Authenticate with a portal session token.
Parameters
timestampstring path requiredISO 8601 timestamp or Unix epoch seconds.
cursorinteger queryRange: at least 1page_sizeinteger queryDefault:100. Range: 1 to 1000
Responses
200 Paginated JSON usage metadata; contains no prompt or completion content.
application/json object
countinteger requireddataarray of object requiredEach item:
created_atstring (date-time) requiredidinteger requiredinput_tokensinteger requiredmarkup_centsinteger requiredmodelstring requiredoutput_tokensinteger requiredprovider_cost_centsinteger requiredrequest_idstring requiredtotal_cost_centsinteger requiredwas_bufferedboolean requiredwas_streamedboolean requiredwas_tokenizedboolean required
has_moreboolean requirednext_cursorinteger or null requiredobjectstring requiredValue:"list"sincestring (date-time) required
Generated sample
{
"count": 0,
"data": [
{
"created_at": "2026-01-01T00:00:00Z",
"id": 0,
"input_tokens": 0,
"markup_cents": 0,
"model": "string",
"output_tokens": 0,
"provider_cost_cents": 0,
"request_id": "string",
"total_cost_cents": 0,
"was_buffered": true,
"was_streamed": true,
"was_tokenized": true
}
],
"has_more": true,
"next_cursor": 0,
"object": "list",
"since": "2026-01-01T00:00:00Z"
}400 Timestamp could not be parsed.
application/json GenericError
erroranyOne of
- string
- object
Any keys are accepted.
error_codestringcodestringmessagestringdetailstringstatusanyOne of
- string
- integer
errorsobjectAny keys are accepted.
401 Missing or invalid bearer token.
application/json object
Any keys are accepted.
403 The caller does not meet the route requirements: accepted Terms of Service and Privacy Policy.
application/json object
Any keys are accepted.
422 Invalid cursor or page_size query value.
application/json GenericError
erroranyOne of
- string
- object
Any keys are accepted.
error_codestringcodestringmessagestringdetailstringstatusanyOne of
- string
- integer
errorsobjectAny keys are accepted.
429 The 30-requests-per-minute route throttle was exceeded.
application/json GenericError
erroranyOne of
- string
- object
Any keys are accepted.
error_codestringcodestringmessagestringdetailstringstatusanyOne of
- string
- integer
errorsobjectAny keys are accepted.
text/html string