v1 Last updated: July 2026

API Reference

ParseFlow extracts text, forms, and tables from PDFs and images using a single REST API. Compatible with AWS Textract and Google Document AI response formats.

# Quick Start

Try it now โ€” copy and run this command to extract data from a document:

Estimated response time: 300โ€“800 ms for single images, longer for multi-page PDFs (parallel processing).

curl
curl -X POST https://parseflow.cc/v1/document/analyze \
  -H "Authorization: Bearer ocrg_live_key" \
  -F "document=@invoice.pdf" \
  -F 'featureTypes=["FORMS","TABLES"]'
Response
{
  "DocumentMetadata": { "Pages": 1 },
  "Text": "Invoice #1042\nBilled to: Acme Corp...",
  "Forms": [
    { "key": "Invoice Number", "value": "1042", "confidence": 0.98 }
  ],
  "Tables": [{ "rows": [["Item", "Qty", "Price"]] }],
  "Confidence": 0.97,
  "Billing": { "totalCostCents": 1, "pages": 1 }
}

# At a Glance

AuthenticationBearer Token
InputPDF, PNG, JPG, JPEG
OutputJSON
Max PDF Pages50
Response Content-Typeapplication/json
CompatTextract + DocAI

# How It Works

๐Ÿ“„
Upload Document
โ†’
โš™๏ธ
ParseFlow Extracts
โ†’
๐Ÿ“‹
Structured JSON

# Common Use Cases

๐Ÿงพ Invoices
๐Ÿงพ Receipts
๐Ÿ“‹ Forms
๐Ÿฆ Bank Statements
๐Ÿชช Identity Documents
๐Ÿ“ Contracts

# Typical Performance

Document TypeTypical Latency
Single image (PNG/JPG)300โ€“800 ms
Multi-page PDF (10 pages)~3โ€“8 seconds (parallel)
Multi-page PDF (50 pages)~15โ€“30 seconds (parallel)

# Authentication

Every request requires an API key. Generate one from your dashboard. Each key is shown in full only once โ€” store it securely.

Pass the key in one of two ways:

MethodHeaderExample
BearerAuthorizationBearer ocrg_live_key
Headerx-api-keyoc rg_live_key

# Required Headers

HeaderRequiredValue
AuthorizationYesBearer <api_key>
Content-TypeFor JSONapplication/json (for base64 requests)

For multipart uploads, the Content-Type is set automatically by your HTTP client.

# Endpoint

POST /v1/document/analyze

Base URL: https://parseflow.cc

Response: application/json | API Version: v1 (stable, breaking changes will bump to v2)

# Supported Formats

FormatMIME TypeMax SizeMax Pages
PDFapplication/pdf40 MB50
PNGimage/png40 MBโ€”
JPEG / JPGimage/jpeg40 MBโ€”

The 40 MB limit is the raw upload size (multer config). PDFs are decoded internally โ€” the rendered image sent to the vision model is smaller.

# Request

Send your document as a multipart file upload or as JSON with base64-encoded bytes.

Multipart (file upload)

curl -X POST https://parseflow.cc/v1/document/analyze \
  -H "Authorization: Bearer ocrg_live_key" \
  -F "document=@invoice.pdf" \
  -F 'featureTypes=["FORMS","TABLES"]'

JSON (base64 bytes)

curl -X POST https://parseflow.cc/v1/document/analyze \
  -H "Authorization: Bearer ocrg_live_key" \
  -H "Content-Type: application/json" \
  -d '{
  "document": { "bytes": "iVBORw0KGgo...", "mimeType": "image/png" },
  "featureTypes": ["FORMS", "TABLES"]
}'

Request Parameters

ParameterTypeReq.Description
documentfile / objectYesThe document file (multipart) or { bytes, mimeType } object
document.bytesstringWith JSONBase64-encoded document content
document.mimeTypestringNoMIME type (default: image/png). Use application/pdf for PDFs
featureTypesstring[]NoFeatures to enable (FORMS, TABLES, EXPENSE)

# Response (Native Format)

The native response includes both an aggregate view and per-page detail. Only successful pages are billed โ€” pages that fail to render are reported with an Error field and not charged.

Switch to Textract or DocAI formats from dashboard settings.

{
  "DocumentMetadata": { "Pages": 1 },
  "Text": "Invoice #1042\nBilled to: Acme Corp...",
  "Forms": [
    { "key": "Invoice Number", "value": "1042", "confidence": 0.98, "page": 1 }
  ],
  "Tables": [{ "rows": [["Item", "Qty", "Price"]], "page": 1 }],
  "Confidence": 0.97,
  "NeedsReview": false,
  "Pages": [{ /* per-page detail */ }],
  "Billing": { "totalCostCents": 1, "pages": 1, "failedPages": 0 }
}

# Response Formats

