# Relaystation Markdown to HTML Converter

> Relaystation Markdown to HTML Converter is a paid API for AI agents from api.relaystation.ai, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-16).

Converts Markdown text to sanitized, embed-safe HTML with whitelist-based XSS protection

## Facts

- Endpoint: POST https://api.relaystation.ai/v1/text/markdown-to-html
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/relaystation-markdown-to-html-converter-23521135
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1vxHLoHuFDq5xK-zr0dA6

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 relaystation-markdown-to-html-converter-23521135 -d '<json body>'
```

Example prompt: Convert this markdown content to HTML for me — I need it whitelist-sanitized so it's safe to embed directly in our web app: '# Hello World\n\nThis is **bold** and [a link](https://example.com).'

## When to prefer this

Choose this endpoint when you need a low-cost, pay-per-use markdown-to-HTML conversion that guarantees XSS-safe, whitelist-sanitized output suitable for direct web embedding — especially useful for agent pipelines handling user-generated or untrusted markdown content where security matters. Prefer it over self-hosted parsers when you need sanitization built-in and want to avoid dependency management, or when operating in an x402 micropayment workflow at $0.01 per call.

## Known failure modes

- Empty or missing markdown body — returns error requiring non-empty input
- Invalid content type header — API expects text or JSON payload
- Payment not attached or insufficient x402 credit — returns 402 Payment Required
- Oversized payload exceeding MB limits — billed per MB, may reject extremely large inputs
- Network timeout on large documents

## How this service works

$0.0002/MB. Convert markdown to HTML — always whitelist-sanitized, safe to embed. 1¢ x402 min; remainder auto-credits — relaystation.ai/penny

## Output

Sanitized HTML string converted from the input markdown, with all potentially dangerous tags and attributes removed via whitelist sanitization, making it safe to embed directly in web pages or other HTML contexts.

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ]
    },
    "bodyType": {
     "type": "string",
     "enum": [
      "json",
      "form-data",
      "text"
     ]
    },
    "body": {
     "properties": {}
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   },
   "required": [
    "type"
   ]
  }
 },
 "required": [
  "input"
 ]
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/relaystation-markdown-to-html-converter-23521135/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.relaystation.ai](https://www.zero.xyz/host/api.relaystation.ai/llms.txt)
