md2wechat Agent API markmd2wechat Agent API
  • Docs
  • Features
  • Themes
  • Editor
  • Blog
  • Pricing
  • Examples
  • Skills
  • Contact
Markdown to the WeChat Draft Box: the Complete Pipeline
2026/09/05

Markdown to the WeChat Draft Box: the Complete Pipeline

Five stages from inspect to draft/add, why every draft needs an explicit cover, and how to debug 45004.

Markdown to the WeChat Draft Box: the Complete Pipeline

The draft path has five stages, and the first two never touch the network. Full reference.

The five stages

  1. md2wechat inspect article.md --json — metadata (title ≤ 32 chars, author ≤ 16, digest ≤ 128), image inventory, and readiness.targets with blockers such as MISSING_COVER or MISSING_WECHAT_CONFIG.
  2. Preflight — validates intent, assets, and cover before any remote call.
  3. Convert — renders HTML through the Convert API (POST https://www.md2wechat.cn/api/convert).
  4. Upload — --upload turns article images into WeChat materials and rewrites the URLs; --cover uploads the cover and returns a media_id.
  5. Draft — WeChat draft/add returns draft_id and draft_url.

Every draft needs an explicit cover

md2wechat convert article.md --draft --cover cover.jpg

--cover <path> and --cover-media-id <media_id> are mutually exclusive; inspect fails closed with CONFLICTING_COVER_INPUTS, COVER_MEDIA_ID_INVALID, or MISSING_COVER. Details: Cover Image.

Debugging 45004

WeChat error 45004 means an invalid digest — check the digest length first (limit 128 characters). Clear readiness blockers before retrying; --save-draft saves the draft JSON without submitting, and create_draft <json> submits later. test-draft <html> <cover> is the minimal smoke path.

Safety boundary

Draft creation is a side effect. It requires explicit user intent, valid credentials, and — when the platform asks — a whitelisted egress (Whitelist).

All Posts

Author

avatar for geekjourney
geekjourney

Categories

  • Workflow
Markdown to the WeChat Draft Box: the Complete PipelineThe five stagesEvery draft needs an explicit coverDebugging 45004Safety boundary

More Posts

How to Use md2wechat-skill in Claude Code, Codex, and OpenCode
Integration

How to Use md2wechat-skill in Claude Code, Codex, and OpenCode

A validation-oriented comparison of candidate md2wechat-skill setup paths for Claude Code, Codex, and OpenCode, with install steps, discovery commands, and reusable prompts.

avatar for geekjourney
geekjourney
2026/03/21
56 Advanced Layout Modules: a Usage Guide
Workflow

56 Advanced Layout Modules: a Usage Guide

Nine categories, nine body formats, and how to pick the few modules an article actually needs.

avatar for geekjourney
geekjourney
2026/09/05
Why Advanced Layout Improves the Product Value of md2wechat Agent API
API

Why Advanced Layout Improves the Product Value of md2wechat Agent API

Advanced layout modules do more than improve presentation. They make the API easier to understand, easier to integrate, and easier to position as a higher-value product.

avatar for geekjourney
geekjourney
2026/04/26

Newsletter

Join the community

Subscribe to our newsletter for the latest news and updates

md2wechat Agent API markmd2wechat Agent API

The official md2wechat API, docs, CLI, and skill entry points for Markdown to WeChat publishing workflows.

GitHubX (Twitter)
Product
  • Quickstart
  • Features
  • Themes
  • Pricing
  • Contact
Docs
  • Auth
  • OpenAPI
  • llms.txt
Ecosystem
  • Examples
  • Skills
  • md2wechat-lite
© 2026 md2wechat Agent API. All Rights Reserved.