Analytics & Logs API
Query aggregated metrics and individual request logs.
Analytics report
GET /manage/v1/analytics/report
Query parameters
| Name | Type | Description |
|---|---|---|
start | ISO 8601 | Window start |
end | ISO 8601 | Window end |
granularity | enum | hour, day |
project_id | string | Scope to one project |
group_by | enum | model, provider, project, tag:<key>, end_user |
tags | JSON | Additional tag filters (e.g. {"tenant":"acme"}) |
include_comparison | bool | Include previous-period series |
Response (abbreviated)
{
"series": [
{
"bucket": "2026-04-14T00:00:00Z",
"requests": 1247,
"cost_usd": 3.142,
"input_tokens": 98213,
"output_tokens": 45021,
"errors": 3,
"p50_latency_ms": 238,
"p95_latency_ms": 801,
"p99_latency_ms": 1420
}
],
"totals": {
"requests": 1247,
"cost_usd": 3.142,
"error_rate": 0.0024
}
}
Decisions summary
GET /manage/v1/analytics/decisions
Aggregate routing decisions: per config, which attempts ran, how often fallbacks fired, why.
Request logs
GET /manage/v1/logs
Query parameters
| Name | Type | Description |
|---|---|---|
start | ISO 8601 | Window start |
end | ISO 8601 | Window end |
project_id | string | Filter |
status | string | Filter by status class: 2xx, 4xx, 5xx |
model | string | Filter by model name |
provider | string | Filter by provider |
end_user | string | Filter by end-user tag |
tags | JSON | Tag key-value filters |
min_latency_ms | integer | Slow-query filter |
cursor | string | Pagination |
Returns a paginated list of request summaries. Use the single-request endpoint below for full details.
Single request
GET /manage/v1/logs/{request_id}
Returns the full request: input messages (if retention allows), output, decision trace, per-attempt metrics, cost breakdown.
Request trace
GET /manage/v1/logs/{request_id}/trace
Just the decision trace: attempts, timings, reasons, final decision.
Replay
POST /manage/v1/logs/{request_id}/replay
Re-run a request against a specified routing config. Useful for debugging individual requests after a config change.
Request body
{
"routing_config": "@candidate-v2",
"dry_run": false
}
MCP tools
| Tool | Maps to |
|---|---|
get_analytics_report | GET /manage/v1/analytics/report |
get_decisions_summary | GET /manage/v1/analytics/decisions |
list_logs | GET /manage/v1/logs |
get_log | GET /manage/v1/logs/{id} |
get_request_trace | GET /manage/v1/logs/{id}/trace |
replay_log_entry | POST /manage/v1/logs/{id}/replay |