API Reference

REST API for programmatic access.

Base URL: https://api.kalibr.systems


Authentication

All requests require an API key:

curl -H "X-API-Key: sk_live_..." https://api.kalibr.systems/api/traces

Traces

List Traces

GET /api/traces
Parameter Description
workflow_id Filter by workflow
tenant_id Filter by customer
status Filter by success/error
hours Time range (default: 24)
limit Max results (default: 100)

Example:

curl -H "X-API-Key: $KEY" \
  "https://api.kalibr.systems/api/traces?workflow_id=research_pipeline"

Get Trace

GET /api/traces/{trace_id}

Analytics

Summary

GET /api/analytics/summary?hours=24

Returns: total cost, calls, tokens, latency, error rate.

Cost Breakdown

GET /api/analytics/cost?group_by=workflow

Options for group_by: workflow, tenant, provider, model.

Workflow Stats

GET /api/analytics/workflows

Tenant Stats

GET /api/analytics/tenants

Health

GET /health

Returns: {"status": "ok"}


Rate Limits

Tier Limit
Free 100/min
Pro 1000/min
Enterprise Custom

Errors

Code Status Meaning
invalid_api_key 401 Bad API key
rate_limit_exceeded 429 Too many requests
not_found 404 Resource not found

Next Steps

  • Traces — Understanding trace data
  • Monitor — Dashboard and alerts