กลับไปยังภาพรวม API

markdown-render

POST1 เครดิต

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).

เอ็นด์พอยต์

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

เนื้อหาคำขอ

ส่งเป็น JSON ในเนื้อหา POST

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

เนื้อหาการตอบสนอง

JSON ที่ส่งคืนเมื่อสำเร็จ (HTTP 200)

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

ตัวอย่าง

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**"}'

หมายเหตุ

  • Raw HTML inside the Markdown source is stripped before rendering — script tags and inline event handlers cannot reach the output.
ลองในเบราว์เซอร์

เครื่องมือฟรีให้ผลลัพธ์เดียวกันโดยไม่ต้องเขียนโค้ดใดๆ

เปิดเครื่องมือ