Repair malformed JSON and return parsed structured output.
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.
Paid endpoints
All paid endpoints return JSON and use x402 exact payments on Base USDC.
Infer a JSON Schema from one or more example responses.
Validate a response against JSON Schema and suggest safe repairs.
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"]}}'
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
Runtime secrets live in Vercel Environment Variables. Local .env files are excluded from deployments by .vercelignore.