Developer REST API v1
Convert files with one HTTP POST
Send a multipart upload to POST /api/v1/convert with file and target. Receive the converted binary directly in the response stream.
cURL — Convert DOCX to PDF
curl -X POST "https://anytomarkdown.com/api/v1/convert" \
-H "Authorization: Bearer fk_live_YOUR_KEY" \
-F "file=@contract.docx" \
-F "target=pdf" \
--output contract.pdf
Node.js (fetch + FormData)
const form = new FormData();
form.append("file", new Blob([await fs.readFile("photo.heic")]), "photo.heic");
form.append("target", "jpg");
const res = await fetch("https://anytomarkdown.com/api/v1/convert", {
method: "POST",
headers: { Authorization: "Bearer fk_live_YOUR_KEY" },
body: form,
});
await fs.writeFile("photo.jpg", Buffer.from(await res.arrayBuffer()));
Python (requests)
import requests
with open("clip.mp4", "rb") as f:
r = requests.post(
"https://anytomarkdown.com/api/v1/convert",
headers={"Authorization": "Bearer fk_live_YOUR_KEY"},
files={"file": f},
data={"target": "mp3"},
)
open("clip.mp3", "wb").write(r.content)