EdgeMask Logo
Docs
Testing

Simulation: Dry-Run Mode

Test your security rules without spending a single cent on tokens. By passing the X-EdgeMask-Mode: dry-run header, EdgeMask will intercept the request, perform redaction, and return a simulation report.

How to Enable Dry-Run

Add a single header to your request:

X-EdgeMask-Mode: dry-run

The request will be fully intercepted and analyzed, but no tokens will be consumed and no request will be forwarded to the LLM provider.

Example Request

Send a prompt containing PII data with the dry-run header.

terminal
Bash
curl -X POST https://api.edgemask.pro/v1/chat/completions \
-H "X-EdgeMask-Key: em_prod_92nd9..." \
-H "X-EdgeMask-Mode: dry-run" \
-d '{
"model": "gpt-4o",
"messages": [{"role": "user", "content": "Charging $500 to card 4532 1234 5678 9010"}]
}'

Simulation Response

EdgeMask returns a detailed analysis report instead of an LLM response.

response.json
JSON
{
"status": "intercepted",
"security_action": "masked_pii",
"entities_detected": ["CREDIT_CARD"],
"masked_prompt": "Charging $500 to card [MASKED_CC]",
"latency_saved": "350ms",
"token_cost_avoided": "$0.02"
}

Response Fields

Field
Type
Description
status
string
Always "intercepted" in dry-run mode. Indicates the request was caught by the gateway.
security_action
string
The action that would have been taken in production (e.g., masked_pii, blocked, allowed).
entities_detected
string[]
Array of PII/PHI entity types detected in the prompt (SSN, CREDIT_CARD, EMAIL, etc.).
masked_prompt
string
The prompt as it would appear after redaction, with sensitive data replaced by tokens.
latency_saved
string
Estimated latency saving if this had been a cached response.
token_cost_avoided
string
Estimated token cost that would be avoided via caching or blocking.