Foldbun Stack
中Get an API keyComing soon
Text and documents

PaddleOCR-VL API: document parsing to Markdown

Model licence: Apache 2.0

PaddleOCR-VL parses document pages into ordered blocks — titles, text, tables, formulas, figures — with boxes, and returns the page as Markdown.

Read the docsGet an API keyComing soonAPI reference

Price

Billed itemUnitCredits
Document parsing
One page image per request.
per page2
≈ US$0.002 top-up

Available to accounts with a balance (paid pool). Prices are in credits. Failed calls cost nothing.

Sample results

Recorded responses of the API on sample images.

Research paper page: 25 parsed blocks coloured by type.
Research paper page1 page25 blocks
Invoice: 15 parsed blocks coloured by type.
Invoice1 page15 blocks
Textbook page (Chinese): 15 parsed blocks coloured by type.
Textbook page (Chinese)1 page15 blocks

Request and response

POST https://api.stack.foldbun.com/v1/documents/parse with a Bearer API key.

API reference
# macOS: replace "base64 -w0 paper.webp" with "base64 -i paper.webp"
curl https://api.stack.foldbun.com/v1/documents/parse \
  -H "Authorization: Bearer $FOLDBUN_API_KEY" \
  -H "Content-Type: application/json" \
  -d @- <<EOF
{"model": "paddleocr-vl", "image": {"base64": "$(base64 -w0 paper.webp)"}}
EOF
import base64, os, requests

with open("paper.webp", "rb") as f:
    image = base64.b64encode(f.read()).decode()

r = requests.post(
    "https://api.stack.foldbun.com/v1/documents/parse",
    headers={"Authorization": f"Bearer {os.environ['FOLDBUN_API_KEY']}"},
    json={"model": "paddleocr-vl",
          "image": {"base64": image}},
    timeout=60,
)
r.raise_for_status()
print(r.json())
Response (shortened)
{
  "id": "call_01a1913d-dc14-782f-af48-5f8d60683e0d",
  "model": "paddleocr-vl",
  "image": {"height": 1426, "id": "img_a01c9472…eb84", "width": 1008},
  "blocks": [
    {
      "type": "title",
      "order": 0,
      "bbox": [187, 65, 820, 135],
      "text": "Cell-Aware Hashing for Compact and Robust Large-Scale Image Retrieval",
      "markdown": "# Cell-Aware Hashing for Compact and Robust Large-Scale Image Retrieval"
    }
    … 24 more
  ],
  "markdown": "# Cell-Aware Hashing for Compact and Robust Large-Scale Image Retrieval\\n\\nTobias Reinholt$^…",
  "pages": 1,
  "cost": 2,
  "balance": 1232.56
}

Request fields

FieldDescription
imageOne page as {"base64": "…"} or {"id": "img_…"} from an earlier response.
options.blocksInclude blocks, default true. With false, only markdown is returned.

Pricing examples

CallCredits
1 page
2
2
≈ US$0.002 top-up
10 pages
10 × 2
20
≈ US$0.02 top-up
1,000 pages
1,000 × 2
2000
≈ US$2.00 top-up

Limits

Images
JPEG, PNG, static WebP; up to 20 MiB and 40 megapixels
Pages per call
1
Coordinates
Pixels of the original page image with EXIF orientation applied
Rate limit
Depends on the account tier; see GET /v1/models

Frequently asked questions

How is PaddleOCR-VL billed?

Each call parses one page and costs 2.0 credits. The model is in the paid pool, available to accounts with a balance. Failed calls cost nothing.

What does the response contain?

The page as Markdown (tables as HTML tables, formulas as LaTeX) and, unless options.blocks is false, an ordered list of blocks with type, reading order, box, text and Markdown.

Which block types are returned?

text, title, table, formula, figure, caption, header, footer, list and other.

Related models

Models and pricing

Foldbun Stack — pay-per-use vision model API

Call PaddleOCR-VL through the REST API; the docs list request and response formats.

Read the docsGet an API keyComing soon