Markdown to HTML

Convert Markdown text to HTML in a single API call. Optionally sanitize the output to strip unsafe tags and prevent XSS.

Get API Key

Vue d'ensemble

Cas d'utilisation

  • Rendering user-generated Markdown content safely in web apps
  • Converting README files or documentation to HTML
  • Building rich-text editors with Markdown input and HTML preview
  • Preprocessing Markdown before storing rendered HTML

Fonctionnalités

Full CommonMark Markdown support
Optional HTML sanitization to strip unsafe tags and attributes
Returns ready-to-render HTML string

Points de terminaison de l'API

Convert Markdown to HTML

Converts a Markdown string to HTML. Pass sanitize true to strip potentially unsafe tags like script and iframe from the output.

POST
https://requiems.xyz/v1/technology/markdown

Paramètres

Nom Type Requis Description
markdown string Requis The Markdown text to convert.
sanitize boolean Facultatif When true, sanitizes the HTML output to remove unsafe tags and attributes.

Essayez-le

Démo en direct
Requête

The Markdown text to convert.

When true, sanitizes the HTML output to remove unsafe tags and attributes.

Champs de réponse

Champ Type Description
html string The rendered HTML output

Exemples de code

curl -X POST https://requiems.xyz/v1/technology/markdown \
  -H "requiems-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"markdown": "# Hello\n\nThis is **bold** text.", "sanitize": true}'

Réponses d'erreur

422

unprocessable_entity

Convert Markdown Batch

Converts multiple Markdown strings into HTML in a single request. Results are returned in the same order as the input array. Supports optional sanitization to remove unsafe HTML tags such as script and iframe.

POST
https://requiems.xyz/v1/technology/markdown/batch

Paramètres

Nom Type Requis Description
markdowns array<string> Requis Array of Markdown strings. Min: 1, Max: 50.
sanitize boolean Facultatif When true, sanitizes HTML output to remove unsafe tags and attributes.

Essayez-le

Démo en direct
Requête

Array of Markdown strings. Min: 1, Max: 50.

When true, sanitizes HTML output to remove unsafe tags and attributes.

Champs de réponse

Champ Type Description
results array<object> One HTML result per Markdown input, preserving input order
results[].html string Rendered HTML output for each Markdown string

Exemples de code

curl -X POST https://requiems.xyz/v1/technology/markdown/batch \
  -H "requiems-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "markdowns": ["# Hello", "**bold**", "- item"],
    "sanitize": true
  }'

Réponses d'erreur

validation_failed

Body is invalid: empty array, more than 50 items, or invalid Markdown entry.

bad_request

Missing or malformed request body.

internal_error

Unexpected server error.

Foire aux questions