critique.sh/api
Critique APIs
Start here. Pick the API that matches your job — tokens, sandbox coding, PR merge gate, or MCP — then follow the product page or docs link for quickstarts, cookbooks, and scope details.“Platform API” is the umbrella for these surfaces. “Merge Gate API” is the PR governance surface inside it.
Inference API
OpenAI-compatible chat completions on Critique credits.
Coding Agent API
Remote OpenCode runs — patch, validation, optional draft PR.
Merge Gate API
Queue PR review — PASS / WARN / FAIL + structured findings for agent orchestrators.
MCP server
JSON-RPC at POST /api/mcp — ten tools, same crt_ scopes as REST.
Quickstart
Every REST surface uses the same auth header. MCP uses the same key on POST /api/mcp.
- 1
Create a crt_ API key
Sign in → Settings → Connections. New keys include default scopes; rotate older keys if you get 403 on reviews or insights.
- 2
Send Authorization on every request
Authorization: Bearer crt_…
Base URL:
https://critique.sh/api/v1 - 3
Verify with a cheap call
curl https://critique.sh/api/v1/models \ -H "Authorization: Bearer crt_YOUR_KEY"
Then jump to the surface you need below — Inference, Coding Agent, or Merge Gate.
Which API do I need?
Match your job to a surface first. Product pages have pricing and cookbooks; docs have full route tables and error codes.
| I need to… | Use | Go |
|---|---|---|
| Raw LLM tokens for my own agent loop | Inference API | inference-api → |
| Critique runs code in a cloud sandbox and returns a patch or draft PR | Coding Agent API | coding-agent-api → |
| Machine-readable PR verdict + findings for an agent merge loop | Merge Gate API | merge-gate-api → |
| Passports, review queue, or Remedy from Cursor / Claude Desktop | MCP server | docs/platform/connections-and-api#mcp-server-beta-v010 → |
| Signed webhooks when reviews, Checkpoint, or passports change | Merge Gate + lifecycle webhooks | docs/platform/merge-gate-api#webhooks → |
| OpenAPI YAML for codegen and contract tests | OpenAPI | /api/v1/openapi |
Ask the API guide
Nemotron-3-SuperAPI catalog
Current public surfaces on Critique v6.1. Scopes, primary routes, and links to the right next page.
Token completions
Inference API
OpenAI-compatible chat completions on Critique credits.
Sidecars, eval harnesses, and custom agent loops that only need raw model tokens — no sandbox, no PR workflow.
read:inferencewrite:inference| GET | /api/v1/models | List hosted models |
| POST | /api/v1/chat/completions | Chat completions (streaming supported) |
Managed sandbox
Coding Agent API
Remote OpenCode runs — patch, validation, optional draft PR.
Automation that needs Critique to clone a repo, execute in E2B, and return code changes over HTTP with warm session follow-ups.
read:builderwrite:builder| POST | /api/v1/coding-agent/runs | Start a run (preview: true for cost estimate) |
| POST | /api/v1/coding-agent/runs/{id}/messages | Follow-up in warm session |
| GET | /api/v1/coding-agent/runs/{id}/stream | SSE activity stream |
| GET | /api/v1/coding-agent/runs/{id} | Status, patch, draft PR linkage |
PR merge governance
Merge Gate API
Queue PR review — PASS / WARN / FAIL + structured findings for agent orchestrators.
CI supervisors and agent stacks that need a separate judge (not the coding agent that opened the PR): webhooks, MCP, passport reads. v6.1.1: upstreamSignals for RWX, Swytchcode, Iron Book.
write:reviewsread:reviewsread:passportsmanage:webhooks| POST | /api/v1/reviews | Queue review (optional per-run webhook) |
| GET | /api/v1/review-runs/{id} | Poll verdict (?findings=all) |
| GET | /api/v1/passports | Change passport queue |
| GET | /api/v1/passports/{id}/export | Signed audit bundle |
| POST | /api/v1/webhook-endpoints | Lifecycle subscriptions |
IDE & agent hosts
MCP server
JSON-RPC at POST /api/mcp — ten tools, same crt_ scopes as REST.
Cursor, Claude Desktop, and MCP hosts that prefer tool calls over raw REST for passports, review queue, and Remedy status.
read:passportsread:reviewswrite:reviewsread:insightswrite:insights| POST | /api/mcp | MCP JSON-RPC (queue_review, get_review_run, list_passports, …) |
Auth & scopes
Programmatic v1 routes require a crt_ key with the right scope — browser session cookies do not satisfy scoped checks on these endpoints. MCP enforces the same scopes per tool call.
| Scope | Surface | Primary routes |
|---|---|---|
| read:inference / write:inference | Inference API | GET /api/v1/models · POST /api/v1/chat/completions |
| read:builder / write:builder | Coding Agent API | /api/v1/coding-agent/runs … |
| write:reviews | Merge Gate · MCP | POST /api/v1/reviews · MCP queue_review · MCP queue_remedy |
| read:reviews | Merge Gate · MCP | GET /api/v1/review-runs/:id · MCP get_review_run · list_review_runs |
| read:passports | Merge Gate · MCP | GET /api/v1/passports · export · MCP list_passports / get_passport |
| manage:webhooks | Lifecycle webhooks | GET/POST/DELETE /api/v1/webhook-endpoints |
| read:insights / write:insights | Insights · reports | Insights routes · MCP (where documented) |
Resources
One crt_ key family
Create keys in Settings → Connections. Scopes gate inference, coding-agent runs, reviews, passports, webhooks, and MCP — rotate one auth primitive instead of juggling separate tokens.
One credit pool
Inference and managed review draw from Critique credits. Coding Agent runs can use Critique credits or your OpenRouter key per run. BYOK on review is separate — see docs.
One base URL shape
REST v1 lives under https://critique.sh/api/v1. MCP is POST /api/mcp. OpenAPI at GET /api/v1/openapi documents the contract for automation teams.
One merge boundary
Writers (your coding agents) propose PRs. Merge Gate judges them. Passports and exports record the same evidence whether the review started from GitHub or your orchestrator.