AP invoice exception recovery
For teams running invoice extraction. When one eligible extraction fails, decide whether it gets one permitted machine retry or goes to your existing human-review path. Run it, then record what it cost and how it ended.
A separate capability built on the same payload-free receipts as the gateway. It has its own module and storage, and shares no code path with the gateway.
Try the sandbox
Four commands, no signup. Run them unchanged from any machine with curl.
The demo instance runs on free-tier hosting with no persistent disk. Every record on it is synthetic and disposable, gone after a restart or an idle spin-down, and never used for real customer data. Your key is short-lived, isolated, capped, and rate-limited, and every response is tagged "sandbox": true. If it has been idle, the first request can take a minute. Prefer zero network calls? pip install inferrail && inferrail ap demo runs the same decision engine locally.
-
1. Get a sandbox key
curl -s -X POST https://inferrail-ap-exceptions.onrender.com/v1/sandboxNo account needed.
-
2. Save the key
export API_KEY=sbx_paste-your-key-herePaste the
"api_key"value from step 1's response. -
3. Create a decision
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 } }'A real policy evaluation, not canned output.
-
4. Record a retry attempt
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" }'As your own RetryAdapter would.
-
5. Read your report
curl -s https://inferrail-ap-exceptions.onrender.com/v1/report \ -H "Authorization: Bearer $API_KEY"Expect
retry_resolvedandobserved_cost_complete: true.
Go further
Deploy your own AP instance
Run the decision, persistence, and 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. Retries always run in your own process, never on this service.
Deploy your own instanceThe full contract
Supported failure types, the retry method and its cost boundary, the validation contract, the human-review handoff, versioned policy config, persistence and idempotency, and the report.
See the full contract