Skip to content
Sign in Create account

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

  • timestamp string path required

    ISO 8601 timestamp or Unix epoch seconds.

  • cursor integer query
    Range: at least 1
  • page_size integer query
    Default: 100. Range: 1 to 1000

Responses

200 Paginated JSON usage metadata; contains no prompt or completion content.

application/json object

  • count integer required
  • data array of object required

    Each item:

    • created_at string (date-time) required
    • id integer required
    • input_tokens integer required
    • markup_cents integer required
    • model string required
    • output_tokens integer required
    • provider_cost_cents integer required
    • request_id string required
    • total_cost_cents integer required
    • was_buffered boolean required
    • was_streamed boolean required
    • was_tokenized boolean required
  • has_more boolean required
  • next_cursor integer or null required
  • object string required
    Value: "list"
  • since string (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

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any 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

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

429 The 30-requests-per-minute route throttle was exceeded.

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

text/html string