Prerequisites
Before you begin, make sure you have:- A FlexOrch account. Sign up for free at app.flexorch.com — no credit card required on the Trial plan.
- An API key. Generate one under Settings → API Keys. It will look like
dfx_xxxxxxxxxxxxxx. See API Keys for details. curl(or any HTTP client) available in your terminal.
Each processed document consumes one credit. Trial accounts include 1,200 credits valid for 30 days — more than enough to follow this guide.
Steps
Send your file to the async processing endpoint using a
multipart/form-data POST request. Replace dfx_your_key_here with your actual API key and invoice.pdf with a real file path.curl -X POST https://api.flexorch.com/v1/data-process/async \
-H "X-API-KEY: dfx_your_key_here" \
-F "files=@invoice.pdf"
Processing is asynchronous. Use the job status endpoint to check when your document is ready. Replace
job_abc123 with the ID you received above.Poll every few seconds until
status changes from queued or running to completed (or failed). A completed response looks like this:{
"data": {
"status": "completed",
"detected_language": "en",
"quality": {
"score": 91,
"grade": "A"
},
"pii_findings_count": 2,
"privacy_applied": true,
"processing_summary": {
"fields": {
"vendor": "Acme Ltd.",
"total_amount": 12500.00,
"currency": "EUR"
}
}
}
}
A
quality.grade of A (score 85–100) means the document is clean and ready for production use. Grades B through D indicate progressively lower extraction confidence — see Core Concepts for the full grading scale.The
processing_summary.fields object contains the structured data FlexOrch extracted — vendor name, amounts, currency, and any other fields detected for the document type. The pii_findings_count tells you how many personal data items were found, and privacy_applied: true confirms that PII masking was applied before the result was stored.Full example with a Python script
If you prefer to automate polling rather than running curl commands manually, here is a minimal Python script that uploads a file and waits for completion:Next steps
Pipeline Deep Dive
Understand every step of the FlexOrch pipeline — extraction, classification, PII detection, and quality scoring.
Build a Dataset
Curate completed job results into a dataset and export to JSONL, Parquet, CSV, Markdown, and more.
Python SDK
Install
flexorch-sdk and process documents with just a few lines of Python.API Reference
Explore every endpoint, request parameter, and response schema in the full API reference.