Back to Docs

API Reference

Integrate Consilium into your applications with our REST API

Base URL
https://api.consilium.dev/api/v1
Authentication

All API requests require a Bearer token in the Authorization header.

Authorization: Bearer YOUR_API_KEY

Generate API keys from your dashboard at Settings.

Debates

MethodPathDescription
POST/debates/estimateEstimate cost before running
POST/debatesCreate a new debate
GET/debatesList debates (query: limit, offset, search)
GET/debates/:idGet debate with rounds and messages
GET/debates/:id/conversationGet all debates in conversation
PATCH/debates/:idUpdate debate (rename/archive)
DELETE/debates/:idDelete debate
POST/debates/:id/cancelCancel active debate
POST/debates/:id/retryRetry failed debate
GET/debates/:id/streamSSE stream (text/event-stream)

Deliberation

MethodPathDescription
POST/deliberation/createStart a deliberation session
POST/deliberation/redteamRed team adversarial assessment
POST/deliberation/blindBlind evaluation (anonymized)
GET/deliberation/:idGet deliberation with rounds/messages
POST/deliberation/:id/retryRetry failed deliberation
POST/deliberation/:id/cancelCancel active deliberation
GET/deliberation/:id/streamSSE stream (text/event-stream)

Agents

MethodPathDescription
POST/agentsCreate agent configuration
GET/agentsList all agents
GET/agents/:idGet agent by ID
PATCH/agents/:idUpdate agent configuration
DELETE/agents/:idDelete agent

Personas

MethodPathDescription
POST/personasCreate persona with system prompt
GET/personasList all personas
GET/personas/:idGet persona by ID
PATCH/personas/:idUpdate persona
DELETE/personas/:idDelete persona

API Keys

MethodPathDescription
GET/api-keysList API keys
POST/api-keysCreate API key
POST/api-keys/testTest API key validity
POST/api-keys/cli-tokenGenerate CLI authentication token

Analytics & Health

MethodPathDescription
GET/analyticsUsage analytics and cost breakdown
GET/healthService health check

Webhooks

MethodPathDescription
POST/webhooks/clerkClerk authentication webhook

SSE Events Reference

Deliberation
deliberation:startdeliberation:rounddeliberation:completedeliberation:error
Phases
phase:analysisphase:crossExaminationphase:rebuttalphase:synthesisphase:judgment
Agents
agent:thinkingagent:responseagent:critiqueagent:agreement
Convergence
convergence:updateconvergence:reachedconvergence:stalled
Dissent
dissent:registereddissent:minority-report
Red Team
redteam:attackredteam:defenseredteam:vulnerability
Market
market:predictionmarket:updatemarket:settlement
System
system:heartbeatsystem:ratelimitsystem:cancel

Rate Limits

EndpointLimitWindow
POST /debates10 requests60 seconds
POST /debates/estimate30 requests60 seconds
POST /debates/:id/cancel10 requests60 seconds
POST /debates/:id/retry5 requests60 seconds
POST /deliberation/create10 requests60 seconds
POST /deliberation/redteam5 requests60 seconds
POST /deliberation/blind5 requests60 seconds
GET endpoints100 requests60 seconds
SSE streams5 concurrentper user

Example Requests

POST /deliberation/create

Request

curl -X POST https://api.consilium.dev/api/v1/deliberation/create \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "topic": "Best practices for error handling in TypeScript",
    "mode": "council",
    "models": ["claude-sonnet-4-6", "gpt-5.4", "gemini-3-flash-preview"],
    "judgeModel": "claude-sonnet-4-6",
    "maxRounds": 3,
    "apiKeys": {
      "anthropic": "sk-ant-...",
      "openai": "sk-...",
      "google": "AIza..."
    }
  }'

Response

{
  "id": "dlb_abc123",
  "status": "processing",
  "mode": "council",
  "topic": "Best practices for error handling in TypeScript",
  "models": ["claude-sonnet-4-6", "gpt-5.4", "gemini-3-flash-preview"],
  "judgeModel": "claude-sonnet-4-6",
  "maxRounds": 3,
  "created_at": "2026-04-08T12:00:00Z",
  "stream_url": "/api/v1/deliberation/dlb_abc123/stream"
}
POST /debates/estimate

Request

curl -X POST https://api.consilium.dev/api/v1/debates/estimate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "topic": "Microservices vs monolith for a startup",
    "mode": "council",
    "models": ["claude-sonnet-4-6", "gpt-5.4", "gemini-3-flash-preview"]
  }'

Response

{
  "estimatedCost": 0.0847,
  "breakdown": {
    "claude-sonnet-4-6": 0.0312,
    "gpt-5.4": 0.0285,
    "gemini-3-flash-preview": 0.0250
  },
  "estimatedTokens": 12400,
  "estimatedDuration": "45s"
}
GET /deliberation/:id/stream

Connection

curl -N https://api.consilium.dev/api/v1/deliberation/dlb_abc123/stream \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: text/event-stream"

Event Stream

event: deliberation:start
data: {"id":"dlb_abc123","mode":"council","models":3}

event: phase:analysis
data: {"round":1,"phase":"independent_analysis"}

event: agent:response
data: {"agent":"claude-sonnet-4-6","round":1,"content":"..."}

event: convergence:update
data: {"score":0.72,"threshold":0.85}

event: phase:synthesis
data: {"round":3,"phase":"final_synthesis"}

event: deliberation:complete
data: {"id":"dlb_abc123","consensus":true,"rounds":3}

Need help integrating? Get in touch.

Contact us