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

Descripción general

Casos de uso

  • 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

Funcionalidades

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

Puntos finales de la 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

Parámetros

Nombre Tipo Obligatorio Descripción
markdown string Obligatorio The Markdown text to convert.
sanitize boolean Opcional When true, sanitizes the HTML output to remove unsafe tags and attributes.

Pruébalo

Demostración en vivo
Solicitud

The Markdown text to convert.

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

Campos de respuesta

Campo Tipo Descripción
html string The rendered HTML output

Ejemplos de código

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

Respuestas de error

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

Parámetros

Nombre Tipo Obligatorio Descripción
markdowns array<string> Obligatorio Array of Markdown strings. Min: 1, Max: 50.
sanitize boolean Opcional When true, sanitizes HTML output to remove unsafe tags and attributes.

Pruébalo

Demostración en vivo
Solicitud

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

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

Campos de respuesta

Campo Tipo Descripción
results array<object> One HTML result per Markdown input, preserving input order
results[].html string Rendered HTML output for each Markdown string

Ejemplos de código

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

Respuestas de error

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.

Preguntas frecuentes