The simulation endpoint lets you test how a policy would respond to financial actions without writing anything to the database. No checks are logged, no violations are recorded, no duplicate guard fingerprints are stored. This is useful for:Documentation Index
Fetch the complete documentation index at: https://spendguard.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
- Testing a new policy before going live
- Previewing how rule changes would affect decisions
- Running the live demo on the SpendGuard website
- Training AI agents without generating audit noise
Two Modes
| Mode | Auth Required | Max Actions | Response Field |
|---|---|---|---|
| Demo | No | 10 per request | "mode": "demo" |
| Authenticated | Yes (X-API-Key) | 100 per request | "mode": "simulation" |
Demo Mode (No Auth)
Perfect for trying SpendGuard without signing up. No API key needed.Demo Limits
- Maximum 10 actions per request
- Rate limited to 10 requests per minute per IP address
- If you exceed 10 actions, you’ll get a
422error with codedemo_limit_exceeded
Authenticated Mode
Send your API key and you can simulate up to 100 actions per request."mode": "simulation" instead of "mode": "demo".
What Simulation Does and Doesn’t Do
Real Check (POST /v1/checks) | Simulation (POST /v1/simulate) | |
|---|---|---|
| Runs rule engine | Yes | Yes |
| Runs duplicate guard | Yes (reads + writes) | Yes (reads only) |
| Resolves action_type via classifier | Yes | Yes |
| Writes to checks table | Yes | No |
| Writes to violations table | Yes | No |
| Writes duplicate fingerprint | Yes | No |
| Returns decision | Yes | Yes |
In-Batch Duplicate Detection
If you submit the same action twice within a single simulation batch, SpendGuard detects the duplicate within the batch. The second identical action returns block withreason_code: "duplicate_action_detected".
This mirrors how the real duplicate guard would behave if both actions were submitted in quick succession.
Summary Object
Every simulation response includes asummary with aggregate counts: