AgentProof

AgentProof integration docs

Validate API responses through x402 micro-payments.

AgentProof exposes paid endpoints that AI agents can buy before acting on external API data. Use it to repair JSON, infer schemas, validate responses, and score contract stability.

Production base URL x402 on https://agentproof-murex.vercel.app

Paid endpoints

All paid endpoints return JSON and use x402 exact payments on Base USDC.

POST /json/repair$0.001

Repair malformed JSON and return parsed structured output.

POST /schema/infer$0.002

Infer a JSON Schema from one or more example responses.

POST /api/validate$0.002

Validate a response against JSON Schema and suggest safe repairs.

POST /api/contract-score$0.003

Score whether repeated API responses are stable enough for agent automation.

AgentCash flow

Do not pass --dev for this production endpoint. Discovery and check do not spend funds; fetch performs one paid retry when the endpoint returns 402.

npx -y agentcash@latest discover https://agentproof-murex.vercel.app --format json
npx -y agentcash@latest check https://agentproof-murex.vercel.app/api/validate \
  --body '{"response":{"user_id":123,"email":"a@test.com"},"schema":{"type":"object","properties":{"user_id":{"type":"string"},"email":{"type":"string","format":"email"}},"required":["user_id","email"]}}' \
  --format json
npx -y agentcash@latest fetch https://agentproof-murex.vercel.app/api/validate \
  --payment-protocol x402 \
  --payment-network base \
  --max-amount 0.002 \
  -m POST \
  -H 'content-type: application/json' \
  -b '{"response":{"user_id":123,"email":"a@test.com"},"schema":{"type":"object","properties":{"user_id":{"type":"string"},"email":{"type":"string","format":"email"}},"required":["user_id","email"]}}' \
  --format json

Curl probe

A plain POST without a payment header returns 402 Payment Required and a PAYMENT-REQUIRED header. This is expected and does not charge anything.

curl -i -X POST https://agentproof-murex.vercel.app/api/validate \
  -H 'content-type: application/json' \
  --data '{"response":{"user_id":123,"email":"a@test.com"},"schema":{"type":"object","properties":{"user_id":{"type":"string"},"email":{"type":"string","format":"email"}},"required":["user_id","email"]}}'
network eip155:8453 asset Base USDC scheme exact header PAYMENT-REQUIRED

Validate response shape

{
  "service": "AgentProof",
  "endpoint": "api.validate",
  "valid": false,
  "errors": [
    {
      "path": "/user_id",
      "keyword": "type",
      "message": "must be string",
      "expected": "string",
      "actual": "integer",
      "value": 123
    }
  ],
  "repairSuggestion": {
    "user_id": "123",
    "email": "a@test.com"
  }
}

Production notes

AgentProof is live in paid mode. The last verified paid transaction used AgentCash on Base and settled successfully.

Runtime secrets live in Vercel Environment Variables. Local .env files are excluded from deployments by .vercelignore.