{"uid":"cap_7YU5vcPJhXJvsZDYSdp2w","slug":"task-relay-html-to-markdown-converter-5e5aa0e4","name":"Task Relay HTML-to-Markdown Converter","description":"When a machine already holds an HTML string and needs deterministic Markdown for a content pipeline, Task Relay converts the HTML under fixed server rules and returns Markdown plus source hash, structural counts, output hash, truncation, and warnings. No URL fetch, no browser rendering, no JavaScript execution, no model inference or rewriting.","url":"https://task-relay-production.up.railway.app/x402/html-to-markdown","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["html"],"properties":{"html":{"type":"string","description":"HTML content string already held by the caller to convert to Markdown (no URL fetch; input/output size caps enforced)"}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["task_id","task_status","result","error"],"properties":{"error":{"type":["string","null"]},"result":{"type":["object","null"],"properties":{"output":{"type":"object"},"source":{"type":"object"},"status":{"enum":["converted","partial","empty","input_too_large","unknown"],"type":"string"},"markdown":{"type":"string"},"warnings":{"type":"array"},"structure":{"type":"object"},"elapsed_ms":{"type":"integer"},"processed_at":{"type":"string"},"billable_units":{"type":"integer"}}},"task_id":{"type":"string"},"task_status":{"enum":["succeeded","failed"],"type":"string"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_eVMZYY2M34-WG7lCseLPr","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts an HTML string already held by the caller into Markdown, returning the Markdown text plus source hash, structural counts, output hash, truncation status, and any warnings.","exampleAgentPrompt":"I have this HTML string I'm already holding and I need it converted to clean Markdown — no URL fetching, just deterministic conversion: '<h1>Hello</h1><p>This is a <strong>test</strong> paragraph.</p>'","exampleUseCases":[{"title":"CMS content pipeline normalization","prompt":"I'm ingesting articles from a legacy CMS that gives me raw HTML strings — can you convert this HTML to Markdown so I can store it in our content pipeline? Here's the HTML: '<article><h2>Top 5 Tips</h2><ul><li>Tip one</li><li>Tip two</li></ul></article>'"},{"title":"Email HTML body to Markdown","prompt":"I've pulled the HTML body of this marketing email and I need it as clean Markdown for archiving. Can you convert this HTML I already have: '<p>Dear Customer,</p><p>Check out our <a href=\"#\">new products</a>!</p>'"},{"title":"Documentation scraper output cleaning","prompt":"My scraper already captured this HTML chunk from a documentation page and I need it as Markdown to feed into our indexer — please convert it: '<h3>Installation</h3><pre><code>npm install mytool</code></pre><p>Run the above command to get started.</p>'"}],"resultDescription":"Returns a task result containing: the converted Markdown string, conversion status (converted/partial/empty/input_too_large/unknown), a source hash of the input HTML, an output hash of the Markdown, structural counts of elements, any warnings encountered, elapsed processing time in milliseconds, and billable units consumed.","failureModes":["Input HTML exceeds size cap — status returns 'input_too_large' with no Markdown output","Malformed or empty HTML produces status 'empty' or 'partial' with warnings","Missing required 'html' field in body causes a validation error","Network timeout to the service returns a failed task_status","Output truncation occurs for very large documents, signaled via 'partial' status and warnings array"],"whenToPreferThis":"Choose this endpoint when you already hold an HTML string in memory and need a deterministic, rule-based Markdown conversion for an automated pipeline — no URL fetching, no browser, no JavaScript execution, and no AI rewriting. Prefer this over LLM-based HTML-to-Markdown approaches when you need reproducible output with structural metadata (hashes, counts, warnings) for auditing or integrity checking. Not suitable if you need to first fetch a URL to get the HTML.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:36:07.599Z","isFirstParty":false}