Skip to content

payload_too_large

HTTP status: 413 Content Too Large · Charged: no

The Markdown in the request is longer than the limit of 1,048,576 characters, which the API calls 1 MB. The response carries the limit in max_bytes. The limit is counted in characters: an accented letter or an emoji counts as one, however many bytes it takes on the wire.

The same code is returned, with max_body_bytes instead of max_bytes, when the whole request body is larger than 8,388,608 bytes (8 MB). That check runs before authentication and before the body is read, so no valid request reaches it: a 1 MB Markdown field never produces an 8 MB JSON body.

  1. Split the document, for example at its top-level headings, and call once per part.
  2. For a table of contents of a long document, send only the headings: the result is the same and the body is much smaller.

Captured from the production API on 2026-10-23, sending 1,048,577 characters of Markdown to POST /v1/md/frontmatter.

{
"error": "payload_too_large",
"hint": "Request markdown must be at most 1048576 characters (1 MB; accented letters and emoji count as one character each). Split large documents before calling this endpoint.",
"max_bytes": 1048576,
"docs_url": "https://docs.markdownscribe.com/errors/payload_too_large",
"request_id": "01M5MV2BX4K4WWHTMCNFMS2QC0"
}