API
Ingest & query API
Send and read traces via HTTP. Field names are snake_case. Authenticate with your project API key.
Authentication
Authorization: Bearer pu-your-api-key
GET /health
GET http://localhost:8789/health
{ "ok": true, "service": "puse-ingest" }POST /v1/traces
Ingest a single trace. Returns 201.
POST http://localhost:8789/v1/traces
Content-Type: application/json
Authorization: Bearer pu-...
{
"model": "gpt-4o",
"provider": "openai",
"input_tokens": 120,
"output_tokens": 340,
"latency_ms": 1820,
"cost_usd": 0.0042,
"status": "ok",
"metadata": { "user_id": "u_123" }
}POST /v1/traces/batch
Up to 100 traces per request.
POST http://localhost:8789/v1/traces/batch
{ "traces": [ { "model": "gpt-4o-mini", "latency_ms": 400 } ] }GET /v1/traces
Query traces for the authenticated project. Supports pagination via cursor.
GET http://localhost:8789/v1/traces?model=gpt-4o&status=error&limit=50 GET http://localhost:8789/v1/traces?from=2026-01-01T00:00:00Z&to=2026-01-02T00:00:00Z
GET /v1/traces/:id
Fetch a single trace by ID (must belong to the authenticated project).
Rate limits
- Free: 1,000 traces/min per API key
- Cloud: 10,000 traces/min per API key
- Enterprise: unlimited