Switch between three response formats from Dashboard โ†’ Settings โ†’ Response format. No API changes needed.

DefaultParseFlow (native)

Structured JSON with Text, Forms, Tables, per-page Pages, and Billing.

TextractAWS Textract-compatible

Returns Blocks[] with PAGE, LINE, KEY_VALUE_SET, TABLE, CELL block types. Drop-in replacement.

DocAIGoogle Document AI-compatible

Returns document.text, pages[].formFields, entities[], and documentLayout.blocks.

# Feature Types

The featureTypes array controls extraction features. Billing is at the rate of the most expensive tier requested.

FeaturePrice / 1K pagesDescription
"TEXT" (default)$1.00Plain text extraction in reading order
"FORMS"$8.00Key-value field pairs with per-field confidence
"TABLES"$5.00Table detection and cell extraction
"EXPENSE"$4.00Receipt / expense-specific field extraction

# Multi-Page PDFs

PDFs are auto-detected (by MIME type or file header) and split into one image per page. Each page runs through the same extraction pipeline independently.

  • Up to 50 pages per request (safety cap)
  • Processed in parallel with configurable concurrency (default 3)
  • Per-page confidence check and escalation
  • Only successful pages are billed โ€” failed pages (render errors) return "Error" and are not charged
  • Scanned/image-based PDFs and embedded-font PDFs work best

# Billing & Wallet

Prepaid wallet model. Credits are deducted after each successful extraction.

  • Free trial โ€” $5.00 credits on first signup
  • Top up from dashboard via Razorpay Checkout
  • 402 insufficient_balance if wallet can't cover estimated cost
  • Failed pages are not billed
  • Full transaction history in dashboard

# Error Codes

StatusErrorMeaning
401unauthorizedMissing or invalid API key
402insufficient_balanceWallet balance too low. Top up.
400bad_requestInvalid request format or missing parameters
429too_many_requestsRate limit exceeded. Retry after the window resets.
502extraction_failedVision API error. Check document and retry.

Example Error Responses

// 401 Unauthorized
{ "error": "unauthorized", "message": "Missing API key." }

// 402 Insufficient Balance
{ "error": "insufficient_balance",
  "message": "Insufficient wallet balance. You have $0.00 but this request needs at least $0.01.",
  "balanceCents": 0, "requiredCents": 1 }

// 400 Bad Request (missing document)
{ "error": "bad_request",
  "message": "Provide a file under the "document" field, or JSON body." }

// 413 File Too Large
{ "error": "entity_too_large",
  "message": "File exceeds the 40 MB size limit." }

// 429 Rate Limited
{ "error": "too_many_requests",
  "message": "Rate limit exceeded. Try again later." }

// 500 Internal Error
{ "error": "internal_error",
  "message": "Something went wrong. Please try again." }

// 502 Extraction Failed
{ "error": "extraction_failed",
  "message": "Document extraction failed. Check the document format or try again later." }

# Rate Limits

The extraction and usage endpoints are rate-limited to 60 requests per minute per IP address. Exceeded requests return HTTP 429 with a Retry-After header.

# Migration from Competitors

ParseFlow is designed as a drop-in replacement for AWS Textract and Google Document AI. Change your response format in dashboard settings โ€” your existing integration code continues to work.

From AWS Textract

  1. Generate a ParseFlow API key from the dashboard
  2. Set response format to "AWS Textract-compatible" in settings
  3. Replace your Textract endpoint URL with https://parseflow.cc/v1/document/analyze
  4. Replace your AWS credentials with the Bearer token
  5. That's it โ€” your existing code that parses Blocks[] works unchanged

Note: ParseFlow does not require S3 buckets, IAM roles, Lambda functions, or complex infrastructure setup.

From Google Document AI

  1. Generate a ParseFlow API key from the dashboard
  2. Set response format to "Google Document AI-compatible" in settings
  3. Replace your Document AI endpoint with https://parseflow.cc/v1/document/analyze
  4. Replace your GCP credentials with the Bearer token
  5. Your existing code that parses document.text and entities[] works unchanged

# FAQ

What file types are supported?

PDF, PNG, JPG/JPEG. TIFF support is available on request.

What is the maximum file size?

40 MB per upload.

What is the maximum number of pages?

50 pages per request. Split larger documents client-side.

Is handwriting supported?

Depends on the underlying model. Gemini 2.5 Flash handles some handwriting, but typed/printed text is preferred.

Are scanned PDFs supported?

Yes โ€” scanned PDFs are image-based and work with the same vision pipeline.

Are password-protected PDFs supported?

No. Remove password protection before uploading.

How do I migrate from AWS Textract?

See the Migration section above. Set your response format to Textract-compatible in settings, update your endpoint and auth, and your existing code works.

# Need Help?

Have questions or ran into an issue? Reach out to us:

# Next Steps