Builder API

Analytics

Usage analytics and token consumption for your Chipp app

| View as Markdown
1 min read
# api # builder-api # rest # analytics # usage # tokens # metrics # dashboard

The analytics endpoints provide aggregate data about how your app is being used — session counts, message volume, consumer growth, and token consumption broken down by model.

Usage Analytics

plaintext
GET /api/v1/apps/{appId}/analytics/usage

Returns a summary of app usage along with a timeseries breakdown.

Query Parameters

ParameterTypeDefaultDescription
started_afterISO 8601none (all time)Start of the date range
started_beforeISO 8601none (all time)End of the date range
group_bystringdayTimeseries granularity: day, week, or month

Example

bash
curl "https://build.chipp.ai/api/v1/apps/YOUR_APP_ID/analytics/usage?started_after=2025-06-01T00:00:00Z&group_by=day" \
  -H "Authorization: Bearer chipp_YOUR_API_KEY"

Response

json
{
  "data": {
    "summary": {
      "total_sessions": 1247,
      "unique_consumers": 342,
      "total_messages": 8934
    },
    "timeseries": [
      {
        "period": "2025-06-01T00:00:00.000Z",
        "session_count": 45,
        "message_count": 312
      },
      {
        "period": "2025-06-02T00:00:00.000Z",
        "session_count": 52,
        "message_count": 387
      }
    ]
  }
}

Response Fields

Summary:

FieldTypeDescription
total_sessionsintegerTotal sessions in the date range
unique_consumersintegerDistinct consumers who started a session
total_messagesintegerTotal messages sent and received

Timeseries entries:

FieldTypeDescription
periodISO 8601Start of the time bucket
session_countintegerSessions in this period
message_countintegerMessages in this period

Weekly Grouping

bash
curl "https://build.chipp.ai/api/v1/apps/YOUR_APP_ID/analytics/usage?group_by=week&started_after=2025-01-01T00:00:00Z" \
  -H "Authorization: Bearer chipp_YOUR_API_KEY"

Token Usage

plaintext
GET /api/v1/apps/{appId}/analytics/token-usage

Returns token consumption totals, broken down by model. Useful for monitoring costs and understanding which models your app relies on.

Query Parameters

ParameterTypeDefaultDescription
started_afterISO 8601none (all time)Start of the date range
started_beforeISO 8601none (all time)End of the date range

Example

bash
curl "https://build.chipp.ai/api/v1/apps/YOUR_APP_ID/analytics/token-usage?started_after=2025-06-01T00:00:00Z" \
  -H "Authorization: Bearer chipp_YOUR_API_KEY"

Response

json
{
  "data": {
    "total": {
      "input_tokens": 2450000,
      "output_tokens": 1230000,
      "total_tokens": 3680000,
      "request_count": 4521
    },
    "by_model": [
      {
        "model": "gpt-4.1",
        "input_tokens": 1200000,
        "output_tokens": 600000,
        "total_tokens": 1800000,
        "request_count": 2100
      },
      {
        "model": "claude-sonnet-4-20250514",
        "input_tokens": 1250000,
        "output_tokens": 630000,
        "total_tokens": 1880000,
        "request_count": 2421
      }
    ]
  }
}

Response Fields

total object:

FieldTypeDescription
input_tokensintegerTotal prompt/input tokens consumed
output_tokensintegerTotal completion/output tokens consumed
total_tokensintegerSum of input and output tokens
request_countintegerTotal number of LLM requests

Per-model breakdown (by_model entries):

FieldTypeDescription
modelstringModel identifier
input_tokensintegerInput tokens for this model
output_tokensintegerOutput tokens for this model
total_tokensintegerTotal tokens for this model
request_countintegerNumber of LLM requests for this model