BlazeDocs documentation
PDF to Markdown for coding agents by default, with optional table-preserving HTML when agents need layout fidelity. The BlazeDocs CLI is the primary surface; an HTTP API and an Agent Skill ship alongside it. Install once, run from any shell, script it in CI, or hand it to your coding agent.
Three steps from zero to converted Markdown. Add --output-format html when tables and formatting matter.
blazedocs convert against any PDF.node --version # v18 or newer
npm install -g blazedocs
blazedocs # guided setup, prompts for API key
blazedocs convert ./paper.pdf --output paper.md
blazedocs convert ./paper.pdf --output-format html --output paper.htmlPrefer non-interactive auth? Set BLAZEDOCS_API_KEY in the environment and skip the setup step.
The CLI ships as a single npm package. Pick the package manager you already use after confirming Node.js 18 or later.
node --version
npm install -g blazedocs
pnpm add -g blazedocs
yarn global add blazedocs
bun add -g blazedocsVerify the install:
blazedocs --version
blazedocs version
blazedocs --help
blazedocs helpYour Node.js version is too old. The BlazeDocs CLI requires Node.js 18+. Upgrade Node.js, then reinstall the latest CLI package:
node --version
npm install -g blazedocs@latestGenerate an API key from Dashboard → API Keys. Keys begin with bd_live_.
# Interactive — prompts for the key, stores it at ~/.blazedocs/config.json (mode 0600)
blazedocs login
# Or pipe the key in (CI-friendly)
echo "$MY_KEY" | blazedocs login --api-key-stdin
# Confirm the active identity
blazedocs whoamiFor CI and agent workflows, set BLAZEDOCS_API_KEY. It overrides the stored config.
export BLAZEDOCS_API_KEY=bd_live_xxxxxxxxxx
blazedocs convert ./paper.pdfPass the key via either header:
Authorization: Bearer bd_live_xxxxxxxxxx
# or
x-api-key: bd_live_xxxxxxxxxxblazedocs convert ./paper.pdf --output paper.md
blazedocs convert ./paper.pdf --output-format html --output paper.htmlblazedocs convert https://example.com/report.pdf --output report.mdblazedocs --raw convert ./paper.pdf | pbcopy# Continue through failures, write summary.json, emit JSONL
blazedocs convert --batch ./*.pdf \
--concurrency 1 \
--on-error continue \
--summary summary.json \
--jsonblazedocs convert ./a.pdf ./b.pdf ./c.pdf --output ./markdown/Avoid double-billing when your job runner retries the process:
blazedocs convert ./report.pdf \
--idempotency-key job-2026-04-25-001 \
--jsonblazedocs convert ./*.pdf --json | jq -c 'select(.type=="result")'# Checks auth, network, config, Node version, disk, and CLI version
blazedocs doctor --jsonMarkdown to stdout (or to --output), with a small status footer. Designed for humans.
JSONL on stdout, one envelope per line. A successful conversion:
{
"type": "result",
"data": {
"markdown": "# Title\n\n...",
"page_count": 12,
"token_count": 4200,
"processing_time_ms": 1234,
"file_name": "paper.pdf",
"usage": {
"pages_used": 42,
"pages_limit": 1000,
"pages_remaining": 958
}
}
}When --output is set, the payload also includes written_to.
Pure payload only — for convert that means Markdown by default, or HTML with --output-format html. No progress, no banner, no footer. Pipe-safe.
{
"total": 2,
"succeeded": 1,
"failed": 1,
"results": [
{
"input": "a.pdf",
"status": "failed",
"error": {
"code": "QUOTA_EXCEEDED",
"message": "slow down",
"exit_code": 2
}
},
{
"input": "b.pdf",
"status": "succeeded",
"pages": 3,
"tokens": 42
}
]
}Errors go to stderr as a single JSON line:
{
"error": {
"code": "AUTH_REQUIRED",
"message": "Not authenticated.",
"hint": "Run `blazedocs` to open setup, or set BLAZEDOCS_API_KEY.",
"exit_code": 3
}
}blazedocs convert <file-or-url...> [--output <path>] [--output-format markdown|html] [--batch]
blazedocs usage
blazedocs whoami
blazedocs doctor
blazedocs skills get core
blazedocs skills install
blazedocs skills list
blazedocs login [--api-key-stdin]
blazedocs logout| Flag | Effect |
|---|---|
| --json | Structured JSON on stdout; structured error JSON on stderr. |
| --raw | Pure payload only. For convert, Markdown only. |
| --silent | Suppress progress output. CI-compatible. |
| --yes | Accept interactive defaults. Agents and CI set this. |
| --version | Print the version. |
| --help | Print help. |
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Generic failure: file not found, network error, invalid args, or API error |
| 2 | Quota or rate limit exceeded |
| 3 | Authentication required or invalid |
Returned in the error.code field of structured (--json) output. Safe to switch on.
AUTH_REQUIRED QUOTA_EXCEEDED NETWORK_ERROR API_ERROR
FILE_NOT_FOUND INVALID_ARGS SKILL_NOT_FOUND INTERNAL| Variable | Effect |
|---|---|
| BLAZEDOCS_API_KEY | Overrides ~/.blazedocs/config.json. Agents and CI prefer this. |
| BLAZEDOCS_INTERACTIVE | Set 0 to force non-interactive, 1 to force interactive. |
| BLAZEDOCS_SKIP_UPDATE_CHECK | 1 disables npm registry upgrade checks. |
| BLAZEDOCS_NO_BANNER | 1 suppresses the ANSI banner on TTY. |
| BLAZEDOCS_ASCII_LOGO | 1 swaps Unicode block chars for plain ASCII logo. |
| NO_COLOR | Any non-empty value disables ANSI colors. |
| CI | Any non-empty value suppresses interactive prompts. |
login live at ~/.blazedocs/config.json with mode 0600.BLAZEDOCS_API_KEY wins over the config file.The Agent Skill teaches Claude Code, Cursor, Codex, and any skill.sh-compatible coding agent how to use the BlazeDocs CLI: commands, flags, output shapes, and recovery paths.
npx skills add https://github.com/kyle93afc/blazedocs-cli --skill blazedocsThis uses the same installer and location discovery as the rest of the agent-skill ecosystem.
blazedocs skills install
blazedocs skills install --target-dir ~/.claude/skills --forceOnce installed, an agent can call blazedocs skills get core to load the full operations manual: commands, flags, exit codes, JSON shapes, and common recovery paths.
Use the HTTP API directly when you cannot run the CLI — for example, from a serverless function in a non-Node runtime, or from a language that has no Node bridge. For everything else, prefer the CLI.
Multipart upload:
curl -X POST https://blazedocs.io/api/v1/convert -H "Authorization: Bearer bd_live_YOUR_KEY" -F "file=@paper.pdf" -F "output_format=html"Or base64-encoded JSON:
curl -X POST https://blazedocs.io/api/v1/convert -H "Authorization: Bearer bd_live_YOUR_KEY" -H "Content-Type: application/json" -d '{"file_base64": "<base64-pdf>", "file_name": "paper.pdf", "output_format": "html"}'Set output_format to html when you need a browser-ready document with complex tables preserved as HTML, including rowspan/colspan. Omit it, or pass markdown, for the default Markdown output.
Response:
{
"success": true,
"data": {
"output_format": "html",
"content": "<!doctype html>...",
"markdown": "# Document Title
[tbl-0.html](tbl-0.html)",
"html": "<!doctype html>...<table>...</table>...",
"table_count": 3,
"page_count": 5,
"token_count": 4820,
"processing_time_ms": 3200,
"file_name": "paper.pdf"
},
"usage": {
"pages_used": 45,
"pages_limit": 500,
"pages_remaining": 455
}
}Returns your current tier, usage, and limits without performing a conversion.
curl https://blazedocs.io/api/v1/convert \
-H "Authorization: Bearer bd_live_YOUR_KEY"{
"tier": "starter",
"usage": {
"monthlyConversions": 12,
"monthlyPages": 45,
"monthlyTokens": 52000
},
"limits": {
"conversions": 50,
"pages": 500,
"tokens": 500000,
"fileSize": 20971520
}
}Every response includes:
| Header | Description |
|---|---|
| X-RateLimit-Limit | Total pages allowed per month |
| X-RateLimit-Remaining | Pages remaining this month |
| X-RateLimit-Reset | Unix timestamp when limits reset |
Connect lets a third-party tool obtain a BlazeDocs API key with a single user-approval click instead of asking the user to navigate the dashboard. It is intended for SDK and integration authors. For everyday CLI use, run blazedocs login.
# 1. Create a session
curl -X POST https://blazedocs.io/api/connect/session \
-H "Content-Type: application/json" \
-d '{"provider": "openclaw"}'
# -> { "sessionId": "...", "approvalUrl": "..." }
# 2. Open approvalUrl in a browser. User clicks Approve.
# 3. Exchange the session for an API key
curl -X POST https://blazedocs.io/api/connect/exchange \
-H "Content-Type: application/json" \
-d '{"sessionId": "..."}'
# -> { "apiKey": "bd_live_..." }CLI and API share the same monthly quota. Limits reset on the first of each calendar month UTC.
| Plan | Price | Pages / mo | Best for |
|---|---|---|---|
| Free | $0 | 3 conversions, first 5 pages each | Testing & evaluation |
| Starter | $7.99/mo | 500 | Side projects & personal use |
| Pro | $14.99/mo | 2,500 | RAG pipelines & AI agents |
| Enterprise | $49.99/mo | 10,000 | Production workloads |
Prices shown for annual billing. Monthly billing is on the pricing page.
Need more? support@blazedocs.io for custom enterprise pricing.
All HTTP errors share a consistent format. For CLI error codes, see Flags & exit codes.
{
"success": false,
"error": "Human-readable error message",
"code": "ERROR_CODE"
}| Status | Code | Description |
|---|---|---|
| 400 | BAD_REQUEST | Missing file, invalid PDF, or malformed request body |
| 401 | UNAUTHORIZED | Invalid or missing API key |
| 413 | FILE_TOO_LARGE | PDF exceeds your plan's file size limit |
| 415 | UNSUPPORTED_TYPE | Content-Type must be multipart/form-data or application/json |
| 429 | RATE_LIMITED | Monthly conversion limit exceeded — upgrade your plan |
| 500 | SERVER_ERROR | Internal error — retry or contact support |
Free tier includes 3 conversions per month. No credit card required. Install the CLI, run blazedocs, and you are ready in under a minute.