Agent Distribution

Pay-per-call AI inference for agents.

OpenAI-compatible. $0.001 USDC per call over x402 on Base. No API key, no subscription — your agent pays per request and settles on-chain.

POST /v1/x402/chat/completions $0.001 USDC / call Base mainnet eip155:8453 Model local:qwen3:1.7b

How it works (x402)

Clarity speaks the standard x402 v2 payment handshake. Your agent discovers the price, signs with its own Base wallet, and retries — no Clarity account required.

  1. Discover. GET /openapi.json to read the live price, network, asset, and payTo before signing.
  2. Request. POST an unpaid OpenAI-style body to the canonical endpoint.
  3. Challenge. The endpoint returns 402 + a PAYMENT-REQUIRED header describing exactly what to pay.
  4. Sign. Your agent signs the payment with its own funded Base wallet (official x402 SDK).
  5. Retry. Re-POST with the PAYMENT-SIGNATURE header and receive the completion directly.

Install the Clarity skill

Copy this prompt to your agent. It installs the machine-readable skill and teaches the agent when to use Clarity, how to discover the payment requirement, and to confirm before the first paid call.

Setup prompt

Install the Clarity skill from https://desktop-o99r0sf.tail935fba.ts.net/skills.md. Use Clarity when I need low-cost OpenAI-compatible inference. Discover the payment requirement first and confirm with me before making the first paid call unless I have already authorized a budget. Never expose private keys or wallet secrets.

The skill file lives at /skills.md and is served as text/markdown.

Quick facts

  • Endpoint — POST /v1/x402/chat/completions
  • Price — $0.001 USDC per call (1000 atomic)
  • Network — Base mainnet, eip155:8453, USDC
  • Protocol — x402 v2 (402 → PAYMENT-REQUIRED → PAYMENT-SIGNATURE → retry → completion)
  • Model — local:qwen3:1.7b, max_tokens ≤ 128

Working request example

An unpaid request returns a 402 challenge. Sign it with the official x402 SDK and retry with PAYMENT-SIGNATURE.

curl -X POST https://desktop-o99r0sf.tail935fba.ts.net/v1/x402/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model":"local:qwen3:1.7b","messages":[{"role":"user","content":"Say hello in one sentence."}]}'

# -> 402 + PAYMENT-REQUIRED (base64 JSON: network, asset, amount, payTo, resource)
# Sign with your Base wallet, then retry with header:
#   PAYMENT-SIGNATURE: <signed x402 payment>
# -> 200 + OpenAI-compatible completion

Full machine-readable contract: /openapi.json. Full skill: /skills.md.