# Ordainer > Ordainer answers one question before a tool runs: may this call run? Your server sends POST https://api.ordainer.dev/v1/decide with an agent key and a tool name, and gets allow or deny. A deny is HTTP 200 with "decision": "deny"; errors are 4xx/5xx with {"error":{"code","message","request_id"}}. Ordainer is free during the beta: sign up for test keys with 1,000 decisions a month, no credit card needed. Full text: every docs page in one file at https://docs.ordainer.dev/llms-full.txt. Each page below is also plain markdown at its path with .md instead of the trailing slash, for example https://docs.ordainer.dev/api/decide.md for https://docs.ordainer.dev/api/decide/ (the home page is https://docs.ordainer.dev/index.md). Key facts for coding agents: - Auth: Authorization: Bearer . Test keys start with ord_test_. Keys stay on your server. - Plans you add in the console start in shadow mode, where plan and test-limit denies are logged as would-deny and the call still runs, until you switch the plan to enforce. The two sandbox plans you get at sign-up start in enforce. - Start in shadow mode from code so plan and test-limit denies are logged as would-deny and the call still runs: Node new Ordainer({ mode: 'shadow' }), Python Client(mode="shadow"), plain Ruby Ordainer::Client.new(mode: :shadow), Java Ordainer.builder().mode(Mode.SHADOW).build(). A pinned mode overrides the console's Enforce button. - Per-key usage caps: each agent key has its own count on a plan (a calendar month, a day, or a minute), so you can stop an agent burning a customer's API allowance without cutting off that customer's other keys. Caps are allowed decisions per plan, not money or spend. - To cap usage for an MCP server per client or per agent, call POST /v1/decide (or decide()) from the MCP tool handler over HTTP. Ordainer is not a burst rate limiter; keep a separate rate limiter for bursts. - Every decision is kept as an audit row (a replay returns the same row). Export decision history as CSV or JSON from the console (the Decisions page). - Ask the user for a test key (ord_test_); never sign up for them, and never hard-code or commit it. - Body: {"tool": ""} (1-200 characters, compared exactly). Send an Idempotency-Key header (or idempotency_key) per real operation; a retry with the same key is not counted twice. - The raw API uses snake_case (request_id, resets_at). The Node SDK result uses camelCase (requestId, resetsAt). - remaining and limit are null on a plan with no cap. Check for null before printing or doing arithmetic. - Node SDK: npm install ordainer (Node 20+). new Ordainer() reads ORDAINER_KEY and ORDAINER_BASE_URL, or pass apiKey. decide() never throws; branch on result.allowed. The console's .env download names keys ORDAINER_KEY_