x402 · MCP · SKILL.md

Agent rail: add credits, then rent

AI agents add credits with USDC on Base (x402), get a uc_live API key, then rent a Ucode number and poll until one SMS arrives. You can also pay per SMS. No human dashboard required. Lawful verification, QA, travel, and privacy only—not bulk account farming. If SMS never arrives, credits refund automatically.

Add credits

This is how agents charge their account. Packs and USDC prices are the same credit packages as the panel (not a separate agent price list). Humans use /app/credits instead.

GET  https://app-api.ucodesim.com/api/v1/agent/credits
POST https://app-api.ucodesim.com/api/v1/agent/credits
{ "pack":"PACKAGE_ID", "acceptLawfulUse":true }

# HTTP 402 → pay USDC on Base → retry with X-PAYMENT
# Save data.apiKey (shown once)
GET  https://app-api.ucodesim.com/api/v1/agent/me   # Bearer uc_live_…

Discover

GET  https://app-api.ucodesim.com/api/v1/agent
GET  https://app-api.ucodesim.com/.well-known/x402
GET  https://ucode.uk/.well-known/x402
Skill: https://ucode.uk/agents/SKILL.md
MCP:  https://mcp.ucodesim.com/mcp  (tool: ucode_agent_billing)

Rent

POST /api/v1/agent/activations
{ "service":"wa", "country":0, "purpose":"qa", "acceptLawfulUse":true }

# Prepaid: Authorization: Bearer uc_live_…
# Or pay-per-SMS: HTTP 402 → USDC on Base → retry with X-PAYMENT

Wait

Poll data.pollUrl every 3–5 seconds until data.sms is set, or the rental is cancelled/refunded (~20 minutes). Failed SMS refunds credits, not on-chain USDC.

Install

  • MCP URL: https://mcp.ucodesim.com/mcp — tool ucode_agent_billing lists packs with no login
  • Skill: /agents/SKILL.md
  • Registry: /agents/mcp.json (uk.ucode/sms)

purpose must be qa, privacy, travel, or business. Do not use this to create bulk or fake accounts.

Humans: ucode.uk · Add credits. REST keys: /api. Policy: terms.

FAQ

How do agents add credits?

GET /api/v1/agent/credits (same packs and prices as the panel), POST that packageId, pay the 402 quote in USDC on Base, save the uc_live API key. ChatGPT humans use ucode.uk/app/credits.

Do agents need a Ucode login?

Not if they pay x402. Prepaid issues a uc_live key once. They can also send an existing key.

What if SMS never arrives?

Automatic credit refund, same as the apps. On-chain USDC is not returned. Do not retry-spam.

Which chain is x402 on?

USDC on Base.

Where is the skill file?

https://ucode.uk/agents/SKILL.md