← All updates

A clear error when one markdown block is too large

A single markdown block past ~8MB used to return a bare 500. It now returns 413 with code markdown-block-too-large and advice that fits the block's shape — and the limit is documented.

apilimitsmarkdown

If you send markdown with a very large inline image — a multi-megabyte data: payload in one paragraph — the parser could run out of stack on that one block. The request was well inside every documented limit (15MB body, 5MB per image, 20 images) and came back as a bare 500, which told you nothing about what to change.

What changed

A single markdown block past roughly 8MB now answers 413 with code: "markdown-block-too-large", the per-block limit in the message, and a hint that explains how to split the block for its shape. The limit is per block — a run of lines with no blank line between them — not per document, so a large note split into paragraphs has always been fine.

The same answer applies wherever the converter runs: POST /api/v1/md, POST /api/v1/markdown, POST /api/v1/md/validate, POST /api/v1/canvas text cards, and the MCP render_markdown / validate_markdown tools. A rejected request bills nothing, writes no render-failure row, and an x402 payment is marked failed for refund rather than charged.

How to fix a 413

For paragraphs and runs of images, insert a blank line — the content renders the same as two blocks. A fenced code block cannot be split that way (the blank line stays inside the fence), so close the fence and open a second one. A blank line between table rows splits one table into two, which renders differently, so split tables deliberately.

The limit and the per-shape advice are documented in the API reference at /docs/api, and in the Markdown guide at /docs/markdown.