# x402 Guard Pre-Request Validator

> x402 Guard Pre-Request Validator is a paid API for AI agents from x402-agent-suite-production.up.railway.app, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-15).

Validates and gates HTTP requests (GET, HEAD, DELETE) before x402 payment settlement, returning an allow/deny decision with a summary.

## Facts

- Endpoint: POST https://x402-agent-suite-production.up.railway.app/api/guard/pre-x402
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-guard-pre-request-validator-dfc6f22f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8Js47-POGGLeJ0NLMYzYD

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402-guard-pre-request-validator-dfc6f22f -d '<json body>'
```

Example prompt: Before my agent sends a GET request to that paid API, run the x402 guard check on it to see if it's allowed — I don't want to waste USDC if the request will be blocked.

## When to prefer this

Use this endpoint when you need to pre-screen an HTTP GET, HEAD, or DELETE request before committing to an x402 micropayment settlement — particularly in agentic pipelines where you want to avoid wasting USDC on requests that will be rejected downstream. Prefer this over post-hoc validation when operating in cost-sensitive or high-throughput agent fleet scenarios.

## Known failure modes

- Missing required `input.type` or `input.method` fields returns a 400 validation error
- Unsupported HTTP method (e.g. POST or PUT) in the method enum returns a validation error
- Payment not settled or x402 header missing may result in a 402 Payment Required response
- Malformed request body returns a schema validation error
- Service unavailability on Railway returns 503

## How this service works

24 paid x402 infrastructure APIs for AI agent fleets: buy advisor, audition coach, guard, proxy, MPP, attestations, and pipeline orchestration.

## Output

A JSON object with three fields: `ok` (boolean indicating the guard ran successfully), `allowed` (boolean indicating whether the request is permitted to proceed), and `summary` (a human-readable string explaining the allow or deny decision).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "ok",
      "allowed",
      "summary"
     ],
     "properties": {
      "ok": {
       "type": "boolean"
      },
      "allowed": {
       "type": "boolean"
      },
      "summary": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "allowed": true,
  "summary": "Paid response after x402 settlement"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-guard-pre-request-validator-dfc6f22f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-agent-suite-production.up.railway.app](https://www.zero.xyz/host/x402-agent-suite-production.up.railway.app/llms.txt)
