# AgentSpendGuard x402 Endpoint Risk Preflight API

> AgentSpendGuard x402 Endpoint Risk Preflight API is a paid API for AI agents from api-production-2800.up.railway.app, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-14).

Performs risk assessment on an x402 payment endpoint before an autonomous agent pays, returning an allow/caution/block verdict with score, reason codes, and evidence.

## Facts

- Endpoint: POST https://api-production-2800.up.railway.app/v1/x402-risk
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-production-2800-up-railway-app-1a182582
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_J1WYsmt36TLprmvaafX8g

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 api-production-2800-up-railway-app-1a182582 -d '<json body>'
```

Example prompt: Before paying that x402 API at https://api.example.com/data, run a risk preflight on it and tell me whether I should allow, caution, or block the payment — show me the risk score and any red flags like low payer count or metadata issues.

## When to prefer this

Use this endpoint when an AI agent is about to pay an unknown or first-seen x402 resource and needs a fast, structured risk verdict before committing funds. Ideal for autonomous buyer agents operating without human oversight that need a guardrail layer. Prefer this over manual checks when you need CDP Bazaar discovery status, payer history, and metadata quality bundled into a single scored verdict.

## Known failure modes

- Endpoint URL not reachable or malformed — returns error or block verdict
- x402 endpoint not found in CDP Bazaar — flagged as undiscovered, may return caution/block
- Network mismatch between specified network and endpoint's actual network — returns block with network_mismatch reason code
- Price outside expected range — returns caution or block with price_anomaly reason code
- Low or zero unique payer count — returns caution or block with low_adoption reason code
- Service unavailable — HTTP 500 or timeout from the railway.app host

## Output

A strict JSON object containing a verdict of 'allow', 'caution', or 'block'; a numeric risk score; reason codes explaining the assessment; evidence data (e.g. unique payer count, recent call volume, CDP Bazaar discovery status, price anomalies, metadata quality, network match); and suggested alternative endpoints when available.

## Example request

```json
{
 "input": {
  "body": {
   "payTo": "0x1234567890123456789012345678901234567890",
   "expectedNetwork": "eip155:8453",
   "expectedMaxPriceUsd": 100,
   "requireRecentActivityDays": 30
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-production-2800-up-railway-app-1a182582/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api-production-2800.up.railway.app](https://www.zero.xyz/host/api-production-2800.up.railway.app/llms.txt)
