Skip to content

Render markdown to HTML. Each block carries its source position (DEC-017).

POST
/render
curl --request POST \
--url https://example.com/api/v1/render \
--header 'Content-Type: application/json' \
--data '{ "markdown": "example", "doc_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "path": "example" }'
Media typeapplication/json
object
markdown
required
string
doc_id

When set, relative image links resolve to files of this spec doc’s version.

string format: uuid
path

The path of the file in the bundle, so relative links resolve from its folder.

string
Examplegenerated
{
"markdown": "example",
"doc_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"path": "example"
}

The HTML.

Media typeapplication/json
object
html
required

HTML. Each block element has data-src-start and data-src-end (byte offsets into the markdown) and data-line (the 1-based first line). Mermaid blocks are

.

string
Examplegenerated
{
"html": "example"
}

An error.

Media typeapplication/problem+json

RFC 9457 problem details with a stable code.

object
type
required
string
title
required
string
status
required
integer
detail
string
instance
string
code
required

A stable machine-readable error code.

string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"code": "example"
}