API
DocketRouter exposes the catalog, the benchmark results, and a routing endpoint that picks the best model for a legal task. Base URL: https://docketrouter.ai/api/v1. Catalog and benchmark endpoints are public; inference needs a key (Authorization: Bearer dr-…) from /keys. Each key is backed by a hard-capped OpenRouter sub-key, so spend is capped per customer upstream.
GET /models
Every language model in the catalog with live pricing, context window, and its legal score if benchmarked.
curl https://docketrouter.ai/api/v1/models curl https://docketrouter.ai/api/v1/models/anthropic/claude-sonnet-4.5
GET /results
Raw run records (latest per model×task), including per-item answers. Filter with ?model= or ?task=.
curl "https://docketrouter.ai/api/v1/results?task=hallucination"
POST /route
Give a task id (or "overall") plus optional ceilings; get back the best-scoring model that fits, and the runners-up.
curl -X POST https://docketrouter.ai/api/v1/route \
-H 'content-type: application/json' \
-d '{ "task": "hallucination", "max_input_price_per_m": 5, "max_latency_ms": 3000, "min_score": 0.9 }'
// → { "model": "…", "score": 0.92, "latency_ms": 1180, "input_price_per_m": 3, "alternatives": [ … ] }hearsaycitationprocedurelimitationsclausehallucinationPOST /chat/completions
OpenAI-compatible. Drop-in for any SDK: set baseURL to https://docketrouter.ai/api/v1. By default every request is juiced: we retrieve the on-point Federal Rules, search related cases, verify any citation in the prompt against CourtListener, and inject it all before the model sees your message. The response carries the sources.
curl https://docketrouter.ai/api/v1/chat/completions \
-H "Authorization: Bearer dr-…" -H "content-type: application/json" \
-d '{
"model": "anthropic/claude-sonnet-4.5",
"messages": [{"role":"user","content":"Can I cite Varghese v. China Southern Airlines, 925 F.3d 1339 (11th Cir. 2019)?"}],
"docketrouter": { "juice": true, "rules": true, "cases": true, "verify": true }
}'
// response = standard chat.completion + usage.cost (exact) +
// "docketrouter": { "juiced": true, "sources": { "rules": [...], "cases": [...], "citations": [{ "input": "925 F.3d 1339", "status": "not_found" }] } }
# Python (openai sdk)
from openai import OpenAI
client = OpenAI(base_url="https://docketrouter.ai/api/v1", api_key="dr-…")
r = client.chat.completions.create(model="openai/gpt-5", messages=[{"role":"user","content":"How many days to answer a federal complaint?"}])Set "stream": true for SSE; the first chunk carries docketrouter.sources, the last carries usage. GET /auth/key returns your key's cap and spend; GET /usage your recent requests.
Run the suite yourself
git clone https://github.com/lawlessz/docketrouter && cd docketrouter && pnpm i # .env.local: OPENROUTER_API_KEY=… (or AI_GATEWAY_API_KEY=…) pnpm bench --models anthropic/claude-sonnet-4.5,openai/gpt-5,google/gemini-2.5-pro pnpm bench --models deepseek/deepseek-chat-v3.1 --tasks hearsay,citation --mode juiced # raw|juiced
Results land in data/results.json with per-item answers, latency and gateway-priced cost. Commit them and the site updates.