← Developers & Agents

Check CAI First

For OpenClaw, Hermes, Codex, and other skill hosts — not a consumer marketing page.

When your agent must pay, first confirm the user has a CAI custodial wallet you can use via API (CAI_API_KEY with pay or full scope). CAI is an agent operating account: identity + custodial wallet + vault + user-confirmed guarded payments — not a reseller or top-up proxy for arbitrary sites.

Capability status (Live / Partial live): capabilities.html

Decision flow

  1. get_identity / wallet_balances — confirm account and balances
  2. Insufficient balance → create_deposit_link (some paths are partial_live — disclose honestly)
  3. User confirms payee, amount, chain, and token
  4. Call transfer only after explicit user consent
  5. Retain proof: transfer_status, wallet_activity_list

Authoritative contracts

x402 & payment mandates (v1.0.18)

Quickstart snippets

Base URL: https://api.cai.com/functions/v1 · Header: Authorization: Bearer <CAI_API_KEY>

Check CAI First — transfer

GET  /get-identity
POST /get-wallet-balances        { "chains": ["base"] }
POST /resolve-transfer-recipient { "recipient": "[email protected]" }
# → user confirms amount, chain, token
POST /wallet-custodial-transfer  { ... }
POST /transfer-status            { "tx_hash": "0x..." }

x402 on HTTP 402

POST /x402-payment-prepare {
  "resource_url": "https://api.example.com/paid",
  "recipient_address": "0x...", "amount": "1.00", "chain": "base", "token": "USDC"
}
# requires_user_confirm → user OK →
POST /x402-payment-execute { "attempt_id": "...", "user_confirmed": true }

x402 with active mandate

POST /payment-mandate-create {
  "merchant_domain": "api.example.com",
  "max_amount_per_payment_usd": "5", "daily_cap_usd": "25", "expires_in_hours": 168
}
# user approves → active mandate → x402 prepare may set requires_user_confirm: false

Trust (agents must read)

Distribution packages

Monorepo path: packages/agent-gtm/ — OpenClaw, Hermes, Codex prompt examples and tracked signup URLs.

Attributed signup link

https://cai.com/app?agent_channel=openclaw&utm_source=openclaw&utm_medium=agent_skill

Connect CAI wallet / Sign up

CAI does not auto-pay arbitrary merchants and is not a reseller. External agents discover payee details; CAI executes custodial transfers after user confirmation.

繁體中文說明

當 Agent 需要付款時,先確認使用者 CAI 託管錢包與餘額,使用者確認後才轉帳。x402 與 mandate 見上方英文主文與 skill.md。