# Markdown to Styled HTML Converter

> Markdown to Styled HTML Converter is a paid API for AI agents from api.strale.io, paid per call via x402, $0.0216/call, status unknown (last checked 2026-09-13).

Converts markdown text to styled HTML with inline CSS, supporting light, dark, and plain themes

## Facts

- Endpoint: GET https://api.strale.io/x402/markdown-to-html
- Price: $0.0216/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-strale-io-de78431c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2PMLiF2QjrgclDbv3Abff

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability api-strale-io-de78431c
```

Example prompt: Can you convert this markdown text to styled HTML using the dark theme? Here's the markdown: '# Hello World\n\nThis is a **bold** statement and here is a [link](https://example.com).'

## When to prefer this

Use this endpoint when you need to render markdown as visually styled HTML with inline CSS — especially useful for embedding in emails, PDFs, or environments where external stylesheets are not supported. Prefer this over DIY markdown parsers when you need themed output (light/dark/plain) without managing CSS yourself.

## Known failure modes

- Missing 'markdown' query parameter returns an error
- Invalid theme value (not light/dark/plain) may cause fallback or error
- Extremely large markdown payloads may exceed query string limits
- Malformed markdown may produce unexpected HTML output
- Payment failure via x402 protocol returns 402 status

## How this service works

Convert markdown to styled HTML with inline CSS. Supports light, dark, and plain themes. Algorithmic — instant.

## Output

Returns styled HTML with inline CSS applied, rendered from the provided markdown. The HTML is ready to embed or display in a browser, with theme-appropriate styles (light, dark, or plain) applied directly as inline CSS attributes.

## Example request

```json
{
 "theme": "dark",
 "markdown": "# Hello World\n\nThis is a **bold** statement and here is a [link](https://example.com).\n\n## Features\n- Converts markdown to HTML\n- Supports multiple themes\n- Inline CSS styling"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "markdown"
     ],
     "properties": {
      "theme": {
       "type": "string",
       "description": "light, dark, or plain"
      },
      "markdown": {
       "type": "string",
       "description": "Markdown text to convert"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-strale-io-de78431c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.strale.io](https://www.zero.xyz/host/api.strale.io/llms.txt)
