md2wechat Agent API markAgent API 文档
md2wechat Agent API markAgent API 文档
首页

开始

Markdown 转微信公众号 API 文档QuickstartAuth

接口

API OverviewThemeConvertArticle DraftNewspic DraftBatch Upload

接入

运维

ErrorsPricingContact
X (Twitter)
API

Convert

把 Markdown 转成微信可粘贴 HTML。

Convert

What it does

把 Markdown 转成微信可粘贴 HTML。

Required headers

Content-Type: application/json
Md2wechat-API-Key: wme_your_api_key

Request body

{
  "markdown": "# 标题\n\n正文",
  "theme": "default",
  "fontSize": "medium",
  "convertVersion": "v1"
}

Theme parameter

  • theme 必须使用当前公开支持的主题 id
  • 全量主题列表见 /themes
  • 选型原则和接入说明见 Theme

Copy-paste curl

curl -X POST "http://localhost:8080/api/v1/convert" \
  -H "Content-Type: application/json" \
  -H "Md2wechat-API-Key: wme_your_api_key" \
  -d '{
    "markdown": "# 标题\n\n正文",
    "theme": "default",
    "fontSize": "medium",
    "convertVersion": "v1"
  }'

Success response

返回微信可粘贴 HTML。

Failure response

常见失败包括认证错误或 Markdown 参数不合法。

Agent notes

  • 这是最适合第一次接入的接口。
  • 只需要 HTML 输出的工作流优先用它。

Theme

说明 `theme` 参数如何映射到 md2wechat 的主题目录和编辑器主题画廊。

Article Draft

直接从 Markdown 创建图文消息草稿。

目录

Convert
What it does
Required headers
Request body
Theme parameter
Copy-paste curl
Success response
Failure response
Agent notes