Integrate your service directly
You run an API and publish its spec. That spec is the whole integration: one command turns it into listings, one command runs a node on your own infrastructure, one record on your domain marks the listings as yours, and agents buy from them per call, paying before you serve. Your key never leaves your node; you open no accounts for your buyers and send no invoices.
1. Import the spec
git clone https://github.com/oum-dev/aioum && cd aioum/offchain && npm ci
npm run templates:generate:openapi -- https://api.example.com/openapi.json --name example
OpenAPI 3.x or Swagger 2, JSON or YAML. Every operation becomes a tool on a rest listing: path and
required query parameters are its inputs, optional ones ride only when an agent gives them, a JSON or
form body comes from the request schema's required fields, and the whole reply goes back. The spec's
securitySchemes become the key your node reads from its environment, EXAMPLE_API_KEY for an API
key or bearer token, EXAMPLE_BASIC_AUTH for basic auth. Operations group by tag, one listing each,
priced from the family's floor (--category data is the default; --price sets one price for all).
Sample inputs come from the spec's examples, defaults and enums; give the rest with
--sample latitude=52.52 or --samples file.json. An operation whose required input has no value,
needs an OAuth login or uploads a file is left out and named, so nothing goes live that cannot answer.
It writes openapi/example/<listing>.json, one per listing to read through, and
openapi/example/services.json, the file a node runs on. Each listing carries
"provider": { "domain": "api.example.com" } (the spec's server host; --domain overrides,
--no-domain omits) and "verified": false until one real call has passed:
AIOUM_TEMPLATES_DIR=./openapi/example npm run templates -- verify example-pets
The app does the same on its Earn page: Import an OpenAPI spec, the spec's URL, one row per operation with a box and a price per listing, one field for the key, a test call, Go live now on the node on that machine.
2. Set prices
priceUsdc per listing in services.json, or let a listing follow demand:
"pricing": { "base": 0.002, "max": 0.01 } raises the price a step at a time while calls queue and
lowers it when they stop (Sell a service).
Agents compare prices at every call, so a fair price wins calls and a busy one tells you to add
capacity: a second node on the same file.
3. Run one node on your infrastructure
# .env at the repository root
RPC_URL=… # the network's chain, with CHAIN_ID
OPERATOR_PRIVATE_KEY=0x… # the key that stakes, lists and settles: yours
EXAMPLE_API_KEY=… # what the spec's auth needs
DOMAIN=example.com # the node answers at https://node.example.com
AIOUM_INDEXER_URL=https://indexer.<network> # the network's directory, as the app shows it under Your network
scripts/deploy-network.sh install
SERVICES=multinode AIOUM_SERVICES_CONFIG=$PWD/offchain/openapi/example/services.json scripts/deploy-network.sh deploy
With the network's deployments.json in offchain/ (the network's app serves it at
/api/deployments), deploy writes one unit, aioum-multinode, behind TLS at node.example.com.
On boot the node stakes the operator's ZAI, registers each listing on-chain and serves it, then
announces https://node.example.com to the directory. The directory asks the node to sign a challenge
with the operator key before it maps your listings to that URL, and probes it from then on; nobody
edits a list by hand. scripts/deploy-network.sh status shows the unit and its health,
logs multinode follows it.
4. Prove the domain
npx aioum sell verify-domain api.example.com
Prints the two records that mark a listing as first-party, either one enough: a DNS TXT record
aioum-verify=<your operator address> on the domain, or
https://api.example.com/.well-known/aioum.json with { "operators": ["0x…"] }. Add one, run the
command again: verified. The directory checks on every refresh, the listings show Official on
the marketplace and on their pages, and official listings rank first among live ones. Anyone can run
a copy of a listing from the same template; only yours carries the mark.
5. Get backed, if you need to
A listing takes paid calls once 10,000 ZAI stand behind its operator. Stake it yourself, or put up
100 ZAI of your own and ask the network's staking node for the rest: npx aioum stake request <serviceId>, or Request stake on the listing's page. The review makes your sample call through
your node and reads the listing against a short rubric; on a yes the pool delegates within seconds
(Stake on an operator).
6. Watch demand
Every listing's page and card read "price up 25% today · 340 calls/h · 3 operators serve this";
npx aioum service <serviceId> prints the same record, and the directory's
GET /services/:id/demand has the price trail and the last settled sessions. A price that keeps
climbing is demand your node cannot absorb: add a node, or let the price stand.
What you earn
Buyers deposit before the first call and sign a receipt per call; your node settles once per session and the contract pays you in USDC, the backers their share, the network its fee: at the default split you keep 85% (5% network, 10% to backers). No invoices, no chargebacks, no card on file anywhere.
How agents find you
The directory carries what an agent reads to choose: your category, the tool descriptions from your spec's summaries, the price, the operator's rating from settled sessions, the stake behind it and the Official mark. An agent searches it on its own mid-run, tries a listing against its rivals and keeps what serves best, so write the spec's summaries for a reader who has one line to decide.
Next: Your private node — a node only your agents call, holding your own secrets on a box you control, with no meter on it.