Ship an API
Say "sell renewal dates as an API" and get routes, keys, an SDK, a CLI, an MCP server, reference docs and metered billing on Stripe.
An API is an Interface on the Verbs you choose, sold through a metered Offer.
Needs Offer
What you get
- 1API at api.leaseline.app, one route per VerbInterface
- 1OpenAPI document, SDK, CLI and MCP server under your nameInterface
- 1reference docs and changelog on your domainSite
- 1key screen and request log in the customer PortalPortal
- 1Meter that counts calls per customerMeter
- 1plan priced per call, with what it includesOffer
- 1per-call price set up on StripePrice
- 1usage reported each hour and billed each monthMeter
Your agent does
You, to your agent
Sell renewal dates as an API, a cent per call.
Give developers keys to read their leases.
Let agents call my product.
# 1. Interface.create
curl -X POST https: //api.sb/ leaseline.app/ interfaces \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"kind": "api", "path": "/v1"}'
# 2. Offer.publish
curl -X POST https: //api.sb/ leaseline.app/ offers/ offer_api_per_call/ publish \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
import { $ } from 'startup-builder'
await $.Interface.create({ kind: 'api', path: '/v1' })
await $.Offer.publish({ offer: 'offer_api_per_call' })
npx startup-builder do Interface.create --json '{"kind": "api", "path": "/v1"}'
npx startup-builder do Offer.publish --json '{"offer": "offer_api_per_call"}'
{
"name": "do",
"arguments": {
"code": "await $.Interface.create({ kind: 'api', path: '/v1' })\nreturn await $.Offer.publish({ offer: 'offer_api_per_call' })"
}
}
Change it
- Give every key 1,000 free calls a month.
- Add a $49 plan with 10,000 calls included.
- Rate-limit the free plan to 10 calls a second.
Under the hood
- Systems
- Customer access, Billing, Changelog
- Nouns
- Interface, Offer, Meter, Entitlement
- Events
Interface.created,Offer.published- Stripe objects
Product,Price,Billing Meter,Meter Event