At a glance
- Availability: Experimental (how to enable).
- Auth: API key.
- Connection: The key from
UNSTRUCTURED_API_KEYis sent as theunstructured-api-keyheader. - Docs: https://docs.unstructured.io/api-reference/partition/overview
Credentials
Set these per environment. See Connect an integration.| Variable | Required | Description |
|---|---|---|
UNSTRUCTURED_API_KEY | Yes | Unstructured API key, sent as the unstructured-api-key request header Docs. |
Setup
- Create an Unstructured account: Sign up at https://platform.unstructured.io - new accounts include a free trial of the serverless API, enough for testing without billing.
- Get an API key: In the Unstructured UI, open the API Keys section, create a key, and copy it.
- Store the key: Add UNSTRUCTURED_API_KEY=… to your .env file. Requests authenticate with the unstructured-api-key header (no Bearer prefix).
- Verify access: Run the Partition Document tool with a small text or PDF file and strategy auto. A 401 means the key is wrong; a 422 usually means the files field is missing or unreadable.
- The Partition endpoint processes one local file per request and does not fetch remote URLs - download the file first and pass its content
- Your account may be issued a dedicated API URL; the default https://api.unstructuredapp.io/general/v0/general works for standard serverless accounts
- hi_res and vlm strategies are slower and cost more per page than fast/auto but handle complex layouts and tables much better
- Use chunking_strategy by_title with max_characters tuned to your embedding model for RAG-ready chunks
Tools
| Tool | Access | Description |
|---|---|---|
| Partition Document | Read | Parse one local document into structured JSON elements (titles, narrative text, tables, lists) with optional chunking for RAG. The file content is uploaded as the multipart/form-data ‘files’ field together with the other fields; remote URLs are not accepted - fetch the file first and pass its content |
Example prompts
- Partition the document I provide with Unstructured using by_title chunking and summarize the resulting elements.
- Partition my document with the hi_res strategy and extract the tables it contains.