Developer API
Convert files to Markdown with one API
Automate document conversion in your scripts, workflows, and products. Upload a supported file and receive clean Markdown or plain text in a single request.
Authentication
Create an API key in your dashboard, then send it as a Bearer token or X-API-Key header. Keep keys server-side and never expose them in browser code.
curl -X POST https://www.word2md.net/api/v1/convert \
-H "Authorization: Bearer sk-your-key" \
-F "file=@./report.pdf" \
-F "output_format=markdown"Create an API key →Endpoints
POST /api/v1/convertConvert a file
POST a multipart form with a file field (maximum 50 MB). Set output_format to markdown or text.
GET /api/v1/convertConversion capabilities
GET the endpoint to discover supported extensions, the file-size limit, and the current quota policy.
GET /api/v1/usageUsage and quota
GET today’s API usage, plan, remaining allowance, and the next UTC reset time.
Convert a file from its URL
POST a JSON object with file_url (alias: url) instead of uploading file. Optional filename supplies the original file name when the URL has no extension. output_format accepts markdown or text. Each request converts one file using the same Word2MD API key, daily allowance and credit billing as uploads.
curl -X POST https://www.word2md.net/api/v1/convert \
-H "Authorization: Bearer sk-your-key" \
-H "Content-Type: application/json" \
-d '{"file_url":"https://files.example.com/report.pdf","filename":"report.pdf","output_format":"markdown"}'Use a public HTTPS direct download URL or a valid signed URL on port 443. Login pages, browser cookies, custom download headers and private networks are not supported. Downloads are limited to 50 MB, 60 seconds and 5 redirects. File URLs are not stored. Download or conversion failures do not count as successful API usage; reserved paid credits are refunded.
HTTP actions in Feishu Base and other automation tools
Use POST with Form URL Encoded (application/x-www-form-urlencoded), add Authorization: Bearer YOUR_WORD2MD_API_KEY, then map file_url to the download URL and filename to the file name. Set output_format to markdown and write the JSON response content field back to your table. Form encoding preserves signed URL characters without manually building JSON.
curl -X POST https://www.word2md.net/api/v1/convert \
-H "Authorization: Bearer sk-your-key" \
--data-urlencode "file_url=https://files.example.com/report.pdf" \
--data-urlencode "filename=report.pdf" \
--data-urlencode "output_format=markdown"A Feishu attachment preview link is not a public download URL. First obtain a temporary download URL using a Feishu app with permission to read the file, then pass that URL to Word2MD. Do not send Feishu cookies or tokens to Word2MD. Process multiple attachments one request at a time.
Supported file types
The API accepts common office documents, PDFs, spreadsheets, presentations, structured data, media, archives, and images.
.docx.doc.pdf.pptx.ppt.xlsx.xls.csv.tsv.html.htm.xml.json.txt.md.jpg.jpeg.png.gif.webp.bmp.tif.tiff.mp3.wav.mp4.mov.avi.zipQuota and billing
Every account receives a daily API allowance. After the included allowance is used, successful conversions consume one credit from an active subscription balance or a one-time credit pack.
| Plan | Daily API allowance | Overage |
|---|---|---|
| Free | 50 / day | Credit pack |
| Pro | 500 / day | Credit pack |
| Pro+ | 1,500 / day | Credit pack |
| Ultimate | Included | Included |
Response format
Successful conversions return the converted content, original filename, output format, credits charged, and updated usage.
{
"success": true,
"object": "conversion",
"content": "# Report\n\n...",
"format": "markdown",
"filename": "report.pdf",
"credits_charged": 0,
"usage": { "tier": "free", "used": 1, "daily": 50, "remaining": 49 }
}Errors and status codes
Errors are returned as JSON with a stable error code and a human-readable message.
401 | Missing or invalid API key |
400 | Missing file, unsupported extension, or file too large |
402 | Daily allowance and available credits are exhausted |
413 | File exceeds 50 MB or request body is too large |
415 | Unsupported request Content-Type |
422 | File URL cannot be downloaded; check access permissions, expiry and redirects |
502 | Conversion provider failed; paid credits are refunded automatically |
504 | File download timed out |
Production best practices
- Use HTTPS and store keys in environment variables
- Validate file size before upload
- Retry transient 5xx responses with exponential backoff
- Read the usage object to track remaining quota
- Remove sensitive files after processing
API frequently asked questions
What files can I convert?
Word, PDF, PowerPoint, Excel, CSV, HTML, XML, JSON, text, Markdown, images, audio, video, and ZIP files are supported where a compatible converter is available.
How does the free quota work?
Free accounts receive 50 API conversions per UTC day. Pro includes 500 per day, Pro+ includes 1,500 per day, and Ultimate is unlimited.
What happens after I reach my daily quota?
The API uses one credit per successful overage conversion from your subscription balance or credit pack. If no credits remain, it returns HTTP 402.
Are my API keys safe?
Treat keys like passwords: keep them on your server, use HTTPS, rotate them when needed, and revoke any key that may have been exposed.