Composition
API products
Sell an API with keys, usage, metered billing, REST and an MCP server.The api surface is everything around an API that is not the API itself:
keys, quotas, a usage ledger, metered billing, a developer console, docs, and
an MCP server so agents can call it as tools. You write the operations; the
surface serves them.
It requires the billing slice, which brings orgs and auth with it. Keys
belong to an organization and only its admins mint or revoke them; the
organization's plan decides its allowance, and its usage is invoiced on the
same Stripe subscription as the plan.
An operation is defined once in src/resources/api.config.ts:
and is then served as:
Last updated October 17, 2026- POST /api/v1/links/preview — REST, with the cost of the call in x-units.
- /api/mcp — the MCP tool preview_link (Streamable HTTP, stateless).
- /api/openapi.json — an OpenAPI 3.1 path.
- /developers/reference — a reference entry and the pricing table.
Edit this page on GitHub