Inferrail

Retry it once, or send it to review.Decided, executed, recorded.

For one eligible invoice-extraction exception, Inferrail decides one permitted machine retry vs. your established human-review path, executes it, and records the resulting cost and outcome.

Decision recorddec_a5e9e3a2bca6
work_idINV-90210
failure_typelow_confidence
recommended_actionretry
retry_statussuccess
invoice content storednone
Incremental cost$0.06
Data stays in your process

Invoice content and provider credentials never reach an Inferrail-operated service — only identifiers, confidence/validation results, and cost figures.

$ pip install inferrail && inferrail ap demo

fixture-based · zero-key · runs locally · Apache-2.0

See the full contractSee the examples

Then run it locally: inferrail ap demo

Developer tools

Know what your AI work costs

Inferrail's original product: a self-hosted gateway — OpenAI-compatible (/v1/chat/completions) and Anthropic-compatible (/v1/messages, so Claude Code and other Anthropic SDK clients work too) — that turns supported traffic into local, attributable economic receipts — payload-free, without storing prompts or responses. This is the same receipt/cost substrate the AP product above builds on.

See the gateway README

Run the real hosted workflow yourself — no account needed.Not testnet — the demo is Render's free tier: no persistent disk, synthetic data only.

Self-serve sandbox

Get your own key and run it — four commands, no signup

A demo instance runs at inferrail-ap-exceptions.onrender.com — Render's free tier, with no persistent disk: every record on it is synthetic and disposable, gone on the next restart or idle spin-down, never used for real customer data. POST /v1/sandbox issues you your own short-lived, isolated API key — no account, no human in the loop. Run the four commands below, unmodified, from any machine with curl. Every response is tagged "sandbox": true; the key expires, is capped in size, and is rate-limited. Prefer zero network calls? pip install inferrail && inferrail ap demo runs the same decision engine locally instead.

curl -s -X POST https://inferrail-ap-exceptions.onrender.com/v1/sandbox

1. get a sandbox key · no account needed · the instance may take a minute to wake if it's been idle

export API_KEY=sbx_paste-your-key-here

paste the "api_key" value from step 1's response above

curl -s -X POST https://inferrail-ap-exceptions.onrender.com/v1/decisions \ -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" -d '{ "work_id": "SANDBOX-DEMO-1", "checkpoint_attempt_id": "SANDBOX-DEMO-1-checkpoint", "failure_type": "low_confidence", "confidence": 0.6, "cost_so_far_usd": "0.10", "policy_config": { "eligible_failure_types": ["low_confidence", "validation_check_failed"], "retry_floor": 0.5, "human_review_threshold": 0.75, "max_retry_cost_usd": "1.00", "decision_deadline_seconds": 86400 } }'

2. create a decision — a real policy evaluation, not canned output

curl -s -X POST https://inferrail-ap-exceptions.onrender.com/v1/decisions/SANDBOX-DEMO-1/retry-attempts \ -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" -d '{ "attempt_id": "SANDBOX-DEMO-1-attempt-1", "status": "success", "cost_usd": "0.06", "validation_passed": true, "validator_version": "ap.validator/v1" }'

3. record a retry attempt, as your own RetryAdapter would

curl -s https://inferrail-ap-exceptions.onrender.com/v1/report \ -H "Authorization: Bearer $API_KEY"

4. read your own report back — expect retry_resolved, observed_cost_complete: true

Full walkthrough, guardrails, and error cases

Self-hosted, optional

Deploy your own AP Exceptions instance

Run the AP decision/persistence/reporting steps over an authenticated HTTP API instead of a local store — isolated per API key, with rate limits and a documented crash-recovery path. Retry execution always happens in your own process, never on this service.

Deploy your own instance

Reporting

Connects to Work Economics — without sharing its ledger

AP's own retry and human-review costs can be exported in the same event shape Work Economics already uses for reporting — a same-process data export, not a shared database or a dependency on Work Economics' separate (testnet) payment flow below.

See the Work Economics connector

Experimental, testnet onlySecondary capabilities for autonomous agents.

For autonomous agents

Buy Work Economics per call

Submit payload-free economic metadata for one unit of AI work and get back a normalized cost analysis plus a commercial receipt, paid per call over x402 — no subscription, no Inferrail account.

See the Work Economics capability

Also experimental, testnet only

Coordinate a shared spending boundary

Inferrail Economic Authority lets multiple agents coordinate a caller-declared, cooperative spending boundary, paid per session over x402. Inferrail records and coordinates it within its own service only; it does not control external wallets, providers, or network spending, and is not real-world spend enforcement.

See the Economic Authority capability