Unplain for developers

The Unplain API and developer docs

Unplain turns a document into a designed, publish-ready PDF. Everything the web app does, an AI assistant can do through the Unplain MCP server, with the same account and the same plan limits.

This page is the index. Every machine-readable file Unplain publishes is listed below, at a URL that will not move.

The Unplain MCP server

The programmatic interface to Unplain is an MCP (Model Context Protocol) server over Streamable HTTP, authenticated with an API key. It is included on every plan, free plans included: a key carries exactly the capabilities of the account behind it.

Endpoint
https://app.unplain.io/api/mcp
Transport
streamable-http
Authentication
Authorization: Bearer unp_…
Session model
Stateless. No Mcp-Session-Id is issued or required.
Terminal
claude mcp add --transport http unplain https://app.unplain.io/api/mcp \
  --header "Authorization: Bearer <your key>"

Full setup, including the config each client writes and what to do when it breaks, is on the Unplain MCP page, with per-client guides for Claude Code and Codex.

The 12 tools

Call tools/list for the current schemas. That is the authoritative surface; this list is here so you can see the shape of it before connecting.

  • create_brand_theme
  • create_ebook
  • export_ebook
  • generate_cover_image
  • get_account
  • get_design_options
  • get_ebook
  • get_export_status
  • list_brand_themes
  • list_ebooks
  • update_brand_theme
  • update_ebook

Machine-readable files

Published at predictable URLs, served with permissive CORS, and stable. If one of these ever has to move, it will keep answering at the old address.

  • /llms.txt Markdown

    Every page on this site with a one-paragraph summary. Start here if you want to know what Unplain is without crawling.

  • /openapi.json OpenAPI 3.1

    The HTTP API: the MCP endpoint and the public feature-request board, with every error code and response shape.

  • /.well-known/mcp.json MCP server.json

    How to connect an AI client to Unplain: transport, endpoint URL, and the header that authenticates it. Also at /mcp.json.

  • Every indexable URL, with change frequency and priority.

  • Crawling rules. Every major search and AI crawler is explicitly allowed.

Terminal
curl -s https://unplain.io/openapi.json | jq '.paths | keys'

Every page, as Markdown

Send Accept: text/markdown to any URL on unplain.io and you get the page content as Markdown: no navigation, no styles, no scripts. The HTML and the Markdown come from the same URL, and the response carries Vary: Accept so a cache cannot hand you the wrong one.

Terminal
curl -s -H "Accept: text/markdown" https://unplain.io/developers

This follows the convention documented at acceptmarkdown.com. Requests for a type Unplain cannot produce are answered with 404 or 406 rather than a page pretending to be one, and a missing path returns a real 404 with a Markdown body listing the files above.

Errors

Every error under /api is JSON, never an HTML page. Non-MCP replies carry a stable error code to branch on, and the MCP endpoint returns JSON-RPC error objects whose message names both the problem and the fix.

Authentication failures

A failed MCP call returns 401 with an RFC 6750 WWW-Authenticate challenge naming the bearer scheme, so a client can fall back to "configure a token" instead of assuming OAuth and failing on a discovery document that does not exist.

Every code, with the condition that produces it, is in the OpenAPI document.

Questions

Is there a REST API for creating ebooks?
Not as REST. The MCP server at https://app.unplain.io/api/mcp is the programmatic interface, and it covers the whole workflow: create a project from Markdown, read it back as a structured outline, edit it, apply a Brand Theme, generate a cover and export the PDF. It is a JSON-RPC protocol rather than a set of REST paths, which is why /openapi.json documents one endpoint rather than twelve.
Do I need a paid plan to use the API?
No. The MCP server is included with every Unplain account, free plans included. An API key carries exactly the capabilities of the account's plan, so the same free and Pro limits apply whether you work in the web app or through an assistant. There is no separate API tier and no separate API pricing.
How do I authenticate?
With an API key, sent as an Authorization: Bearer header. Create one in Unplain under Account settings, API keys. Keys start with unp_ and are shown once. Each key carries scopes, and each MCP tool checks the scope it needs before doing any work, so a key can be limited to reading rather than exporting.
Can I get these pages as Markdown instead of HTML?
Yes. Send Accept: text/markdown to any URL on unplain.io and you get the page content as Markdown, without the navigation, styles and scripts. This follows the acceptmarkdown.com convention, and the response carries Vary: Accept so a cache cannot hand you the wrong variant.
Is there a webhook or an event feed?
No. Exports are polled rather than pushed: export_ebook returns a job, and get_export_status reports on it until the PDF is ready. If webhooks would change how you use Unplain, the feature-request board is the place to say so.

Turn your next doc into a publish-ready PDF.

No signup needed. Short ebooks are on us, forever.