This guide covers getting a Nutrient Data Extraction API key and sending a first parse request. Start with auto as the recommended starting mode for evaluation. It routes each page to structure, understand, or agentic and bills at the selected mode’s rate.
Before uploading documents, review the retention and processing-location rules. Free enables internal retention for improvement and training by default. On retention-enabled plans, don’t upload special-category or sensitive personal data, such as health, biometric, or government identification data. Upgrading later doesn’t erase earlier retained submissions, so follow the deletion-request guidance.
Nutrient may offer Enterprises an evaluation subscription with different quotas or with data retention disabled. Contact Nutrient before uploading documents if you need different settings.
For account security and security-review documents, refer to the security guide.
If you already have an API key, this request extracts content from a PDF with auto routing:
curl -X POST https://api.nutrient.io/extraction/parse \ -H "Authorization: Bearer your_api_key_goes_here" \ -F "file=@document.pdf" \ -F 'instructions={"mode":"auto","output":{"format":"spatial"}}'This request returns structured elements with bounding boxes and confidence scores. Omitting mode uses the API’s understand fallback; select auto explicitly to enable routing.
Step-by-step setup
Follow these steps to create an account, get an API key, and run your first request.
Enterprises can evaluate within free-tier quotas. See pricing and evaluation eligibility for the Enterprise definition and restrictions.
1. Sign up
Go to the Nutrient dashboard(opens in a new tab) and create an account. If you already have a Nutrient DWS account, skip to step 2.
2. Get your API key
Open the API keys page(opens in a new tab) in the dashboard and copy a live API key. Live keys start with pdf_live_.
By default, a live key works with every DWS integration enabled for your account. Create a scoped live key when an integration requires restricted access.
DWS Data Extraction API and DWS Processor API can use separate API keys. If /extraction/* returns 403, verify that the key is enabled for the Data Extraction API. Some accounts use global DWS API keys that work with both products.
3. Send your first request
Use the API key to upload a local PDF with auto routing and return structured spatial elements:
curl -X POST https://api.nutrient.io/extraction/parse \ -H "Authorization: Bearer your_api_key_goes_here" \ -F "file=@document.pdf" \ -F 'instructions={"mode":"auto","output":{"format":"spatial"}}'import requests
response = requests.post( "https://api.nutrient.io/extraction/parse", headers={"Authorization": "Bearer your_api_key_goes_here"}, files={"file": open("document.pdf", "rb")}, data={ "instructions": '{"mode":"auto","output":{"format":"spatial"}}' },)
print(response.json())import { readFile } from "node:fs/promises";
const form = new FormData();form.append("file", new Blob([await readFile("document.pdf")]), "document.pdf");form.append( "instructions", JSON.stringify({ mode: "auto", output: { format: "spatial" } }),);
const response = await fetch("https://api.nutrient.io/extraction/parse", { method: "POST", headers: { Authorization: "Bearer your_api_key_goes_here" }, body: form,});
const result = await response.json();console.log(result);POST /extraction/parse HTTP/1.1Host: api.nutrient.ioAuthorization: Bearer your_api_key_goes_hereContent-Type: multipart/form-data; boundary=boundary
--boundaryContent-Disposition: form-data; name="file"; filename="document.pdf"Content-Type: application/pdf
<binary PDF data>--boundaryContent-Disposition: form-data; name="instructions"Content-Type: application/json
{"mode":"auto","output":{"format":"spatial"}}--boundary--4. Review the response
The API returns a JSON response with extracted document elements:
{ "status": 200, "requestId": "req_e5f6g7h8", "output": { "elements": [ { "id": "a1b2c3d4-1111-4000-8000-000000000001", "type": "paragraph", "role": "Title", "text": "Quarterly Report", "confidence": 0.95, "readingOrder": 0, "bounds": { "x": 100, "y": 50, "width": 400, "height": 35 }, "page": { "pageIndex": 0, "pageNumber": 1, "width": 1818, "height": 2422 } } ] }, "metrics": { "processingTimeMs": 4200, "pagesProcessed": 1 }, "configuration": { "mode": "auto", "outputFormat": "spatial" }}The configuration.mode field echoes the requested auto mode. Each element includes its type, text content, spatial coordinates (bounds), detection confidence, and page reference. Refer to extract document elements for the full element schema.
Next steps
- Extract document elements — Learn about all element types and spatial output options.
- Extract Markdown — Get whole-document Markdown instead of structured elements.
- Extract structured data — Map a document to your own JSON Schema with the extract endpoint.
- Classify documents — Score a document against your own labels and route it with the classify endpoint.
- Refer to the split endpoint guide to detect document boundaries in merged files.
- Multilingual extraction — Process documents in other languages.
- API overview — Review request formats, authentication, and response structure.
- Interactive demos(opens in a new tab) — Browse open source browser demos showing grounded extraction across healthcare, legal, mortgage, and real estate documents.