Developer documentation
Build against the live contract.
Inspect canonical metadata, receive HTTP 402, authorize the exact payment requirement, and consume structured output.
Canonical sources
| Source | Use |
|---|---|
| Service metadata | Service names, endpoints, current price, input contract, output fields, and payment metadata. |
| OpenAPI | Full request/response schemas and documented HTTP behavior. |
| Pricing | Current per-request prices. |
| Health | Current service runtime state. |
Quickstart
Follow the production-ready discovery, 402, payment, and structured-result path in the Quickstart. It contains copy/paste TypeScript and Python clients driven by live metadata.
Available services
SEARCH
POST https://402agent.ai/agent402/api/v1/search
Request contract / canonical metadata
- query: string (1-2000 chars)
Response fields / canonical metadata
- results[] (title, url, snippet, source_tier)
- sources[]
- generated_at
READ
POST https://402agent.ai/agent402/api/v1/read
Request contract / canonical metadata
- url: string (http/https URL)
Response fields / canonical metadata
- title
- summary
- key_points[]
- extracted_facts[]
- source_url
VERIFY
POST https://402agent.ai/agent402/api/v1/verify
Request contract / canonical metadata
- claim: string (1-4000 chars)
Response fields / canonical metadata
- verdict (VERIFIED | NOT_VERIFIED | INSUFFICIENT_EVIDENCE | CONFLICTING_EVIDENCE)
- confidence (0-1)
- supporting_evidence[]
- contradictory_evidence[]
- sources[]
Payment flow
- Read service metadata and choose a resource.
- Send the canonical request body without the configured payment signature header.
- Use the HTTP 402 response to obtain the exact current payment requirement.
- Authorize the requirement with an x402-compatible client and retry the identical request.