mdcore.ai Documentation

mdcore.ai is the Markdown API for developers. Render, convert, and normalize Markdown with a single API — powered by a Rust engine compiled to WASM.

Quickstart

Get started with mdcore.ai in your language of choice.

Node.js
Next.js
Python
cURL
Go
Rust

Authentication

All API requests require an API key passed in the Authorization header.

HTTP Header
Authorization: Bearer mc_your_api_key

POST/v1/render

Render Markdown into HTML, PNG, or PDF. Supports all flavors including GFM, KaTeX math, Mermaid diagrams, and 190+ languages for syntax highlighting.

Request body

markdownstring · requiredThe Markdown content to render.
outputstring · optionalhtml | png | pdf. Default: html
themestring · optionalRendering theme. Default: minimal-dark

Example

cURL
curl -X POST https://api.mdcore.ai/v1/render \
  -H "Authorization: Bearer mc_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "markdown": "# Hello World\n\nThis is **bold** and this is *italic*.",
    "output": "html",
    "theme": "minimal-dark"
  }'

POST/v1/convert

Convert HTML, PDF, DOCX, or any URL to clean Markdown. Perfect for feeding AI pipelines, RAG systems, or content migration.

Request body

sourcestring · requiredURL or base64-encoded file content.
formatstring · optionalurl | html | pdf | docx. Auto-detected if omitted.
outputstring · optionalAlways markdown.

POST/v1/normalize

Normalize Markdown from any flavor to a target spec. Auto-detects the source flavor (GFM, Obsidian, MDX, Pandoc) and converts to your target format.

Request body

markdownstring · requiredThe Markdown content to normalize.
source_flavorstring · optionalSource flavor. Default: auto
targetstring · optionalcommonmark | gfm | mdcore. Default: gfm

JavaScript / TypeScript SDK

Install
npm install @mdcore/sdk
Usage
import { MdCore } from "@mdcore/sdk"

const md = new MdCore("mc_your_api_key")

// Render Markdown to HTML
const html = await md.render("# Hello World")

// Convert URL to Markdown
const markdown = await md.convert("https://example.com")

// Normalize Markdown flavor
const normalized = await md.normalize("[[wikilink]]", { target: "gfm" })

Python SDK

Install
pip install mdcore
Usage
import mdcore

client = mdcore.Client("mc_your_api_key")

# Render Markdown to HTML
html = client.render("# Hello World")

# Convert URL to Markdown
markdown = client.convert("https://example.com")

# Normalize Markdown flavor
normalized = client.normalize("[[wikilink]]", target="gfm")

Rate Limits

TierCalls / MonthRate
Free1,00010/min
Starter10,00060/min
Growth100,000300/min
Scale1,000,0001,000/min

Error Handling

mdcore.ai uses standard HTTP status codes. All error responses include a JSON body with error and message fields.

Error response
{
  "error": "invalid_api_key",
  "message": "The API key provided is invalid or expired."
}