Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: agents.u.cash Prime API
version: 0.7.3
description: 'Agent + merchant product surface for the 402 Online Protocol - multi-coin, non-custodial HTTP-402 payments. Two-sided: sell (get paid to your own wallet) and buy (pay for resources). UCP (ucp.dev) discovery + multi-item mixed-currency checkout sessions + AP2 mandates + RFC 9421-signed responses. Live reference implementation; protocol spec at https://402.onl. INPUT CONTRACTS (all authenticated writes): unknown keys are rejected with 400 uxc_unknown_param listing the Allowed keys; wrong shapes are rejected with 400 uxc_invalid_request naming the field and expected shape; booleans must be true/false (or "true"/"false"); updates are true partials (unsent fields keep their values). Supported assets (grouped; the engine master list): Bitcoin (BTC, +Lightning), Ethereum (ETH), Solana (SOL), Tron (TRX), XRP, Dogecoin (DOGE), Litecoin (LTC), Bitcoin Cash (BCH), Algorand (ALGO), Monero (XMR), Polkadot (DOT), Stellar (XLM), Tezos (XTZ), Polygon (POL), Avalanche (AVAX), BNB Chain (BNB), Toncoin (TON); Base, Arbitrum, Optimism, Linea, Mantle, Berachain, Sonic, Unichain, World, Monad, Plasma, Abstract, Scroll, Ink, Hyperliquid (native gas + ETH-bridged), Robinhood Chain (native gas + ALL 194 issuer-listed tokenized-asset rails; featured set in pickers, u.cash/tokenized-assets for the full list), Arc (Circle L2, native USDC gas); USDT (Ethereum / BSC / Tron), USDC (Ethereum / native on Arc), and USDC-on-Base (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) - the x402 gasless rail; UCASH (Ethereum ERC-20, 0x92e52a1A235d9A103D970901066CE910AAceFD37) - also the non-withdrawable fee-credit unit; Any ERC-20 / BEP-20 / Base-20 / Polygon-20 / Arb-20 / Op-20 / Avax-20 / Linea / Mantle / Sonic / Bera / ... / TRC-20 / SPL / TON Jetton / Robinhood-20 / Arc-20 added via POST /v1/custom-tokens (auto-detected on-chain like any coin)'
contact:
url: https://github.com/UdotCash/agents
servers:
- url: https://agents.u.cash
description: agents.u.cash
tags:
- name: Prime
description: 'Member-consented access to prime.u.cash: link claim, champion roster and sheets, act/explore/games/pvp/tournaments/studio/inventions writes, quests + feed reads. Scopes: prime.read, prime.characters.read, prime.characters.act, prime.explore.act, prime.games.act, prime.pvp.act, prime.pvp.wager, prime.tournaments.act, prime.tournament.entry, prime.inventions.propose, prime.studio.spend, prime.feed.read. UNITS/day spend grants (studio, pvp wagers, heat entries) fail closed; agent-attributed play earns a reduced UNITS rate with full training and XP.'
paths:
/v1/prime/link:
post:
tags:
- Prime
summary: Claim a member's one-time prime link code (minted at prime.u.cash/agents-link)…
security:
- ApiKey: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- code
properties:
code:
type: string
description: the pl-... one-time code
responses:
'200':
description: '{link_id, consumer_id, scopes:[...]}'
'404':
description: no such code
'409':
description: code already claimed/revoked
'410':
description: code expired
operationId: postV1PrimeLink
x-operation-id-source: derived
/v1/prime/me:
get:
tags:
- Prime
summary: 'The linked member summary: memberships, highest tier, champion roster.'
security:
- ApiKey: []
responses:
'200':
description: '{link_id, consumer_id, scopes, memberships, highest_tier, champions, roster, since}'
'403':
description: no active link or missing scope
operationId: getV1PrimeMe
x-operation-id-source: derived
/v1/prime/characters:
get:
tags:
- Prime
summary: 'Full champion sheets of the linked member: stats, skills, chronicle, location…'
security:
- ApiKey: []
responses:
'200':
description: '{count, characters:[...]}'
operationId: getV1PrimeCharacters
x-operation-id-source: derived
/v1/prime/character:
get:
tags:
- Prime
summary: One full champion sheet (?id=N, must belong to the linked member).
security:
- ApiKey: []
parameters:
- name: id
in: query
required: true
schema:
type: integer
responses:
'200':
description: the champion sheet
'404':
description: not on this link
operationId: getV1PrimeCharacter
x-operation-id-source: derived
/v1/prime/act:
post:
tags:
- Prime
summary: 'Act for the linked member: {action: train|travel|mission-start|mission-claim…'
security:
- ApiKey: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- action
properties:
action:
type: string
enum:
- train
- travel
- mission-start
- mission-claim
character_id:
type: integer
stat:
type: string
galaxy:
type: string
mission_id:
type: integer
run_id:
type: integer
responses:
'200':
description: action result
'402':
description: insufficient training points
'403':
description: scope missing or champion not on this link
operationId: postV1PrimeAct
x-operation-id-source: derived
/v1/prime/explore:
get:
tags:
- Prime
summary: 'The Atlas catalog: nodes (galaxy, danger, caps), the member fragments…'
security:
- ApiKey: []
responses:
'200':
description: '{nodes:[...], fragments:[...], progress, scanning:[...]}'
operationId: getV1PrimeExplore
x-operation-id-source: derived
post:
tags:
- Prime
summary: 'Atlas actions: {action: scan|claim, slug?, character_id?}.'
security:
- ApiKey: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- action
properties:
action:
type: string
enum:
- scan
- claim
slug:
type: string
character_id:
type: integer
responses:
'200':
description: '{scan_sec} | the claim find'
operationId: postV1PrimeExplore
x-operation-id-source: derived
/v1/prime/games:
get:
tags:
- Prime
summary: The trial catalog with ceilings, caps, and the member standing (pick slugs…
security:
- ApiKey: []
responses:
'200':
description: '{games:[{slug, kind, max_plausible, plays_per_day, my_best, ...}]}'
operationId: getV1PrimeGames
x-operation-id-source: derived
post:
tags:
- Prime
summary: 'Arcade trials through the member pipeline: {action: start|finish, slug…'
security:
- ApiKey: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- action
properties:
action:
type: string
enum:
- start
- finish
slug:
type: string
token:
type: string
events:
type: array
responses:
'200':
description: '{token, rounds} | {score, rewards}'
operationId: postV1PrimeGames
x-operation-id-source: derived
/v1/prime/studio:
get:
tags:
- Prime
summary: The linked member's Forge jobs
security:
- ApiKey: []
responses:
'200':
description: '{jobs:[...]}'
operationId: getV1PrimeStudio
x-operation-id-source: derived
post:
tags:
- Prime
summary: 'Forge media: {action: quote|order, slug, quote?, opts?, character_id?}.'
security:
- ApiKey: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- action
- slug
properties:
action:
type: string
enum:
- quote
- order
slug:
type: string
quote:
type: string
opts:
type: object
character_id:
type: integer
responses:
'200':
description: '{price_units, quote} | {jti, state}'
'402':
description: grant-ceiling or insufficient
operationId: postV1PrimeStudio
x-operation-id-source: derived
/v1/prime/inventions:
get:
tags:
- Prime
summary: The linked member's inventions
security:
- ApiKey: []
responses:
'200':
description: '{inventions:[...]}'
operationId: getV1PrimeInventions
x-operation-id-source: derived
post:
tags:
- Prime
summary: 'Propose an invention: 2+ owned lore fragments + 1+ learned skill + a thesis.'
security:
- ApiKey: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- name
- thesis
- fragment_ids
- skills
properties:
name:
type: string
thesis:
type: string
character_id:
type: integer
fragment_ids:
type: array
items:
type: integer
skills:
type: array
items:
type: string
responses:
'200':
description: '{invention_id, review:{verdict,...}}'
operationId: postV1PrimeInventions
x-operation-id-source: derived
/v1/prime/pvp:
get:
tags:
- Prime
summary: The Crucible ladder and the duels involving the linked member.
security:
- ApiKey: []
responses:
'200':
description: '{ladder:[...], challenges:[...]}'
operationId: getV1PrimePvp
x-operation-id-source: derived
post:
tags:
- Prime
summary: 'Duels: {action: create|accept|decline|cancel, defender_character_id?…'
security:
- ApiKey: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- action
properties:
action:
type: string
enum:
- create
- accept
- decline
- cancel
defender_character_id:
type: integer
wager_units:
type: integer
challenge_id:
type: integer
character_id:
type: integer
responses:
'200':
description: '{challenge_id, ...} | the resolved duel'
'402':
description: wager-grant-ceiling
'403':
description: not-your-duel (defender law)
operationId: postV1PrimePvp
x-operation-id-source: derived
/v1/prime/tournaments:
get:
tags:
- Prime
summary: Open arcade heats with live boards and the member entry state.
security:
- ApiKey: []
responses:
'200':
description: '{tournaments:[{slug, game, entry_units, board:[...]}]}'
operationId: getV1PrimeTournaments
x-operation-id-source: derived
post:
tags:
- Prime
summary: 'Enter a heat: {action: enter, slug}.'
security:
- ApiKey: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- action
- slug
properties:
action:
type: string
enum:
- enter
slug:
type: string
character_id:
type: integer
responses:
'200':
description: '{escrow_id, entry_units}'
'402':
description: entry-grant-ceiling
operationId: postV1PrimeTournaments
x-operation-id-source: derived
/v1/prime/quests:
get:
tags:
- Prime
summary: The quest board, streaks, and the running season, recomputed live.
security:
- ApiKey: []
responses:
'200':
description: '{quests:[...], streaks:{...}, season:{...}}'
operationId: getV1PrimeQuests
x-operation-id-source: derived
/v1/prime/feed:
get:
tags:
- Prime
summary: 'The activity feed: everything this link agent did (?since_id=&limit=), one…'
security:
- ApiKey: []
parameters:
- name: since_id
in: query
schema:
type: integer
- name: limit
in: query
schema:
type: integer
responses:
'200':
description: '{events:[...], last_id}'
operationId: getV1PrimeFeed
x-operation-id-source: derived
components:
securitySchemes:
ApiKey:
type: apiKey
in: header
name: X-Api-Key
description: The api_key from POST /v1/signup.