# Bookbinding API
> Bookbinding and print-production maths as an API, computed locally and deterministically — the spine-width and imposition numbers a book designer, printer or self-publisher needs to lay out a title. The spine endpoint computes the spine width from the page count and the paper's bulk: spine = page count ÷ pages-per-inch (the printer's paper spec, typically ~400–500 for book stock), or leaves × sheet caliper, plus the cover boards — so a 250-page book on 400-PPI stock has a 0.625-inch (15.9 mm) spine. The imposition endpoint works out the binding layout: for saddle-stitch it rounds the page count up to the next multiple of four (one folded sheet is four pages) and reports the blanks to pad and the sheets; for perfect-bound or section-sewn books it gathers the pages into signatures of 8, 16 or 32 and reports the signature count, the required page total and the blank pages. Everything is computed locally and deterministically, so it is instant and private. Ideal for self-publishing, print-on-demand, book-design, prepress and printing app developers, spine-and-cover and imposition tools, and graphic-design education. Pure local computation — no key, no third-party service, instant. Page count counts both sides; PPI is the paper spec. Live, nothing stored. 2 compute endpoints. For paper weight use a paper API and for DPI/resolution a resolution API.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/bookbinding-api/..."
```

## Pricing
- **Free** (Free) — 4,850 calls/Mo, 2 req/s
- **Starter** ($5/Mo) — 47,500 calls/Mo, 6 req/s
- **Pro** ($14/Mo) — 216,000 calls/Mo, 15 req/s
- **Mega** ($43/Mo) — 1,255,000 calls/Mo, 40 req/s

## Endpoints

### Bookbinding

#### `GET /v1/imposition` — Signatures & blanks

**Parameters:**
- `page_count` (query, required, string) — Total pages Example: `130`
- `binding` (query, optional, string) — saddle-stitch or perfect Example: `perfect`
- `pages_per_signature` (query, optional, string) — Pages per signature (8/16/32) Example: `16`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bookbinding-api/v1/imposition?page_count=130&binding=perfect&pages_per_signature=16"
```

#### `GET /v1/spine` — Spine width

**Parameters:**
- `page_count` (query, required, string) — Total pages (both sides) Example: `250`
- `ppi` (query, optional, string) — Pages per inch (paper spec) Example: `400`
- `caliper_mm` (query, optional, string) — Or sheet caliper (mm)
- `cover_thickness_mm` (query, optional, string) — Cover board thickness (mm)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bookbinding-api/v1/spine?page_count=250&ppi=400"
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bookbinding-api/v1/meta"
```


---
Marketplace page: https://www.oanor.com/api/bookbinding-api
OpenAPI spec: https://www.oanor.com/api/bookbinding-api/openapi.json
