API Reference

Base URL: https://api.framewren.com/v1

Authentication

All API requests require a bearer token. Pass your API key in the Authorization header.

http
Authorization: Bearer frw_live_your_key_here

GET /metrics

Returns aggregated cost and latency metrics for a project within a time range.

Parameters

Name Type Description
project_id string Required. Your project ID.
start ISO 8601 Range start (inclusive). Defaults to 7 days ago.
end ISO 8601 Range end (inclusive). Defaults to now.
granularity string hour, day, week. Defaults to day.
json — Response 200
{
  "project_id": "proj_01h...",
  "period": { "start": "2026-05-01T00:00:00Z", "end": "2026-05-08T00:00:00Z" },
  "cost_usd": 847.32,
  "total_requests": 124803,
  "latency_ms": { "p50": 312, "p95": 1840, "p99": 4120 }
}

Alerts

Create and manage spend and latency alert rules via the API.

http
POST /alerts
GET  /alerts
DELETE /alerts/{alert_id}

Export

Export raw request-level metrics in JSONL or CSV format for loading into your data warehouse.

http
GET /export?project_id=proj_01h...&format=jsonl&start=2026-05-01