API reference
Anonymous insights API
GET /v1/insights — statistics combined across many teams: model and tool health, waits for people, typical sessions.
The insights API gives statistics combined across many teams that chose to share them: how often each AI model and coding tool fails or hits rate limits, how long agents wait for people, and what a typical session looks like. Scope: insights:read. Team and Enterprise only; priced per call — see API pricing.
#Privacy rules
- Only workspaces whose owner switched on Share anonymous statistics (off by default) count.
- Every number comes from at least 20 workspaces, and no single workspace makes up more than half of it. Groups that don't pass are left out, not shown as zero.
- No workspace, project, person, key or session is ever named. Custom model and tool names become "Other"; reasons become fixed categories (such as "rate limit").
- Rates are whole per cent, counts to the nearest 10, times to coarse steps. Windows end at the last full hour.
#GET /v1/insights
The metrics, windows and rules.
json
{
"metrics": [
{ "name": "health", "label": "Health by model and tool", "description": "Share of agents that failed, failed on a rate limit, or needed a person, per model and per coding tool.", "url": "/v1/insights/health" }
],
"windows": ["24h", "7d"],
"rules": { "minWorkspaces": 20, "maxShareOfOneWorkspace": 0.5, "note": "…" },
"usage": "GET /v1/insights/{metric}?window=24h|7d"
}#GET /v1/insights/{metric}
| Query | Default | Notes |
|---|---|---|
window | 24h | 24h or 7d |
| Metric | Data |
|---|---|
health | byModel and byTool: { group, agents, failedPct, rateLimitedPct, neededSomeonePct } |
sessions | byModel: { model, agents, medianMinutes, medianTokens, medianCostUsd } (medianCostUsd null unless enough workspaces report cost) |
waits | byTool: { tool, waits, medianMinutes, p90Minutes } |
json
{
"metric": "health",
"label": "Health by model and tool",
"window": "24h",
"from": "2026-09-30T09:00:00.000Z",
"to": "2026-10-01T09:00:00.000Z",
"data": {
"byModel": [{ "group": "Opus 5.5", "agents": 420, "failedPct": 4, "rateLimitedPct": 2, "neededSomeonePct": 38 }],
"byTool": [{ "group": "Claude Code", "agents": 610, "failedPct": 3, "rateLimitedPct": 2, "neededSomeonePct": 41 }]
}
}Answers are cached for 10 minutes.
#Errors
| Status | error | When |
|---|---|---|
| 400 | invalid_window | window isn't 24h or 7d |
| 401 | unauthorized | Not an insights key |
| 402 | team_required | The key's workspace is on Solo |
| 404 | not_available | Insights aren't switched on yet |
| 404 | unknown_metric | No such metric |
| 429 | rate_limited | More than 60 requests a minute with this key |