Developer Manual

Authentication

Every request except the health check needs a bearer API key. Keys begin with eck_live_ or eck_test_ and carry their own organization and scopes, so there is no separate organization header.

Bearer keys

Send your API key in the Authorization header as a bearer token. Live keys begin with eck_live_. The server looks up the organization and scopes from the key. An X-Api-Key header works too.

bash
curl https://api.eclips.tech/v1/run \
  -H "Authorization: Bearer eck_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{ "agent_type": "rfq_generator", "task": "Draft an RFQ for 500 laptops" }'

In the SDK, pass the key to the constructor. Nothing else is required:

typescript
import { EClipsClient } from "@eclips/sdk";

// The org and scopes come from the key, so there is no organizationId to pass.
const client = new EClipsClient({ apiKey: process.env.ECLIPS_API_KEY! });
Important:Treat keys as secrets. Keep them out of client-side code and source control, and store them in an environment variable or a secrets manager.
bash
# Store the key as a secret. Never commit it.
export ECLIPS_API_KEY=eck_live_xxxxxxxxxxxxxxxxxxxxxxxx

Creating keys

Create keys in the dashboard under Settings → API Keys. Choose the scopes the key needs when you create it. Scopes are checked on every endpoint. The full eck_live_ value is shown once, so copy it then. Only a SHA-256 hash is stored. A key can have an expiry date and can be revoked at any time. A revoked or expired key returns 401.

Scopes

A key only works on an endpoint if it carries the matching scope. Otherwise the API returns 403 Insufficient scope with the required and provided scopes in the body.

json
{
  "error": "Insufficient scope",
  "required": "agents:run",
  "provided": ["agents:read"]
}
agents:runStart agent runs (POST /v1/run).
agents:readRead runs, stream status, and read usage (GET /v1/runs, /v1/runs/:id, /v1/runs/:id/stream, /v1/usage*).
triage:readList triage items waiting for a person (GET /v1/triage).
triage:writeApprove or reject triage items (POST /v1/triage/:id/approve|reject).
webhooks:readList registered webhooks (GET /v1/webhooks).
webhooks:writeCreate and delete webhooks (POST /v1/webhooks, DELETE /v1/webhooks/:id).
batch:runCreate and cancel batch jobs (POST /v1/batches, POST /v1/batches/:id/cancel).
batch:readList and read batch jobs (GET /v1/batches, GET /v1/batches/:id).
Note:Give a key only the scopes its integration needs. A read-only dashboard, for example, needs agents:read and not agents:run.