fittings-doc-html-to-markdown
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHTML to clean Markdown
HTML 转干净的Markdown
doc.html-to-markdownhttps://fittings.shConvert an HTML document supplied in the request body to clean Markdown, stripping scripts and styles.
doc.html-to-markdownhttps://fittings.sh将请求体中提供的HTML文档转换为干净的Markdown,移除脚本和样式。
The call
调用方式
POST https://fittings.sh/v1/doc/html-to-markdown| Field | Type | Required | Notes |
|---|---|---|---|
| string | yes | HTML source, up to 2000000 bytes of UTF-8 |
Example input:
json
{
"html": "<h1>Title</h1><p>Hello <b>world</b>.</p>"
}POST https://fittings.sh/v1/doc/html-to-markdown| 字段 | 类型 | 是否必填 | 说明 |
|---|---|---|---|
| string | 是 | HTML源文件,最多支持2000000字节的UTF-8编码内容 |
示例输入:
json
{
"html": "<h1>Title</h1><p>Hello <b>world</b>.</p>"
}Metered
计量方式
The 402 quotes a ceiling — the price of the declared cap, 2000000 bytes — and settlement is for what the call actually used. A small request settles for less than it was quoted, so read the quote as an upper bound rather than a price.
402响应返回的是上限价格——即声明的最大容量(2000000字节)对应的价格,而实际结算按调用的实际使用量计算。小请求的结算费用会低于报价,因此请将报价视为上限而非固定价格。
Cost and provenance
成本与来源
| Price | $0.004 per call, metered per bytes |
| Source | none (pure compute) |
| Licence | none-needed |
| 价格 | 每调用0.004美元,按字节计量 |
| 来源 | 无(纯计算服务) |
| 许可证 | 无需许可证 |
Why call it rather than answer from memory
为何调用该服务而非凭记忆处理
A research agent handed raw HTML must reduce it to readable text before it can reason over it, and passing full markup through a model wastes most of the context window.
研究型Agent拿到原始HTML后,必须先将其转换为可读文本才能进行推理,而将完整标记传递给模型会浪费大部分上下文窗口。
Calling it
调用步骤
A skill is loaded on its own, so this document has to be enough by itself. It
does not assume the general skill is also loaded.
ships alongside this file; if it is missing (this document reached you without
the rest of the skill), fetch it once with
.
fittingscall.mjscurl -sO https://fittings.sh/skill/call.mjsFree, and needs no wallet. Read the schema and see what a call would cost:
bash
curl -s https://fittings.sh/catalog/doc.html-to-markdown | jqPaying. The endpoint answers with a signed quote,
you sign an authorization, and a facilitator settles it — you never send a
transaction and never pay gas. Before it spends anything, the client checks its
own hash against the gateway and refuses rather than sign with logic the
gateway has moved past:
402 Payment Requiredbash
undefined该技能独立加载,因此本文档本身已足够,无需假设同时加载了通用的技能。文件与本文档一同提供;如果缺失(即您仅收到本文档而未获取技能的其余部分),可通过以下命令一次性获取:
。
fittingscall.mjscurl -sO https://fittings.sh/skill/call.mjs免费调用,无需钱包。查看schema并了解调用成本:
bash
curl -s https://fittings.sh/catalog/doc.html-to-markdown | jq付费调用。端点会返回响应及签名报价,您需签署授权,由服务商完成结算——您无需发送交易,也无需支付gas费。在产生任何费用前,客户端会将自身哈希与网关进行校验,若网关逻辑已更新则会拒绝签署:
402 Payment Requiredbash
undefinedDry run. Prints the quote and pays nothing, because no key is set.
试运行。仅打印报价,无需支付,因为未设置密钥。
node call.mjs doc.html-to-markdown html="<h1>Title</h1><p>Hello <b>world</b>.</p>"
node call.mjs doc.html-to-markdown html="<h1>Title</h1><p>Hello <b>world</b>.</p>"
For real: a wallet holding USDC on Base, and nothing else.
实际调用:使用持有Base网络USDC的钱包,无需其他资产。
export FITTINGS_PRIVATE_KEY=0x...
node call.mjs doc.html-to-markdown html="<h1>Title</h1><p>Hello <b>world</b>.</p>"
Spending is never a side effect of curiosity: with no `FITTINGS_PRIVATE_KEY`
the client fetches the quote and stops. `FITTINGS_MAX_PRICE` caps what it will
pay without asking, and defaults to $0.05.
**Use a throwaway wallet holding a few dollars, not a main one.** The key sits
in plaintext wherever the agent runs, and the whole cost of entry is USDC on
Base — no account, no API key, and no ETH, because the payer signs off-chain and
the facilitator broadcasts and pays the gas.
Writing your own client instead of using this one? `@x402/core` and
`@x402/evm` on npm, and the `fittings` skill records the two things that cost
real debugging time: the challenge is in a response header rather than the body,
and it must be re-signed from the exact request being retried.
If this is not the right service, `https://fittings.sh/catalog/search?q=...`
searches all of them for free.export FITTINGS_PRIVATE_KEY=0x...
node call.mjs doc.html-to-markdown html="<h1>Title</h1><p>Hello <b>world</b>.</p>"
好奇探索不会产生费用:未设置`FITTINGS_PRIVATE_KEY`时,客户端仅获取报价后即停止。`FITTINGS_MAX_PRICE`可设置无需确认的最高支付限额,默认值为0.05美元。
**请使用仅持有少量美元的临时钱包,而非主钱包**。密钥以明文形式存储在Agent运行的环境中,入门仅需Base网络上的USDC——无需账户、API密钥或ETH,因为付款方进行链下签名,由服务商广播交易并支付gas费。
不想使用该客户端,而是自行编写?可使用npm上的`@x402/core`和`@x402/evm`,`fittings`技能记录了两个耗时调试的要点:挑战信息位于响应头而非响应体中,且必须针对重试的精确请求重新签名。
如果这不是您需要的服务,可通过`https://fittings.sh/catalog/search?q=...`免费搜索所有服务。