Quick Start
Upload a document and retrieve structured data in under two minutes.
01 — Upload a document
Send your file as multipart/form-data. Supported formats: PDF, Word, Excel, images, and emails.
- cURL
- Python
curl -X POST https://api.feld.ai/v1/documents \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@invoice.pdf" \
-F 'metadata={"vendor": "Acme Corp"}'
import requests
response = requests.post(
"https://api.feld.ai/v1/documents",
headers={"Authorization": "Bearer YOUR_API_KEY"},
files={"file": ("invoice.pdf", open("invoice.pdf", "rb"))},
data={"metadata": '{"vendor": "Acme Corp"}'},
)
document = response.json()
print(document["id"]) # e.g. "d7a8f3e1-..."
Response — 201 Created
{
"type": "document",
"id": "d7a8f3e1-4b2c-4e5a-9f1d-6c8b3a2e7d4f",
"name": "invoice.pdf",
"status": "pending",
"page_count": null,
"created_at": "2025-01-15T10:30:00Z"
}
Save the id — you'll need it for the next steps.
02 — Wait for processing
The document moves through pending → processing → completed. Poll the status endpoint until it's ready.
- cURL
- Python
curl https://api.feld.ai/v1/documents/{document_id} \
-H "Authorization: Bearer YOUR_API_KEY"
import time
doc = {"status": "pending"}
while doc["status"] not in ("completed", "failed"):
time.sleep(2)
doc = requests.get(
f"https://api.feld.ai/v1/documents/{document_id}",
headers={"Authorization": "Bearer YOUR_API_KEY"},
).json()
Most documents are processed within 10–30 seconds.
03 — Extract structured data
Once the document is completed, trigger an extraction job with your schema.
Summary, extraction, classification, and splitting jobs all require the document to be indexed (status completed) before they can run. If you submit a job while the document is still indexing, the job waits for indexing to finish, but may fail if indexing does not complete within the processing window. For time-sensitive workflows, upload documents in advance so indexing happens before you need the results.
- cURL
- Python
curl -X POST https://api.feld.ai/v1/extractions/jobs \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"document_id": "{document_id}",
"schema_id": "{schema_id}"
}'
job = requests.post(
"https://api.feld.ai/v1/extractions/jobs",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"document_id": document_id,
"schema_id": schema_id,
},
).json()
print(job["id"]) # job_id for polling
04 — Retrieve results
Poll the job until status is completed, then read the extracted fields:
- cURL
- Python
curl https://api.feld.ai/v1/extractions/jobs/{job_id} \
-H "Authorization: Bearer YOUR_API_KEY"
result = requests.get(
f"https://api.feld.ai/v1/extractions/jobs/{job_id}",
headers={"Authorization": "Bearer YOUR_API_KEY"},
).json()
print(result["data"])
Next steps
- Authentication — API key management and security
- Error handling — Error types and status codes
- API Reference — Full endpoint documentation