Skip to main content

REST API overview

The Eden REST API is the wire-level interface for everything in the portal — ingestion, traces, evaluations, agents, costs, governance. The Next.js portal talks to these endpoints over the same auth the public SDKs use.

Base URL

EnvironmentBase URL
Productionhttps://api.edenobservability.com

SDKs default to this host; set EDEN_BASE_URL only if Eden staff points you at a staging override.

Most SDK / ingest paths are under /orgs/{org_id}/… (not a global /v1 prefix). The OpenAI-compatible gateway lives at /v1.

Authentication

1. Org API key (SDKs + ingestion)

Issue from the portal (Settings → API Keys) or use Fill in.

curl -X POST "https://api.edenobservability.com/orgs/$EDEN_ORG_ID/ingest/custom" \
-H "X-Org-Api-Key: $EDEN_API_KEY" \
-H "X-Org-Id: $EDEN_ORG_ID" \
-H "Content-Type: application/json" \
-d '{ "event_type": "hello", "outcome": "success" }'

2. Clerk session (portal)

Used by edenobservability.com. You do not configure Clerk yourself.

3. Clerk JWT (custom portal integrations)

curl "https://api.edenobservability.com/orgs/$EDEN_ORG_ID/…" \
-H "Authorization: Bearer eyJhbGciOi…" \
-H "X-Org-Id: org_…"

Required headers

HeaderRequired forNotes
X-Org-Api-KeySDK / ingestOrg API key from Settings → API Keys
X-Org-IdSDK / ingestMust match the key's org
Authorization: Bearer …Portal / Clerk JWT pathsSession or Clerk JWT
Content-Type: application/jsonPOST/PUT bodies
Idempotency-Key: <uuid>POST ingestRecommended for safe retries

Response envelope

Every successful response uses the same envelope:

{
"data": { /* endpoint-specific payload */ },
"meta": {
"api_version": "1.7.0",
"request_id": "req_abc123",
"timestamp": "2026-06-19T10:30:00Z"
}
}

Paginated endpoints add total, page, per_page to meta and return a data array.

Errors look like:

{
"detail": "human-readable message",
"request_id": "req_abc123",
"code": "trace_not_found"
}

HTTP status code is always set; code is machine-readable. See Error codes.

Rate limits

Default per-tenant limits:

PlanIngest req / 60sAPI req / 60sBurst
Free606030
Starter30030060
Pro15001500200
EnterpriseCustomCustomCustom

Hitting the limit returns 429 Too Many Requests with a Retry-After header. The SDKs auto-retry with exponential backoff up to 3 times before bubbling the error.

Pagination

Cursor-based for traces (where order is meaningful), offset-based elsewhere:

# Offset pagination
GET /v1/traces?limit=50&offset=100

# Cursor pagination (traces only)
GET /v1/traces?limit=50&cursor=eyJ0IjoxNzMwNzI3MjAwfQ==

The response's meta.next_cursor (cursor mode) or meta.has_more (offset mode) tells you when to stop.

Idempotency

POST endpoints accept an Idempotency-Key header. Eden caches the response for 24 hours keyed on (org_id, endpoint, key) — replaying the same key returns the original response, never a duplicate resource.

Recommended for all ingest paths.

Versioning policy

  • The current version ships at /v1/. It is stable.
  • New endpoints may be added without a version bump (additive).
  • New required fields on existing endpoints get a version bump and a 6-month overlap window.
  • Removed fields get a Deprecation header and 12-month overlap.

The SDKs pin to a specific minor version. Pin explicitly to lock behaviour:

eden.configure(api_key=..., org_id=..., api_version="1.7.0")

Endpoint index

GroupEndpoints
IngestionPOST /orgs/{org}/ingest/openai, POST /orgs/{org}/ingest/anthropic, POST /orgs/{org}/ingest/custom, POST /orgs/{org}/ingest/app
TracesGET /v1/traces, GET /v1/traces/{trace_id}/tree, GET /v1/traces/{trace_id}/timeline, POST /v1/traces/{trace_id}/export
AgentsGET /orgs/{org}/agents, POST /orgs/{org}/agents/register, GET /orgs/{org}/agents/{id}
EvaluationsPOST /v1/evals, GET /v1/evals/{eval_id}, POST /v1/judges, POST /v1/datasets
CostGET /v1/budgets, POST /v1/budgets/{org}/alerts, GET /v1/cost/summary
OrgGET /orgs/{org}, POST /orgs/{org}/members, GET /orgs/{org}/api-keys
ErrorsStandard error codes

Quick example

# Ingest an OpenAI chat completion
curl -X POST https://api.edenobservability.com/orgs/org_abc/ingest/openai \
-H "Authorization: Bearer sk_eden_..." \
-H "Content-Type: application/json" \
-d '{
"request": {
"model": "gpt-4o-mini",
"messages": [{"role": "user", "content": "Hello!"}]
},
"response": {
"id": "chatcmpl-abc",
"choices": [{"message": {"role": "assistant", "content": "Hi!"}}],
"usage": {"prompt_tokens": 12, "completion_tokens": 4, "total_tokens": 16}
},
"duration_ms": 820,
"outcome": "success"
}'

# Fetch the trace you just ingested
curl https://api.edenobservability.com/v1/traces?limit=10 \
-H "Authorization: Bearer sk_eden_..." \
-H "X-Org-Id: org_abc"