List usage events

Retrieve a paginated list of usage events with optional filtering.

Use cursor-based pagination by passing the nextCursor from the previous response. You can filter events by customer, event type, or model.

Pagination:

  • Use the cursor parameter from the previous response's nextCursor field
  • The hasMore field indicates if there are more results
  • Maximum limit is 100 events per request
GET
/events
AuthorizationBearer <token>

Project API key

In: header

Query Parameters

customerId?string

Filter events by customer ID

eventType?string

Filter events by type (e.g., "model_call", "embedding")

model?string

Filter events by model name (e.g., "gpt-4", "claude-3")

limit?string

Maximum number of events to return (1-100, default: 50)

Default"50"
cursor?string

Pagination cursor from the previous response

Response Body

application/json

application/json

application/json

curl -X GET "https://api.limitry.com/v1/events"
{
  "data": [
    {
      "id": "evt_abc123",
      "customerId": "cust_123",
      "eventType": "model_call",
      "model": "gpt-4",
      "provider": "openai",
      "inputTokens": 150,
      "outputTokens": 50,
      "totalTokens": 200,
      "latencyMs": 1200,
      "costCents": 25,
      "properties": {
        "user_id": "user_456",
        "team_id": "team_eng"
      },
      "createdAt": "2024-01-15T10:30:00Z"
    }
  ],
  "nextCursor": "eyJpZCI6ImV2dF9hYmMxMjMifQ",
  "hasMore": true
}
{
  "error": "Invalid request"
}
{
  "error": "Invalid or missing API key"
}