{"uid":"cap_2PMLiF2QjrgclDbv3Abff","slug":"api-strale-io-de78431c","name":"Markdown to Styled HTML Converter","description":"Convert markdown to styled HTML with inline CSS. Supports light, dark, and plain themes. Algorithmic — instant.","url":"https://api.strale.io/x402/markdown-to-html","method":"GET","headers":{},"bodySchema":{"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}}},"responseSchema":null,"example":{"request":{"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"},"response":{"html":"<!DOCTYPE html>\n<html lang=\"en\">\n<head><meta charset=\"UTF-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><style>body{font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif;line-height:1.6;max-width:800px;margin:0 auto;padding:2rem}\ncode{font-family:\"SF Mono\",Monaco,Consolas,monospace;font-size:0.9em;padding:0.2em 0.4em;border-radius:3px}\npre{padding:1rem;border-radius:6px;overflow-x:auto}pre code{padding:0}\nblockquote{border-left:4px solid;padding-left:1rem;margin-left:0}\nimg{max-width:100%;height:auto}\ntable{border-collapse:collapse;width:100%}th,td{border:1px solid;padding:0.5rem;text-align:left}\nhr{border:none;border-top:1px solid}\nbody{background:#1a1a2e;color:#e0e0e0}a{color:#64b5f6}code{background:#2d2d44}pre{background:#2d2d44}blockquote{border-color:#555;color:#aaa}th,td{border-color:#444}hr{border-color:#444}</style></head>\n<body><h1>Hello World</h1>\n\n<p>This is a <strong>bold</strong> statement and here is a <a href=\"https://example.com\">link</a>.</p>\n\n<h2>Features</h2>\n<ul><li>Converts markdown to HTML</li><li>Supports multiple themes</li><li>Inline CSS styling</li></ul></body>\n</html>","_meta":{"payment":{"method":"x402","price_usd":0.0216,"settlement_id":"0x8482fb393a8295c6b13b2ab358a4e4cb596d4d6128a5fb542463a942d0a9b953"},"capability":"markdown-to-html","latency_ms":1,"provenance":{"source":"algorithmic","fetched_at":"2026-06-16T01:20:06.083Z"}},"theme":"dark","body_html":"<h1>Hello World</h1>\n\n<p>This is a <strong>bold</strong> statement and here is a <a href=\"https://example.com\">link</a>.</p>\n\n<h2>Features</h2>\n<ul><li>Converts markdown to HTML</li><li>Supports multiple themes</li><li>Inline CSS styling</li></ul>"}},"exampleRequest":{"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"},"tags":["x402"],"displayCostAmount":"0.0216","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.0216/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0216","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0216","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_azCazwrMEkqMHjolDAKtQ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0216","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts markdown text to styled HTML with inline CSS, supporting light, dark, and plain themes","exampleAgentPrompt":"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).'","exampleUseCases":null,"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T13:08:22.498Z","isFirstParty":false}