Skip to content

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.

Quickstart

Every REST surface uses the same auth header. MCP uses the same key on POST /api/mcp.

  1. 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. 2

    Send Authorization on every request

    Authorization: Bearer crt_…

    Base URL: https://critique.sh/api/v1

  3. 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…UseGo
Raw LLM tokens for my own agent loopInference APIinference-api
Critique runs code in a cloud sandbox and returns a patch or draft PRCoding Agent APIcoding-agent-api
Machine-readable PR verdict + findings for an agent merge loopMerge Gate APImerge-gate-api
Passports, review queue, or Remedy from Cursor / Claude DesktopMCP serverdocs/platform/connections-and-api#mcp-server-beta-v010
Signed webhooks when reviews, Checkpoint, or passports changeMerge Gate + lifecycle webhooksdocs/platform/merge-gate-api#webhooks
OpenAPI YAML for codegen and contract testsOpenAPI/api/v1/openapi

Ask the API guide

Nemotron-3-Super
Describe your stack or workflow — get a recommendation for Inference, Coding Agent, Merge Gate, or MCP, with scopes and links.
Not official support · Answers follow the public API catalog on this page · Not saved to your account · OpenRouter privacy

API 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
POST/api/v1/chat/completions

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
POST/api/v1/coding-agent/runs/{id}/messages
GET/api/v1/coding-agent/runs/{id}/stream
GET/api/v1/coding-agent/runs/{id}

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
GET/api/v1/review-runs/{id}
GET/api/v1/passports
GET/api/v1/passports/{id}/export
POST/api/v1/webhook-endpoints

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

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.

ScopeSurfacePrimary routes
Inference APIGET /api/v1/models · POST /api/v1/chat/completions
Coding Agent API/api/v1/coding-agent/runs …
Merge Gate · MCPPOST /api/v1/reviews · MCP queue_review · MCP queue_remedy
Merge Gate · MCPGET /api/v1/review-runs/:id · MCP get_review_run · list_review_runs
Merge Gate · MCPGET /api/v1/passports · export · MCP list_passports / get_passport
Lifecycle webhooksGET/POST/DELETE /api/v1/webhook-endpoints
Insights · reportsInsights 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.