Skip to content

API Reference

Authentication

All requests require an X-API-Key header.

Endpoints

Health

GET /health -- Returns service status, version, and persistence mode.

Pipeline

POST /pipeline/run -- Execute an agent pipeline.

Request body example:

{
  "agents": [
    {"id": "researcher", "task": "Find recent papers on transformers"},
    {"id": "summariser", "task": "Summarise findings", "depends_on": ["researcher"]}
  ]
}

Intent Classification

POST /classify -- Classify message intent.

Request body: {"text": "What is the current status?"}

Response: {"intent": "query", "confidence": {"query": 0.92, ...}}

Users

  • GET /users -- list all users
  • POST /users -- create a user
  • PATCH /users/{id} -- update user role
  • DELETE /users/{id} -- deactivate user

Billing

  • POST /billing/subscribe -- create a subscription
  • POST /billing/webhook -- Stripe webhook endpoint
  • GET /billing/usage -- current usage stats

Error Responses

All errors return JSON with detail field.

Status codes: 401 (unauthenticated), 403 (unauthorised), 404 (not found), 429 (rate limited), 500 (server error).