Markdown → HTML
Try it interactively →POST /api/md-to-htmlRender CommonMark Markdown to HTML. Output is the rendered body only (no `<html>` shell) — drop it directly into your page or feed it through your sanitiser.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| markdown* | file | — | The Markdown source document. |
Response
Modes: text, json. Cache: yes (24h TTL).
Code samples
Built from the hello example.
# Download or substitute the example input:
# curl -O https://xtract.bot/examples/md-to-html/hello.md
MARKDOWN=$(base64 -w0 < hello.md)
curl -X POST https://api.xtract.bot/api/md-to-html \
-H "Content-Type: application/json" \
-H "Accept: text/plain" \
-H "X-Account-Id: $XTRACT_ACCOUNT_ID" \
-H "X-Api-Key: $XTRACT_API_KEY" \
-d '{
"markdown": "'"$MARKDOWN"'"
}'