Developer docs

Call AI Consensus from your own tools and get the same result the app gives you: three frontier models (Claude, GPT, Gemini) work your prompt independently, critique each other, and return one consolidated answer — with the strongest dissent when it's a decision.

There are two ways in: a Claude Code connector for your editor, and a REST API for everything else.

1. Get an API key

Sign in, open Developer API, and create a key. It looks like aic_live_… and is shown once — copy it and keep it secret. Your key authenticates to your account and bills your plan: free on Unlimited (your own provider keys), or one prepaid credit per run on pay-as-you-go.

2. The coding-agent connector (MCP)

Make AI Consensus a standing part of your development model: your coding agent routes every decision of consequence through the three-model panel as a matter of course, and weighs the recommendation — and the strongest dissent — before acting. You keep building inside your agent; the panel reviews as you go. For Claude Code, one command:

claude mcp add ai-consensus --scope user \
  --env AI_CONSENSUS_API_KEY=aic_live_your_key_here \
  -- npx -y ai-consensus-connector

Verify the connection (free — no run is started) by asking your agent to “use the check_ai_consensus_connection tool.” Then make the panel your standing rule — add this to your project’s CLAUDE.md:

STANDING RULE: This project develops with AI Consensus as its
review layer. Route every decision of consequence — architecture,
design, implementation approach, tricky bugs, anything whose cost
of being wrong is real — through consult_ai_consensus as a matter
of course, and weigh its recommendation and strongest dissent
before acting. Purely mechanical edits (formatting, typos, exact
instructed changes) don't need a run. When in doubt, consult.

Teams that want everything routed can use the strict variant: “Consult consult_ai_consensus before every non-trivial change of any kind, and weigh the dissent before acting.” Using Cursor or Cline? Add a stdio MCP server with command npx -y ai-consensus-connector and the AI_CONSENSUS_API_KEY env var, then put the standing rule in your rules file (.cursorrules / .clinerules).

Tools exposed: consult_ai_consensus (submit + wait), start_ai_consensus / get_ai_consensus_result (fire-and-forget + collect), check_ai_consensus_connection (zero-cost setup check), and cancel_ai_consensus_run.

Data & privacy — what the connector sends

  • Only what your agent includes. The connector sends just the text your agent puts in the consult prompt. It does not read your files or scan your codebase itself — you (and your agent) control exactly what goes in each prompt. There are no file attachments over the connector.
  • Where it goes. That text is sent over HTTPS to AI Consensus, then to three independent model providers — Anthropic (Claude), OpenAI (GPT) and Google (Gemini) — on their no-training API tiers, all hosted in the United States. Providers may retain API logs briefly for abuse-monitoring under their own policies.
  • What we store. Your prompt and the result are stored in our database (Supabase, US) so you can revisit runs. You can delete individual conversations at any time; if you delete your account we remove your personal data within 30 days.
  • Bring-your-own-keys (Unlimited). Your provider API keys are encrypted at rest (AES-256-GCM); model charges are billed to you directly by each provider.

Handling sensitive code or documents? Send sanitized examples until you've reviewed our full Privacy Policy.

3. The REST API

Base URL https://ai-consensus.ai/api/v1. Authenticate with a bearer token. Runs are asynchronous (a run takes a few minutes), so you submit, then poll or long-poll for the result.

Submit a run

curl https://ai-consensus.ai/api/v1/runs \
  -H "Authorization: Bearer aic_live_your_key_here" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"question": "Should we migrate our billing to Stripe or stay on Paystack?"}'

Returns 202 with the run id and where to collect it:

{
  "run_id": "a1b2c3…",
  "status": "queued",
  "poll_url": "https://ai-consensus.ai/api/v1/runs/a1b2c3…",
  "wait_url": "https://ai-consensus.ai/api/v1/runs/a1b2c3…/wait"
}

An optional Idempotency-Key makes retries safe — the same key returns the same run instead of starting a new one.

Collect the result

Either poll GET /runs/{id}, or long-poll POST /runs/{id}/wait, which holds the connection up to ~50 seconds and returns 200 the moment it’s done (or 202 to keep waiting):

curl -X POST https://ai-consensus.ai/api/v1/runs/a1b2c3…/wait \
  -H "Authorization: Bearer aic_live_your_key_here"

# 200 when finished — a decision returns brief + verdict:
# {
#   "run_id": "a1b2c3…",
#   "status": "succeeded",
#   "mode": "decision",
#   "result": {
#     "brief":   { … the reasoning … },
#     "verdict": {
#       "consensusReached": true,
#       "consensusDecision": "…the consolidated recommendation…",
#       "dissent": "…the strongest case against, when relevant…"
#     }
#   }
# }
# A "build me X" task returns mode "deliverable" with result.artifact (the finished text).

Cancel

curl -X POST https://ai-consensus.ai/api/v1/runs/a1b2c3…/cancel \
  -H "Authorization: Bearer aic_live_your_key_here"

Errors

Reliability: if one provider is down, a run still completes on the other two and the result notes what happened.

Ready?

Create a key and make your first call in a couple of minutes.

Get an API key →

Questions? support@ai-consensus.ai · Home