Base URL: https://ocr-api.thedrake.ai
Version: v1
Auth: API key required on protected endpoints
Provide your API key in either of these ways:
X-API-Key: <YOUR_API_KEY>?api_key=<YOUR_API_KEY>Keep your API key secret. Rotate immediately if exposed.
/v1/health{"status":"ok"}/v1/ocr/imagemultipart/form-datafile: image file (png, jpg, jpeg)json
{ "text": "...markdown text..." }bash
curl -H "X-API-Key: <YOUR_API_KEY>" \
-F "file=@/path/to/image.jpg" \
https://ocr-api.thedrake.ai/v1/ocr/image/v1/ocr/pdfmultipart/form-datafile: PDF filejson
{ "text": "...markdown text...", "pages": 3 }bash
curl -H "X-API-Key: <YOUR_API_KEY>" \
-F "file=@/path/to/file.pdf" \
https://ocr-api.thedrake.ai/v1/ocr/pdf/v1/exportapplication/json
json
{ "text": "# Title\nHello", "format": "docx" }
Format options: docx, pdfjson
{
"content": "<base64>",
"filename": "extracted_text.docx",
"mime": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
}bash
curl -sS -H "Content-Type: application/json" \
-H "X-API-Key: <YOUR_API_KEY>" \
-d '{"text":"# Title\nHello","format":"pdf"}' \
https://ocr-api.thedrake.ai/v1/export \
| python - <<'PY'
import sys, json, base64
r=json.load(sys.stdin)
with open(r['filename'], 'wb') as f:
f.write(base64.b64decode(r['content']))
print('Saved', r['filename'])
PYGET /v1/openapi.json