10 FREE TODAY SIGN IN →

API

One endpoint, your wallet

Call the estimator from your own tools. Authenticate with an API key; an exact-match estimate spends one credit from the same balance as the web app — broader-category and no-data reads are free.

Authentication

Pass your key as a bearer token (or the X-API-Key header).

Authorization: Bearer csk_your_key_here

POST /estimate

Body: title (string) and optional body (string).

curl -X POST https://estimate.codershack.com/estimate \
  -H "Authorization: Bearer csk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"title": "Add rate limiting to the public API", "body": ""}'
const r = await fetch("https://estimate.codershack.com/estimate", {
  method: "POST",
  headers: {
    "Authorization": "Bearer csk_your_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ title: "Add rate limiting to the public API", body: "" }),
});
const decision = await r.json();

Response

The raw decision: shape, route, escalate, judgment_score, forecast, rationale. The forecast carries cost_usd, success_prob (smoothed — never a bare 0 or 1), success_prob_range (a 90% interval; its width is the sample-size signal), support_n, and basis — which bucket the numbers came from: exact (your task's own shape), ancestor (a broader category), neighbors, or none.

{
  "shape": "build/small/docs",
  "route": { "model": "", "reasoning": "", "why": "" },
  "escalate": false,
  "forecast": {
    "cost_usd": 0.12,
    "success_prob": 0.83,
    "basis": "exact",
    "success_prob_range": [0.65, 1.0],
    "support_n": 6
  },
  "rationale": "routed default; forecast from build/small/docs (n=6, exact match)"
}

Credits & limits

A request is billed one credit only when basis is exact — i.e. we have measured your task's own shape. ancestor, neighbors and none are always free. Out of credits on an exact-match call returns 402 insufficient_credits. An invalid or revoked key returns 401 invalid_api_key.