# Agent Buyer Identity Preflight | x402 Purchase Governance

> Agent Buyer Identity Preflight | x402 Purchase Governance is a paid API for AI agents from base-agent-preflight.bytoken2023.workers.dev, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-14).

Verifies whether an AI agent's buyer role, capability type, price, and approval policy are appropriate before it purchases an x402-gated API, dataset, or tool.

## Facts

- Endpoint: GET https://base-agent-preflight.bytoken2023.workers.dev/v1/x402/agent/capability-security-preflight
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-buyer-identity-preflight-x402-purchase-governance-be06ba91
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1ruEH3L-2tjNsc8K4j5V9

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 agent-buyer-identity-preflight-x402-purchase-governance-be06ba91
```

Example prompt: Before you spend any USDC, run a preflight check on that x402 API at https://data.example.com/v1/prices — target type is 'api', identifier is 'example-prices-api' — and tell me the risk score and any flags before we proceed.

## When to prefer this

Use this endpoint specifically when an AI agent is about to make an x402 USDC payment for an API, dataset, tool, or capability and you need a governance/risk check before authorizing the spend. It is purpose-built for the x402 payment protocol and agent buyer identity scenarios, unlike generic fraud detection or OAuth authorization services. Prefer it when the purchase involves agent-to-agent or agent-to-API transactions on the Base network where policy compliance and risk scoring are required prior to payment.

## Known failure modes

- Missing required fields (target_type or identifier) returns a validation error
- Unknown or unreachable x402_url may result in incomplete provenance data
- High risk_score or non-empty flags array indicates purchase should be blocked
- Invalid domain or github_owner pattern triggers schema validation rejection
- Service may return partial assessment if external identity sources are unavailable

## How this service works

Machine-payable service intelligence for discovering, verifying, and monitoring identity, risk, authorization, execution-preflight, and evidence APIs before autonomous agents spend.

## Output

A JSON object containing a risk_level (e.g. 'low', 'medium', 'high'), a numeric risk_score, a list of flags indicating any policy violations or concerns, plus identity, activity, provenance, and assessment objects describing why the purchase was approved or flagged — all scoped to the EIP-155 Base network (eip155:8453).

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "target_type",
      "identifier"
     ],
     "properties": {
      "domain": {
       "type": "string",
       "pattern": "^(?=.{1,253}$)(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\\.)+[A-Za-z]{2,63}$"
      },
      "x402_url": {
       "type": "string",
       "pattern": "^https?://",
       "maxLength": 2048
      },
      "identifier": {
       "type": "string",
       "maxLength": 512,
       "minLength": 1,
       "description": "Human-readable package, repository, agent, API, or capability identifier."
      },
      "github_repo": {
       "type": "string",
       "pattern": "^[A-Za-z0-9._-]{1,100}$"
      },
      "npm_package": {
       "type": "string",
       "maxLength": 214,
       "minLength": 1
      },
      "npm_version": {
       "type": "string",
       "maxLength": 80,
       "minLength": 1
      },
      "openapi_url": {
       "type": "string",
       "pattern": "^https?://",
       "maxLength": 2048
      },
      "target_type": {
       "enum": [
        "agent",
        "package",
        "repository",
        "api",
        "capability"
       ],
       "type": "string",
       "description": "Capability type being evaluated."
      },
      "github_owner": {
       "type": "string",
       "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?$"
      },
      "agent_card_url": {
       "type": "string",
       "pattern": "^https?://",
       "maxLength": 2048
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "network": {
       "type": "string"
      },
      "product": {
       "type": "string"
      },
      "activity": {
       "type": "object"
      },
      "identity": {
       "type": "object"
      },
      "assessment": {
       "type": "object"
      },
      "provenance": {
       "type": "object"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "network": "eip155:8453",
  "product": "agent-capability-security-preflight",
  "assessment": {
   "flags": [],
   "risk_level": "low",
   "risk_score": 0
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-buyer-identity-preflight-x402-purchase-governance-be06ba91/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from base-agent-preflight.bytoken2023.workers.dev](https://www.zero.xyz/host/base-agent-preflight.bytoken2023.workers.dev/llms.txt)
