Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.case.dev/llms.txt

Use this file to discover all available pages before exploring further.

Convert documents between formats using SuperDoc’s high-fidelity conversion engine.

Usage

curl -X POST https://api.case.dev/superdoc/v1/convert \
  -H "Authorization: Bearer sk_case_YOUR_API_KEY" \
  -F "file=@document.docx" \
  -F "from=docx" \
  -F "to=pdf" \
  -o output.pdf

# JSON body with base64
curl -X POST https://api.case.dev/superdoc/v1/convert \
  -H "Authorization: Bearer sk_case_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document_base64": "IyBIZWxsbyBXb3JsZA==",
    "from": "md",
    "to": "docx"
  }' \
  -o output.docx

# JSON body with URL
curl -X POST https://api.case.dev/superdoc/v1/convert \
  -H "Authorization: Bearer sk_case_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document_url": "https://example.com/document.docx",
    "from": "docx",
    "to": "pdf"
  }' \
  -o output.pdf

Parameters

ParameterTypeRequiredDescription
fileFileOne ofDocument file (multipart upload)
document_urlstringOne ofURL to fetch document from
document_base64stringOne ofBase64-encoded document content
fromstringYesSource format: docx, md, html
tostringNoTarget format: pdf, docx. Default: pdf

Supported conversions

FromToNotes
docxpdfFull fidelity conversion
mddocxConverts Markdown to Word
mdpdfMarkdown to PDF (via DOCX)
htmldocxHTML content to Word

Response

Returns the converted document as binary data with appropriate content type:
  • application/pdf for PDF output
  • application/vnd.openxmlformats-officedocument.wordprocessingml.document for DOCX output

Examples

Convert uploaded file

curl -X POST https://api.case.dev/superdoc/v1/convert \
  -H "Authorization: Bearer $CASEDEV_API_KEY" \
  -F "file=@document.docx" \
  -F "from=docx" \
  -F "to=pdf" \
  -o converted.pdf

Generate Word doc from Markdown

curl -X POST https://api.case.dev/superdoc/v1/convert \
  -H "Authorization: Bearer $CASEDEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document_base64": "IyBRdWFydGVybHkgUmVwb3J0Li4u",
    "from": "md",
    "to": "docx"
  }' \
  -o report.docx

Limits

LimitValue
Max file size25 MB
Concurrent requests10 per API key