Base URL
/v1/ path prefix (e.g. /v1/ingest, /v1/traces).
Authentication
Every request requires a bearer token in theAuthorization header.
| Client | Token | How to get it |
|---|---|---|
| SDKs / server code | API key (tl_...) | Dashboard → Settings → API keys |
| Dashboard / browser | Clerk session JWT | Managed automatically by the frontend — you do not construct these by hand |
Content type
All request and response bodies are JSON unless otherwise noted:Rate limits
Rate limits are per tenant, enforced via a sliding window:| Endpoint family | Limit (Free) | Limit (Pro) |
|---|---|---|
POST /v1/ingest, POST /v1/ingest/batch | 50,000 traces / month | 1,000,000 / month |
POST /v1/feedback, POST /v1/eval | Scales with plan | Scales with plan |
GET /v1/traces, GET /v1/metrics | 60 rps | 600 rps |
X-RateLimit-* headers on every response for the current window state. Enterprise plans have no hard limits.
Error format
Errors always return a JSON body of this shape:| Status | Meaning |
|---|---|
400 | Malformed request — body doesn’t match schema |
401 | Missing or invalid token |
403 | Token valid but not authorised for this resource (e.g. wrong tenant) |
404 | Resource not found |
409 | Conflict — e.g. submitting a trace with an ID that already exists |
422 | Validation error on a required field |
429 | Rate-limited |
5xx | Server-side issue — safe to retry with exponential backoff |
request_id — it’s the fastest way for support to look up a failed request.
Versioning
The current API version is v1. Backwards-incompatible changes are shipped as a new version path (/v2/...); v1 is supported for at least 12 months after v2 release.
Additive changes (new fields, new optional parameters) may land on v1 without a version bump — client code should ignore unknown response fields.
SDKs
For most apps, you should not hit these endpoints directly — the SDKs handle batching, retries, and serialisation for you.Python SDK
pip install trulayerTypeScript SDK
npm install @trulayer/sdk