Inference API
OpenAI-compatible chat completions billed at $/1M input and output — Western-hosted models, usage dashboards, and per-user limits.
The Critique Inference API is token-in/token-out chat for sidecars, eval harnesses, CritiqueCode, and internal tools. Completions bill at published $/1M input and $/1M output rates. They do not consume the PR review credit pool. The same crt_ keys still authenticate.
Marketing overview, rate cards, and an API key gate live at /inference-api. Long-form background: Why we built the Inference API.
Inference API vs Coding Agent API
Inference API — POST /api/v1/chat/completions returns model text; you orchestrate the loop.
Coding Agent API — POST /api/v1/coding-agent/runs clones a repo, runs OpenCode in E2B, and can open a draft PR.
Use Inference when you already have an agent runtime. Use Coding Agent when you want Critique to own the sandbox.
CritiqueCode uses this API
CritiqueCode (@critiquedotsh/harness, binary critique-code) defaults to critique/auto on this API. Run critique-code login and approve on the website; no pasted key required. BYOK OpenAI or OpenRouter keys remain optional. The sidecar reviewer remains @critiquedotsh/cli.
Authentication
| Item | Value |
|---|---|
| Auth | Authorization: Bearer crt_… |
| Create keys | Settings → Connections → Critique API keys (or the key gate on /inference-api when signed in) |
| Scopes | read:inference, write:inference (included on new keys alongside builder scopes) |
| OpenAI SDK | baseURL: "https://critique.sh/api/v1" |
write:builder also authorizes chat completions if your key predates inference scopes.
Endpoints
| Method | Path | Scope | Purpose |
|---|---|---|---|
GET | /api/v1/models | read:inference or read:builder | OpenAI-compatible model list |
POST | /api/v1/chat/completions | write:inference or write:builder | Chat completions billed at $/1M input and output |
POST | /api/v1/audio/transcriptions | write:inference or write:builder | Speech-to-text via qwen/qwen3-asr-0.6b (CritiqueCode /voice) |
Non-streaming responses include X-Critique-Estimated-Usd, X-Critique-Input-Usd, and X-Critique-Output-Usd. Inference does not charge review credits.
Voice transcription
POST /api/v1/audio/transcriptions is speech-to-text for CritiqueCode /voice. It is not a chat model. Send base64 audio; the only hosted id is qwen/qwen3-asr-0.6b (Qwen3 ASR 0.6B). Billing is $0.000003 per second of audio, not $/1M tokens. Session commands: CritiqueCode voice mode. Product notes: Talk to code.
curl https://critique.sh/api/v1/audio/transcriptions \
-H "Authorization: Bearer crt_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen/qwen3-asr-0.6b",
"input_audio": { "data": "BASE64_WAV", "format": "wav" }
}'Coding auto router
openrouter/auto ranks models by seven-day market spend. That is a weak prior for coding agents.
critique/auto is a session coding selector over the Critique-resold Inference catalogue. It does not search OpenRouter's full model list.
Two rungs. A new session starts on the efficient rung (Seed 2.0 Code, DeepSeek V4 Flash 0731, DeepSeek V4.1 Flash, Gemini 3.8 Flash, Qwen3.8 Flash, Muse Glimmer, Qwen3.8 27B, Hy3, Ling 3.0 Flash). critique/auto-best starts on the frontier rung (Kimi K2.7 Code, GLM-5.3, Qwen3.8 2.4T, KAT-Coder Pro, MiniMax M3, Trinity, Kimi K2.6, Kimi K3, Fugu Ultra, Grok 4.6).
Sticky. The first turn picks a specialist. Later turns in the same session reuse it so the prompt cache stays warm. Send X-Critique-Router-Session from the previous response. If you omit it, Auto mints a new session.
Escalate once. Repeated tool failures move an efficient session onto the frontier rung. Auto does not re-pick every message, and the router-brain cannot jump rungs on a healthy session.
Vetoes. Screenshots cannot land on text-only models. Oversized prompts cannot land on a 128K specialist. Weak tool-callers cannot land on an agent loop.
Token rates follow the routed model. The JSON model field stays critique/auto*.
| Model id | Behaviour |
|---|---|
critique/auto (alias auto) | Efficient first, escalate if stuck |
critique/auto-fast (alias auto-fast) | Same rungs, prefer speed inside the rung |
critique/auto-best (alias auto-best) | Start on frontier |
Response headers: X-Critique-Routed-Model, X-Critique-Router-Session, X-Critique-Router-Rung, X-Critique-Router-Escalated, X-Critique-Router-Task, X-Critique-Router-Confidence.
curl https://critique.sh/api/v1/chat/completions \
-H "Authorization: Bearer crt_YOUR_KEY" \
-H "Content-Type: application/json" \
-H "X-Critique-Router-Session: crs_…" \
-d '{
"model": "critique/auto",
"messages": [
{ "role": "user", "content": "implement the retry queue in src/billing.ts" }
],
"tools": [{ "type": "function", "function": { "name": "read_file" } }]
}'Marketing overview: /inference-api#auto. Essay: How Critique Auto picks a coding model.
Hosted models
| Model id | Role | Notes |
|---|---|---|
critique/auto | Coding selector | Session Auto. Efficient rung first; frontier after struggle. Billed at the routed specialist. Also critique/auto-fast, critique/auto-best. |
deepseek/deepseek-v4-flash-0731 | Default | 1.31M context. Private tier: $0.065 / $0.18 per 1M input/output tokens. |
deepseek/deepseek-v4.1-flash | Multimodal CED flash | Native text + image input, 552B sparse MoE with 8B/16B input/output activation, 1.05M context. $0.15 / $0.60 per 1M input/output tokens. |
qwen/qwen3.8-flash | Multimodal flash | High-throughput agents and visual coding. 1M context. $0.15 / $0.47 per M. Review catalog: 0.5 credits. |
inclusionai/ling-3.0-flash | Token-efficient MoE flash | 124B MoE (~5.1B active), 131K context. $0.075 / $0.22 per M. Review catalog: 0 credits on the free sponsored lane. |
tencent/hy3 | Agentic MoE | 10% below market on API ($0.126 / $0.522 per M). 1 credit per PR review run on Critique. 295B MoE (21B active), 262K context. |
nvidia/nemotron-3-ultra-550b-a55b | Frontier MoE | Intro API pricing through 19 June 2026 (UTC) — 50% off market tokens; review runs 2 credits (then 3 shelf). |
minimax/minimax-m3 | Multimodal agent | Long-horizon agentic work and tool use. 1M context. $0.30 / $1.20 per M. Review catalog: 3 credits. |
kwaipilot/kat-coder-pro-v2.5 | Agentic coding | Issue-to-change specialist loops. 256K context. $0.74 / $2.96 per M. Review catalog: 2 credits. |
moonshotai/kimi-k2.7-code | Coding specialist | Coding-focused Kimi K2 with thinking mode. 256K context. $0.73 / $3.50 per M. Review catalog: 4.5 credits. |
moonshotai/kimi-k2.6 | Multimodal agent | Long-horizon coding and orchestration. Private list rates on /inference-api. |
z-ai/glm-5.3 | Long-horizon coding | Extended autonomous coding loops. $1.40 / $4.40 per M. |
arcee-ai/trinity-large-thinking | Open reasoning | Apache 2.0 weights · agentic and reasoning workloads. |
bytedance-seed/seed-2.0-code | Agentic coding | ByteDance Seed coding specialist. 256K, multimodal. $0.50 / $3.00 per M. Review catalog: 2 credits. |
qwen/qwen3.8-2.4t-a95b | Open-weight Max | 2.4T MoE (95B active), 1M context. $2 / $6 per M. Review catalog: 6 credits. |
meta/muse-glimmer-30b | Dense VLM | Meta Muse Glimmer 30B. 128K, text+image. $0.35 / $1.50 per M. Review catalog: 0.5 credits. |
meta/muse-spark-1.3 | Reasoning VLM | Meta Muse Spark 1.3. 1M context. Text, image, video, audio, PDF in; text out. $1.25 / $4.25 per 1M. |
qwen/qwen3.8-27b | Dense VLM | Qwen3.8 27B. 256K, text+image+video. $0.45 / $3.20 per M. Review catalog: 1 credit. |
poolside/laguna-s-2.1 | Agentic coding | Poolside Laguna S 2.1. 118B MoE (8B active), 256K. OpenMDW-1.1. $0.09 / $0.18 per M. PR review stays on the sponsored poolside/laguna-s-2.1:free lane (0 credits). |
x-ai/grok-4.6 | Frontier coding | xAI Grok 4.6. 500K context. $2.00 / $6.00 per M; $4.00 / $12.00 when the prompt is ≥200K tokens. Not on the log-retention 75% off deal. |
moonshotai/kimi-k3 | Frontier multimodal | Moonshot Kimi K3, 2.8T, 1M context. $3.00 / $15.00 per M. Review catalog: 20 credits. Not on the log-retention 75% off deal. |
google/gemini-3.8-flash | Multimodal flash | Google Gemini 3.8 Flash. 1M context. $0.75 / $3.75 per M. Not on the log-retention 75% off deal. |
sakana/fugu-ultra | Multi-agent orchestration | Sakana Fugu Ultra. 1M context. $5.00 / $30.00 per M; $10.00 / $45.00 above 272K prompt tokens. Review catalog: 40 credits. Not on the log-retention 75% off deal. |
These are the Critique-resold Inference offers (rate cards, training opt-in, marketing on /inference-api).
The chat-completions proxy also accepts any model id from the /pricing review catalog (for example anthropic/claude-opus-5, openai/gpt-5.6-terra). Those passthrough models are not Critique resell offers: they are not featured on the Inference API page, and usage is metered from upstream cost at token rates.
All launch (resold) models route through Western sweetener servers. Critique does not train on Inference API payloads by default.
Log retention opt-in (75% off)
Eligible Inference API models (including DeepSeek V4 Flash 0731, DeepSeek V4.1 Flash, Qwen3.8 Flash, Qwen3.8 2.4T A95B, Qwen3.8 27B, Seed 2.0 Code, Muse Glimmer 30B, Muse Spark 1.3, Laguna S 2.1, Ling 3.0 Flash, Hy3, Nemotron, MiniMax M3, KAT-Coder Pro, Kimi K2.7 Code, Kimi K2.6, GLM-5.3, and Trinity Large Thinking) keep the private tier at full rates, or opt in to short-term log retention at 25% of list price (75% off). Grok 4.6, Kimi K3, Gemini 3.8 Flash, and Fugu Ultra are list-price only — they are not on this deal.
| How to opt in | |
|---|---|
| Account | Settings → Connections → Inference API panel → log-retention / training opt-in |
| Per request | Header X-Critique-DeepSeek-Training-Opt-In: true |
Western hosting applies either way. This deal does not apply to PR review runs or Builder.
Quickstart
curl https://critique.sh/api/v1/chat/completions \
-H "Authorization: Bearer crt_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek/deepseek-v4-flash-0731",
"messages": [
{ "role": "user", "content": "Summarize this retry policy in three bullets." }
]
}'import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.CRITIQUE_API_KEY,
baseURL: "https://critique.sh/api/v1",
});
const res = await client.chat.completions.create({
model: "deepseek/deepseek-v4-flash-0731",
messages: [{ role: "user", content: "Draft a TypeScript type for idempotent enqueue." }],
});Usage dashboard and limits
Signed-in operators get a full dashboard at /inference-dashboard:
- USD and tokens over time (7 / 30 / 90 days)
- Model and API-key attribution
- Limit status vs caps
- Paginated activity log
Settings → Connections includes a mini Inference API panel:
| Control | Purpose |
|---|---|
| Enable / disable | Turn Inference API off for your account |
| Monthly / daily USD caps | Inference-only token-cost limits (UTC) |
| Daily request cap | Throttle runaway agents |
| Reserve credits for review | Unused for Inference token billing |
| Block when cap reached | Hard stop vs soft warning |
| Log retention opt-in | 75% off eligible Inference API model token rates when enabled |
Settings API: GET / PATCH /api/settings/inference-api. Dashboard data: GET /api/dashboard/inference-api (?days=30 or ?view=activity).
Privacy and acceptable use
- Payloads are processed to return completions and meter token spend — not sold and not used to train foundation models unless you explicitly enable log-retention pricing on eligible models.
- Traffic stays on Western-hosted capacity; Critique does not mirror customer prompts to non-Western training pipelines.
- Short acceptable-use copy lives on /inference-api#policy.
Billing
Inference bills $/1M input and $/1M output on the published rate card. Prepaid credits can be added from the Inference dashboard; each top-up adds a 2.5% fee. Payment checkout runs through Autumn, which owns the customer balance, hosted Stripe checkout, and payment confirmation. Configure AUTUMN_SECRET_KEY, AUTUMN_INFERENCE_TOPUP_PRODUCT_ID, and AUTUMN_INFERENCE_FEATURE_ID on the server. The feature quantity is USD cents, so the Autumn one-off plan should grant the selected quantity of inference_usd_cents. No client redirect or custom payment webhook is trusted to credit an account.
Send X-Critique-Billing: byok to use saved OpenAI, Anthropic, OpenRouter, Crof, or LLM Gateway keys. OpenAI model ids route to api.openai.com. BYOK does not debit prepaid Critique Inference credits.
Insufficient spend against an Inference USD cap returns 402 with spend_cap. Per-user caps return errors when limits block the request.
Related
- Merge Gate API — PR review queue, structured findings, webhooks
- Connections & Platform API —
crt_keys, scopes, MCP, REST v1 - Coding Agent API — full sandbox agent runs
- Models — review catalog including Hy3 and Nemotron
- Ship log — operator release notes (v6.0 Platform API and lifecycle webhooks; v5.2 Inference API)