# Quietforge Book Typesetter

> Quietforge Book Typesetter is a paid API for AI agents from qf-api.quietforge-studio.workers.dev, paid per call via x402, $7.99/call, status unknown (last checked 2026-10-11).

Converts a prose manuscript (plain text or Markdown) into a KDP-ready interior PDF and editable DOCX, with full book front-matter, chapter detection, and configurable trim size.

## Facts

- Endpoint: POST https://qf-api.quietforge-studio.workers.dev/v1/typeset?utm_source=zero.xyz
- Price: $7.99/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/quietforge-book-typesetter-6bfd2f77
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KnRakVHWmGl59pag--3EL

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability quietforge-book-typesetter-6bfd2f77 -d '<json body>'
```

Example prompt: Typeset my novel 'The Long Field' by Jane Doe — here's the full manuscript text — into a 6x9 KDP-ready interior PDF and DOCX, with a table of contents, chapter numbers as roman numerals, and the label 'Chapter' before each number.

## When to prefer this

Choose this endpoint when you need a fully formatted, print-ready book interior PDF (and/or DOCX) from a raw prose manuscript without signing up for a service or managing API keys. It is especially well-suited for KDP (Kindle Direct Publishing) self-publishing workflows where you need correct trim sizes, embedded fonts, front-matter pages (dedication, epigraph, copyright, TOC), and a simultaneously usable DOCX — all in one pay-per-call step with no subscription.

## Known failure modes

- Manuscript too large (over 1.2M characters) — request rejected with 400
- Invalid trim size enum value — validation error returned
- Missing required fields (title, manuscript) — 400 bad request
- Payment not received or insufficient USDC — 402 Payment Required
- Chapter detection fails if headings don't match expected patterns — chapters may be merged or split unexpectedly
- Very long manuscripts may time out on the Cloudflare Workers runtime — partial or no response

## How this service works

Pay-per-call document conversion, PDF text extraction, headless-browser rendering of a URL or HTML to PNG / JPEG / PDF, a health-probed directory of x402 pay-per-call endpoints, a sudoku generator (solver-verified, technique-graded puzzles as JSON or a print-ready A4/Letter book), a book typesetter (prose manuscript to a KDP-ready interior PDF + editable docx), a crossword generator (verified freeform grid from your clue/answer pairs as JSON or print-ready PDFs), a family tree chart layout engine (descendant / ancestor / hourglass charts from people+families JSON or a GEDCOM file, as verified layout JSON or print-ready poster and tiled PDFs), and a dataset quality audit tool (duplicates, missing values, type consistency, class imbalance, numeric outliers and PII-pattern counts for a CSV/JSON dataset, as JSON or a one-page PDF summary). Payment: x402 (USDC on Base). No signup, no API key.

## Output

A base64-encoded ZIP archive containing: a KDP-ready interior PDF (named by title and trim size), an editable DOCX, a LAYOUT-REPORT.md with typesetting details, and a build.json with metadata. The JSON envelope also reports page count, word count, chapter count, chapter start positions, font embedding status, margin measurements, elapsed time, and any layout warnings.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "toc": {
   "type": "boolean",
   "description": "include a contents page (default true)"
  },
  "trim": {
   "enum": [
    "5x8",
    "5.25x8",
    "5.5x8.5",
    "6x9",
    "A5"
   ],
   "type": "string",
   "description": "default 6x9"
  },
  "title": {
   "type": "string",
   "maxLength": 200
  },
  "author": {
   "type": "string",
   "maxLength": 200
  },
  "format": {
   "enum": [
    "txt",
    "md"
   ],
   "type": "string",
   "description": "txt (default) or md"
  },
  "also_by": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 120
   },
   "maxItems": 12
  },
  "epigraph": {
   "type": "string",
   "maxLength": 400
  },
  "subtitle": {
   "type": "string",
   "maxLength": 200
  },
  "copyright": {
   "type": "object",
   "properties": {
    "year": {
     "type": "integer"
    },
    "extra": {
     "type": "string",
     "maxLength": 400
    },
    "holder": {
     "type": "string",
     "maxLength": 200
    },
    "fiction": {
     "type": "boolean"
    },
    "public_domain": {
     "type": "boolean"
    },
    "first_published": {
     "type": "string",
     "maxLength": 20
    }
   }
  },
  "font_size": {
   "type": "number",
   "maximum": 13,
   "minimum": 9.5,
   "description": "body size in pt, default 11"
  },
  "dedication": {
   "type": "string",
   "maxLength": 200
  },
  "manuscript": {
   "type": "string",
   "maxLength": 1200000,
   "description": "The whole manuscript as plain text or markdown. Chapters: 'Chapter N', 'CHAPTER N', '# Title', a roman numeral line ('IV.') or a bare Prologue/Epilogue line; scene breaks: '* * *' or '#'; *italic* and **bold**; one blank line between paragraphs (hard-wrapped lines are joined)."
  },
  "about_author": {
   "type": "string",
   "maxLength": 2000
  },
  "include_docx": {
   "type": "boolean",
   "description": "default true"
  },
  "smart_quotes": {
   "type": "boolean",
   "description": "default true"
  },
  "chapter_label": {
   "type": "string",
   "maxLength": 20,
   "description": "word before the number, default 'Chapter'; '' for none"
  },
  "chapter_numbers": {
   "enum": [
    "words",
    "roman",
    "arabic",
    "none"
   ],
   "type": "string",
   "description": "'Chapter One' / 'I' / '1' / none"
  },
  "epigraph_source": {
   "type": "string",
   "maxLength": 100
  },
  "running_head_recto": {
   "enum": [
    "chapter",
    "title"
   ],
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "trim": "6x9",
  "bytes": 380000,
  "files": [
   "The-Long-Field-interior-6x9.pdf",
   "The-Long-Field-interior.docx",
   "LAYOUT-REPORT.md",
   "build.json"
  ],
  "pages": 98,
  "title": "The Long Field",
  "words": 32310,
  "chapters": 17,
  "warnings": [],
  "elapsed_ms": 2600,
  "content_type": "application/zip",
  "chapter_starts": [
   [
    "I. Introduction",
    9
   ],
   [
    "II. The Machine",
    15
   ]
  ],
  "content_base64": "UEsDBBQ...",
  "fonts_embedded": true,
  "inside_margin_in": 0.5,
  "outside_margin_in": 0.625
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/quietforge-book-typesetter-6bfd2f77/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from qf-api.quietforge-studio.workers.dev](https://www.zero.xyz/host/qf-api.quietforge-studio.workers.dev/llms.txt)
