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.

Endpoint
GET /ocr/v1/:id/download/:type

Output formats

TypeDescription
textPlain text extraction
jsonStructured data with word coordinates and confidence
pdfSearchable PDF with invisible text layer

Download text

curl https://api.case.dev/ocr/v1/JOB_ID/download/text \
  -H "Authorization: Bearer sk_case_YOUR_API_KEY" \
  -o extracted.txt

Download searchable PDF

The searchable PDF looks identical to the original but has an invisible text layer. Users can Ctrl+F to search.
curl https://api.case.dev/ocr/v1/JOB_ID/download/pdf \
  -H "Authorization: Bearer sk_case_YOUR_API_KEY" \
  -o searchable.pdf

Download structured JSON

JSON includes word-level bounding boxes, confidence scores, and table structures.
curl https://api.case.dev/ocr/v1/JOB_ID/download/json \
  -H "Authorization: Bearer sk_case_YOUR_API_KEY" \
  -o ocr-data.json
JSON structure
{
  "pages": [
    {
      "page_number": 1,
      "width": 612,
      "height": 792,
      "blocks": [
        {
          "type": "text",
          "text": "DEPOSITION OF JOHN SMITH",
          "confidence": 0.98,
          "bbox": {"x": 72, "y": 72, "width": 468, "height": 24},
          "words": [
            {
              "text": "DEPOSITION",
              "confidence": 0.99,
              "bbox": {"x": 72, "y": 72, "width": 120, "height": 24}
            }
          ]
        }
      ]
    }
  ],
  "tables": [...],
  "metadata": {
    "page_count": 150,
    "engine": "doctr"
  }
}

Complete workflow

casedev llm:v1:chat create-completion \
  --model anthropic/claude-sonnet-4.5 \
  --message '{role: user, content: "Summarize this deposition."}'