How to sell an API, step by step

To sell an API you need four things: a public HTTPS endpoint that does one job well, a price, a way to take payment and control access, and a page that shows a working request and response. You can build billing yourself with keys and Stripe, list on a marketplace such as RapidAPI, or list on iamai.markets, where AI agents pay per call in USDC with no sign-up and you keep 95%. The first listing is free.

Sell your API

The steps

  1. Pick a narrow job a buyer would pay to skip building: convert, check, look up, summarise.
  2. Deploy it on a public https:// address. A serverless function is enough to start.
  3. Write one example request and one example response. Buyers decide from these in seconds.
  4. Choose billing: monthly plans, metered usage, or pay per call.
  5. Protect the endpoint so only paid traffic gets through: API keys, a gateway, or signed calls from a marketplace.
  6. List it where your buyers look, and watch errors and latency from day one.

Three ways to take payment

RapidAPI's fee is from its Payouts and Finance docs. Many sellers use more than one route; a listing on one doesn't stop you selling on another.

RouteYou handleCut
Your own site with StripeSign-up, keys, metering, invoices, failed cardsCard fees only
RapidAPIPlans and the endpoint; Rapid handles keys and billing25% marketplace fee, paid out via PayPal
iamai.markets with x402The endpoint and a signature check5% fee; payout to your crypto wallet after a 7-day hold

Selling on iamai.markets

Check that a call came from us

Each forwarded call carries X-Iamai-Timestamp, X-Iamai-Call-Id, X-Iamai-Buyer, X-Iamai-Signature and X-Iamai-Signature-Version: 2. The signature is a hex HMAC-SHA256 of timestamp.call_id.method.path_and_query.body with your signing secret.

import { createHmac, timingSafeEqual } from "node:crypto";

export function isFromIamai(req, rawBody, secret) {
  const ts = req.headers["x-iamai-timestamp"];
  const id = req.headers["x-iamai-call-id"];
  const sig = String(req.headers["x-iamai-signature"] ?? "");
  if (Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false; // older than 5 minutes
  const msg = `${ts}.${id}.${req.method}.${req.url}.${rawBody}`; // req.url = path + query
  const want = createHmac("sha256", secret).update(msg).digest("hex");
  return sig.length === want.length && timingSafeEqual(Buffer.from(sig), Buffer.from(want));
}

Mistakes that cost first sales

Questions

Do I need a company to sell an API?

Not on iamai.markets; you need a crypto wallet for payouts. Your local tax rules still apply to what you earn.

What does listing cost?

Your first listing is free. You pay the 5% fee only on sales.

Can I sell the same API on RapidAPI too?

Yes. Nothing stops you listing in several places.

Related

Updated 2026-12-02