Follow these steps to make your first API call in under 2 minutes.
Avg. time to first call: 47 secondsCopy this cURL command and run it in your terminal. It converts Markdown to HTML using your API key.
curl -X POST https://docforge-api.vercel.app/api/md-to-html \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_KEY" \ -d '{"markdown": "# Hello World\n\nThis is **bold** text."}'
A successful request returns JSON with the converted HTML and metadata about the document.
// 200 OK { "html": "<h1>Hello World</h1>\n<p>This is <strong>bold</strong> text.</p>", "meta": { "wordCount": 6, "headings": ["Hello World"] } }
Use the DocForge API from any language. Here are ready-to-use examples for JavaScript and Python.
const response = await fetch("https://docforge-api.vercel.app/api/md-to-html", { method: "POST", headers: { "Content-Type": "application/json", "Authorization": "Bearer YOUR_API_KEY", }, body: JSON.stringify({ markdown: "# Hello World\n\nThis is **bold** text.", }), }); const data = await response.json(); console.log(data.html); // <h1>Hello World</h1>\n<p>This is <strong>bold</strong> text.</p>
import requests response = requests.post( "https://docforge-api.vercel.app/api/md-to-html", json={"markdown": "# Hello World\n\nThis is **bold** text."}, headers={"Authorization": "Bearer YOUR_API_KEY"}, ) data = response.json() print(data["html"]) # <h1>Hello World</h1>\n<p>This is <strong>bold</strong> text.</p>
# JavaScript / TypeScript npm install docforge-sdk # Python pip install docforge
Send a real request from your browser. Pick an endpoint, edit the input, and hit Convert.
DocForge offers four conversion endpoints. Check out the full documentation for schemas, examples, and error handling.
If something goes wrong, here are the most common issues and how to fix them.
| Status | Meaning | Fix |
|---|---|---|
| 401 | Your API key is missing or invalid. Check that your Authorization: Bearer header includes a valid df_ key. |
|
| 429 | You've exceeded your daily rate limit. Wait for the reset or upgrade your plan for higher limits. | |
| 400 | Check your request body format. Ensure you're sending valid JSON with the required fields (e.g. "markdown" for md-to-html). |
The free tier is great for getting started. When you need higher limits, upgrade to Pro or Team.