Base URL
https://api.consilium.dev/api/v1Authentication
All API requests require a Bearer token in the Authorization header.
Authorization: Bearer YOUR_API_KEYGenerate API keys from your dashboard at Settings.
Debates
| Method | Path | Description |
|---|---|---|
| POST | /debates/estimate | Estimate cost before running |
| POST | /debates | Create a new debate |
| GET | /debates | List debates (query: limit, offset, search) |
| GET | /debates/:id | Get debate with rounds and messages |
| GET | /debates/:id/conversation | Get all debates in conversation |
| PATCH | /debates/:id | Update debate (rename/archive) |
| DELETE | /debates/:id | Delete debate |
| POST | /debates/:id/cancel | Cancel active debate |
| POST | /debates/:id/retry | Retry failed debate |
| GET | /debates/:id/stream | SSE stream (text/event-stream) |
Deliberation
| Method | Path | Description |
|---|---|---|
| POST | /deliberation/create | Start a deliberation session |
| POST | /deliberation/redteam | Red team adversarial assessment |
| POST | /deliberation/blind | Blind evaluation (anonymized) |
| GET | /deliberation/:id | Get deliberation with rounds/messages |
| POST | /deliberation/:id/retry | Retry failed deliberation |
| POST | /deliberation/:id/cancel | Cancel active deliberation |
| GET | /deliberation/:id/stream | SSE stream (text/event-stream) |
Agents
| Method | Path | Description |
|---|---|---|
| POST | /agents | Create agent configuration |
| GET | /agents | List all agents |
| GET | /agents/:id | Get agent by ID |
| PATCH | /agents/:id | Update agent configuration |
| DELETE | /agents/:id | Delete agent |
Personas
| Method | Path | Description |
|---|---|---|
| POST | /personas | Create persona with system prompt |
| GET | /personas | List all personas |
| GET | /personas/:id | Get persona by ID |
| PATCH | /personas/:id | Update persona |
| DELETE | /personas/:id | Delete persona |
API Keys
| Method | Path | Description |
|---|---|---|
| GET | /api-keys | List API keys |
| POST | /api-keys | Create API key |
| POST | /api-keys/test | Test API key validity |
| POST | /api-keys/cli-token | Generate CLI authentication token |
Analytics & Health
| Method | Path | Description |
|---|---|---|
| GET | /analytics | Usage analytics and cost breakdown |
| GET | /health | Service health check |
Webhooks
| Method | Path | Description |
|---|---|---|
| POST | /webhooks/clerk | Clerk authentication webhook |
SSE Events Reference
Deliberation
deliberation:startdeliberation:rounddeliberation:completedeliberation:errorPhases
phase:analysisphase:crossExaminationphase:rebuttalphase:synthesisphase:judgmentAgents
agent:thinkingagent:responseagent:critiqueagent:agreementConvergence
convergence:updateconvergence:reachedconvergence:stalledDissent
dissent:registereddissent:minority-reportRed Team
redteam:attackredteam:defenseredteam:vulnerabilityMarket
market:predictionmarket:updatemarket:settlementSystem
system:heartbeatsystem:ratelimitsystem:cancelRate Limits
| Endpoint | Limit | Window |
|---|---|---|
| POST /debates | 10 requests | 60 seconds |
| POST /debates/estimate | 30 requests | 60 seconds |
| POST /debates/:id/cancel | 10 requests | 60 seconds |
| POST /debates/:id/retry | 5 requests | 60 seconds |
| POST /deliberation/create | 10 requests | 60 seconds |
| POST /deliberation/redteam | 5 requests | 60 seconds |
| POST /deliberation/blind | 5 requests | 60 seconds |
| GET endpoints | 100 requests | 60 seconds |
| SSE streams | 5 concurrent | per 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