← Back to Flashdown

Flashdown API

Base URL: https://api.flashdown.co.in

Same converter as the web tool — PDF, DOCX & TXT to Markdown — but over HTTP, for scripts, bots, and apps. Files are processed in memory and discarded immediately. Nothing is stored or logged.

Unlike the website (which runs 100% in your browser), the API does receive your file bytes — that's inherent to a server-side API. Use the website if your file must never leave your machine.

Authentication

Every request needs an API key, sent in one of two headers:

Keys are issued to developers on request — open an issue on the project's GitHub repository and one will be set up for you.

Convert a file

POST /convert

Multipart form (recommended)

The filename's extension (.pdf, .docx, .txt) selects the converter:

curl -X POST https://api.flashdown.co.in/convert \
  -H "Authorization: Bearer YOUR_KEY" \
  -F "file=@report.pdf"

Raw bytes

The Content-Type selects the converter:

curl -X POST https://api.flashdown.co.in/convert \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/pdf" \
  --data-binary @report.pdf

Content-Types: application/pdf, application/vnd.openxmlformats-officedocument.wordprocessingml.document, text/plain.

Response

{
  "ok": true,
  "source": { "name": "report.pdf", "type": "pdf", "bytes": 1240 },
  "chars": 208,
  "elapsedMs": 41,
  "markdown": "# REPORT\n\n..."
}

Errors return {"ok": false, "error": "..."} with these status codes:

Service info

GET /

Returns live usage docs as JSON — no key needed. The API supports CORS for browser clients.

Limits & notes


Examples

JavaScript

// Node 18+
import { readFileSync } from "node:fs";

const form = new FormData();
form.append("file", new Blob([readFileSync("report.pdf")]), "report.pdf");

const res = await fetch("https://api.flashdown.co.in/convert", {
  method: "POST",
  headers: { "Authorization": "Bearer YOUR_KEY" },
  body: form,
});
const { ok, markdown } = await res.json();

Python

import requests
r = requests.post(
    "https://api.flashdown.co.in/convert",
    headers={"Authorization": "Bearer YOUR_KEY"},
    files={"file": open("report.pdf", "rb")},
)
print(r.json()["markdown"])