Quickstart
Sell your API to AI agents
Coinlight puts an x402 paywall in front of any HTTP API. You don't write code or install an SDK. Agents pay USDC per call, and you keep 98.5%.
Sell your API in 2 minutes
- Paste one of these into the box on the home page:
- your OpenAPI or Swagger URL, e.g.
https://api.you.com/openapi.json - your API's base URL. We check
/openapi.json,/swagger.jsonand other common paths for you - raw OpenAPI JSON or YAML
- any single URL. With no spec, it becomes one route, and sub-paths and query strings are forwarded
- your OpenAPI or Swagger URL, e.g.
- Price each route. We suggest a price from what each route does: a status check costs less than a generation call. Untick routes you don't want to sell.
- Connect wallet & publish. Phantom, Solflare or Backpack signs a free message. There is no transaction and no email. That wallet receives your USDC.
Each route goes live right away at its own URL, like https://coinlight-app.vercel.app/p/your-api-get-forecast-1a2b3c. You also get a public page and an MCP server.
How routes and parameters work
Each imported operation becomes a separate paid endpoint with its own price, listing and x402 discovery schema. The buyer's request is forwarded to base URL + path.
- Path parameters like
/forecast/{city}are passed as query parameters:?city=paris. - Query parameters and JSON bodies are forwarded unchanged.
- The HTTP method must match the spec. A wrong method gets
405, and the buyer isn't charged. - Upstream responses are capped at 1 MB and 20 seconds. Redirects are not followed.
Protect your origin by keeping it unlisted, or by checking a secret query parameter you include in the base URL. Credentials in URLs (user:pass@) are rejected.
Pricing, fees and payouts
- Prices range from $0.005 to $100 per call, in USDC.
- Fee: 1.5% of paid calls. Unpaid probes, failed calls and refused calls cost nothing. For comparison, Gatefare takes 10%.
- Solana payments settle to a Coinlight escrow, and your 98.5% is sent to your wallet automatically by a daily payout run once you have $0.10 or more pending. Every payout is recorded with its transaction, so you can audit it in your dashboard.
- Change a price or remove an endpoint at any time from the dashboard.
How agents pay
Any x402 client works. The first request returns 402 with the price, and the client signs a USDC payment and retries:
curl -i "https://coinlight-app.vercel.app/p/solana-token-safety?mint=DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263" # HTTP/1.1 402 Payment Required # payment-required: <base64 x402 v2 requirements>
// npm i @x402/fetch @x402/svm
import { wrapFetchWithPayment } from "@x402/fetch";
const paidFetch = wrapFetchWithPayment(fetch, client); // client = x402Client with your Solana signer
const res = await paidFetch("https://coinlight-app.vercel.app/p/solana-token-safety?mint=DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263");
console.log(await res.json());The buyer is only charged when your API answers. If your upstream errors or times out, the payment never settles.
Your MCP server
Every seller gets a remote MCP server (Streamable HTTP) at https://coinlight-app.vercel.app/mcp/<your-handle>. Each endpoint is a tool with its input schema. An unpaid tool call returns the x402 payment requirements. MCP clients with an x402 wallet sign the payment and pass it back as the payment argument.
{
"mcpServers": {
"my-api": { "url": "https://coinlight-app.vercel.app/mcp/<your-handle>" }
}
}Revenue dashboard
The dashboard shows gross sales, fees, net earnings, what has been paid out and what is pending, plus a 30-day chart. It has a per-endpoint table with paid calls, unpaid 402 probes and failures, and the latest payments with links to the on-chain transactions.
API for agents
Everything in the UI is also available as typed JSON, so an agent can onboard and manage a seller account end to end.
| POST /api/import/preview | { input } (URL, host or spec text) → detected routes with suggested prices |
| POST /api/auth/siws/nonce | { address } → { nonce, message } to sign with the wallet |
| POST /api/auth/siws/verify | { address, nonce, signature (base58) } → session cookie; send it as Authorization: Bearer <session> |
| POST /api/import/publish | { service, baseUrl, routes[] } → live endpoints, seller page, MCP URL |
| GET /api/dashboard | your totals, 30-day series, per-endpoint stats, recent payments, payout status |
| PATCH / DELETE /api/endpoints/:id | change a price { priceUsd } or remove an endpoint |
| GET /api/sellers/:handle | public seller profile and endpoints |
| GET /api/catalog | every public Coinlight endpoint |
| GET /openapi.json · /.well-known/x402 | OpenAPI 3.1 and x402 discovery for all paid routes |
| POST /mcp/:handle | seller MCP server; with your Bearer session it adds the free coinlight_seller_dashboard tool |
# Agent onboarding in three calls (after signing in with SIWS)
curl -s -X POST https://coinlight-app.vercel.app/api/import/preview -H 'content-type: application/json' \
-d '{"input":"https://api.you.com/openapi.json"}' > preview.json
curl -s -X POST https://coinlight-app.vercel.app/api/import/publish -H "authorization: Bearer $SESSION" \
-H 'content-type: application/json' -d @publish.json
curl -s https://coinlight-app.vercel.app/api/dashboard -H "authorization: Bearer $SESSION"What's protected
- Sign-in uses only a wallet signature (SIWS). Coinlight never asks for a seed phrase or private key.
- Upstreams on private networks and cloud metadata addresses are refused.
- Payouts are idempotent: each payment is recorded once in a ledger and paid at most once.
FAQ
- Do I need a spec?
- No. A plain URL works. A spec just gives each route its own listing and input schema.
- Which chains?
- Imported endpoints accept USDC on Solana mainnet. Base is coming to the importer.
- Can agents find my API?
- Yes. Every endpoint carries x402 Bazaar discovery metadata and appears in /openapi.json and /.well-known/x402, and your public page is indexable.