X114
Wróć do przeglądu

markdown-render

POST1 kredyt

Renders GitHub-flavored Markdown to either sanitized HTML or plain text. The HTML output is sanitized server-side (no script tags, no inline event handlers).

Endpoint

POST https://x114.org/api/v1/markdown-render

Treść żądania

Opis ładunku żądania.

NameTypeRequiredDescription
markdownstringrequiredThe Markdown source. Up to 1 MB of UTF-8.

Treść odpowiedzi

Odpowiedź o sukcesie jest zwracana jako JSON.

NameTypeRequiredDescription
okbooleanrequiredTrue on success.
htmlstringrequiredThe rendered HTML (GitHub-flavored Markdown, raw HTML disabled).

Przykład

curl -X POST https://x114.org/api/v1/markdown-render \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{"markdown":"# Hello\n\n**world**"}'

Uwagi

  • Raw HTML inside the Markdown source is stripped before rendering — script tags and inline event handlers cannot reach the output.
Wypróbuj w przeglądarce

Otwórz odpowiednie narzędzie, aby szybko przetestować.

Otwórz narzędzie