# Anatomy of an API

URL: /products/api/anatomy · Id: `page:products/api/anatomy`

> An API is a published promise of Verbs on Nouns, compiled from one declaration into seven parts and served to Customers under the Startup's own name.

An API on [StartupBuilder](/code/builders/startup) is a published promise: these [Verbs](/business/nouns/verb) on these [Nouns](/business/nouns/noun), for these callers, on these terms. Every part compiles from one declaration, and StartupBuilder keeps the same promise to its own callers.

## Exploded view
Leaseline declares a `Lease` Noun and sells it from one [Product](/business/nouns/product) file, `products/pro.mdx`:

Compiled from one declaration, `products/pro.mdx`:

| Part | What you get | Compiled from |
| --- | --- | --- |
| [Routes, one per Verb](/products/api/design) | api.leaseline.app/leases | Nouns and Verbs |
| [SDK, CLI and MCP server](/products/api/your-sdks) | npm install leaseline, pip install leaseline; leaseline.app/mcp | Verbs |
| [Webhooks](/products/api/webhooks) | Lease.renewed, signed with Leaseline-Signature | the Events of each Verb |
| [Tenants and keys](/products/api/tenancy-and-identity) | One Tenant per Customer, each with test and live keys | Customers |
| [Developer tools in the Portal](/products/api/developer-portal) | leaseline.app/portal | a keyed Offer |
| [Limits, Meter and Price](/products/api/sell) | portfolio, $99 a month, API access | the Offer |
| [Reference docs](/products/api/reference) | leaseline.app/docs, with llms.txt | Nouns, Verbs and errors |
| [Errors that name the fix](/products/api/design) | leaseline.app/errors/… | the error catalog |
| [Status page](/products/api/operate) | leaseline.app/status | a Monitor on each Interface |
| [Versions](/products/api/versions) | /v1, /v2; each Tenant pinned | breaking Changes |
| [Test environment](/products/api/test-environment) | Test records, no money moved | the latest merged Change |
| [Changelog](/products/api/lifecycle) | By email, feed or webhook | every merged Change |

## Seven parts, one declaration
| Part | The question it answers | Where it comes from |
| --- | --- | --- |
| Contract | What can be called, with what input and output | Nouns and Verbs |
| Address | Where each [Interface](/business/nouns/interface) answers | A [Domain](/business/nouns/domain) and a path per Interface |
| Caller | Who calls, and for whom | Keys from [Identity](/code/platform/identity), each reaching one [Tenant](/business/nouns/tenant) |
| Terms | What a call costs and how far it goes | [Offers](/business/nouns/offer), [Meters](/business/nouns/meter) and [Limits](/business/nouns/limit) |
| Execution | What runs a call | The [Function](/business/nouns/function) behind each Verb |
| [Change](/business/nouns/change) | How the contract grows without breaking callers | Changes and [Versions](/business/nouns/version) |
| History | What happened | [Actions](/business/nouns/action) and [Events](/business/nouns/event) |

A [Startup](/business/nouns/startup) authors the Nouns, Verbs and Offers. Routes, OpenAPI, packages, errors, docs, the [Portal](/business/nouns/portal) tools and the changelog derive, and every record behind them lives in the [Database](/code/platform/capabilities/database).

## Two planes
Every Startup's API serves two kinds of caller through the same Verbs and records. They differ in address, scope and name.

| | The builder plane | The customer plane |
| --- | --- | --- |
| Who calls | The Startup's [Workers](/business/nouns/worker), tests and previews | Its [Customers](/business/nouns/customer) and their [Agents](/business/nouns/agent) |
| Address | `https://api.sb/leaseline.app` | `https://api.leaseline.app`, also `https://leaseline.app/api` |
| Packages | `startup-builder` | `leaseline` |
| Key variable | `STARTUP_BUILDER_API_KEY` | `LEASELINE_API_KEY` |
| Scope | Every Verb its [Role](/business/nouns/role) grants, across the Startup | One Tenant, within its Offer |

**As your customer**

```bash
curl "https://api.leaseline.app/leases?limit=20" \
  -H "Authorization: Bearer $LEASELINE_API_KEY"
```

**As the builder**

```bash
curl "https://api.sb/leaseline.app/leases?limit=20" \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

The [Publication](/business/nouns/publication) holds every name the customer plane shows, and the registry refuses one whose fields name the platform.

## StartupBuilder is built the same way
StartupBuilder is the Product of startups.studio, which runs as a Startup like any other. Its API at [api.sb](/code/platform/api-sb), its SDK, CLI and MCP server compile through the same projection as every Startup's.

| StartupBuilder gives founders | Each Startup gives its Customers |
| --- | --- |
| Keys with a test twin and rotation | The same keys, in the Startup's Portal |
| Usage against their Limits | Usage against each Limit of their Offer |
| A request log with the checks each call passed | Their own requests, with the same checks |
| A version pin and a changelog | A pin on the Startup's versions, and its changelog |
| The `startup-builder` packages | Packages named for the Startup |

No route is written by hand, and a tool the platform keeps for itself is a defect.

## What stays a choice
- **Who does the work.** The Function can be code, a model, an Agent or a credentialed [Human](/business/nouns/human), and callers see no difference.
- **When it ships.** A Verb can be published before any Function exists. It answers with a price, and each call counts toward building it.
- **Which shape it speaks.** An Interface can also speak a [Standard](/business/nouns/standard), such as SCIM. [Customize an API](/products/api/customize) covers each choice.