4·2402Agent.ai
Developer documentation

Build against the live contract.

Inspect canonical metadata, receive HTTP 402, authorize the exact payment requirement, and consume structured output.

Canonical sources

SourceUse
Service metadataService names, endpoints, current price, input contract, output fields, and payment metadata.
OpenAPIFull request/response schemas and documented HTTP behavior.
PricingCurrent per-request prices.
HealthCurrent 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

  1. Read service metadata and choose a resource.
  2. Send the canonical request body without the configured payment signature header.
  3. Use the HTTP 402 response to obtain the exact current payment requirement.
  4. Authorize the requirement with an x402-compatible client and retry the identical request.