Introduction
Graflows is a high-performance Document Intelligence API designed for the modern stack. It provides developers with the tools to convert unstructured PDFs and images into highly accurate, structured JSON data while preserving complex layout patterns and table structures.
Maintains the spatial relationships of text and tables for precise extraction.
Optimized for speed, from small receipts to thousand-page reports.
Authentication
All Graflows API requests require an API key to be sent in the header. Requests without a valid key will return a 401 Unauthorized response.
Where to find your API key?
Log in to your developer dashboard to manage your API keys, monitor usage, and view analytics.
Extraction Modes
Synchronous ExtractionRecommended for UI
Best for real-time applications where immediate feedback is required. The connection stays open until the processing is complete.
Asynchronous JobsBatch Processing
Designed for processing large volumes of documents or long files. Upload the file, receive a job_id, and poll for results.
Schema Guide
Define exactly what you want to extract using a dynamic JSON schema. Graflows supports simple key-value pairs and complex nested structures.
Complex Invoice Example
{
"invoice_number": "Invoice ID string",
"vendor_name": "Name of the issuer",
"total_amount": "Total amount in numeric value",
"line_items": {
"_type": "list",
"_description": "A list of individual charges",
"description": "Item description",
"quantity": "Number of units",
"price": "Price per unit"
}
}Use the "_type": "list" convention to handle repeating structures like invoice line items or table rows.
API Reference
/parse/extractPerforms immediate extraction on documents under 3 pages.
curl -X POST http://api.graflows.com/api/v1/parse/extract \
-H "Authorization: Bearer <API_KEY>" \
-F "file=@invoice.pdf" \
-F 'extraction_schema={"total": "Total amount"}'/jobs/Creates a background processing job for large documents.
curl -X POST http://api.graflows.com/api/v1/jobs/ \ -H "Authorization: Bearer <API_KEY>" \ -F "file=@large-report.pdf"
/jobs/{id}Retrieve the status and results of an async job.
/parse/markdownUtility endpoint to export document contents as clean Markdown.
curl -X POST http://api.graflows.com/api/v1/parse/markdown \ -H "Authorization: Bearer <API_KEY>" \ -F "file=@document.pdf"