USEFUL APIS FOR AI AGENTS
Contract
Validate agent output against a data contract.
Validate up to ten JSON documents against JSON Schema draft-07 or 2020-12. Returns per-document validity and actionable errors with instance paths. Runs isolated with bounded time and memory; no remote schema loading or automatic data modification.
Make this part of your workflow.
One fixed example is free. Custom work uses a clear input contract and releases the result after payment settles.
One copyable request.
POST /v1/contracts/validate
{
"schema": {
"type": "object",
"required": [
"email",
"quantity"
],
"properties": {
"email": {
"type": "string",
"format": "email"
},
"quantity": {
"type": "integer",
"minimum": 1
}
},
"additionalProperties": false
},
"documents": [
{
"email": "avery@example.com",
"quantity": 3
},
{
"email": "invalid-email",
"quantity": 0
}
]
}Send the JSON to the operation above. An x402-capable client receives the payment challenge, authorizes exactly 0.02 USDC, and retries with PAYMENT-SIGNATURE.
Keep the result.
Validation report + JSON paths
Files arrive in a JSON artifact envelope with base64 bytes, filename, MIME type, size and SHA-256. Decode the bytes to save the file. Diagnostic results arrive as structured JSON.
The same proof and normalized input retrieves the exact paid result for 30 minutes across restarts. A proof cannot unlock another request. Never create another authorization automatically after ambiguous delivery.