MarkdownOpt

Price: $0.005 USDC per call

Endpoint: https://markdownopt.melis.ai/markdown

Method: POST

Pays to: 0x1C680703D6cF7dfC9FEABb5AA28E64B869ddB3bC

What it does

Pass a URL or raw HTML; receive back clean markdown stripped of nav, footers, ads, and boilerplate. Returns a token estimate for both the original HTML and the cleaned output. Typical reduction is ~70%. Use this as your default "fetch and read" step before passing web content to an LLM — it costs $0.005 and saves far more in LLM token spend.

When to use it

  • Fetch a documentation page and summarise it without bloating context
  • Extract the main article from a news site before sentiment analysis
  • Pull product descriptions from HTML e-commerce pages
  • Preprocessing step before any LLM summarisation workflow

Request schema

{
  "url": "https://example.com/article"
}

Response schema

{
  "markdown": "# Article Title\n\nClean content without nav, ads, or footers...",
  "token_estimate": 380,
  "original_token_estimate": 1420,
  "reduction_pct": 73
}

Code example — TypeScript via MCP

Install the MCP server once; all 16 services become tool calls.

// Configure @melis-ai/x402-tools-mcp in your MCP client
// Then call the tool:

const result = await mcpClient.callTool("markdownopt", {
  "url": "https://example.com/article"
});

console.log(result);
// ["markdown","token_estimate","original_token_estimate","redu...
→ MCP setup guide

Code example — Python via direct HTTP

import requests

# x402 payment header must be set by your wallet client
# See x402.org for client libraries

headers = {
    "Content-Type": "application/json",
    "x-payment": "<signed-x402-payment-header>",
}

resp = requests.post(
    "https://markdownopt.melis.ai/markdown",
    json={
      "url": "https://example.com/article"
    },
    headers=headers,
)
print(resp.json())

Code example — curl with internal key bypass

For testing with an issued internal key (skips x402 payment flow):

curl -X POST https://markdownopt.melis.ai/markdown \
  -H "Content-Type: application/json" \
  -H "x-internal-key: YOUR_KEY" \
  -d '{"url":"https://example.com/article"}'

How is this different from alternatives?

MarkdownOpt vs UtilsForAgents

UtilsForAgents offers a similar markdown conversion utility. MarkdownOpt's edge is the token_estimate return value — your agent can decide whether to proceed based on expected cost before calling the LLM.

FAQ

Does it work without an account?

Yes. x402 is account-less. Your agent's wallet signs the payment and retries automatically. No registration, no API key, no subscription.

What happens on failure?

Returns HTTP 422 if the URL is unreachable or the HTML produces no extractable content. No charge settled on failure.

What is the rate limit?

None published.

Is this open-source?

The service code is closed-source for security reasons. The MCP wrapper that calls it is open-source and MIT-licensed: github.com/mizukaizen/x402-tools-mcp .

Who built this?

Part of the melis.ai agent infrastructure stack. Running on a dedicated Helsinki VPS since early 2026. Contact sean@melis.ai.