Skip to main content

At a glance

Credentials

Set these per environment. See Connect an integration.
VariableRequiredDescription
UNSTRUCTURED_API_KEYYesUnstructured API key, sent as the unstructured-api-key request header Docs.

Setup

  1. 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.
  2. Get an API key: In the Unstructured UI, open the API Keys section, create a key, and copy it.
  3. Store the key: Add UNSTRUCTURED_API_KEY=… to your .env file. Requests authenticate with the unstructured-api-key header (no Bearer prefix).
  4. 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
Provider API reference: https://docs.unstructured.io/api-reference/partition/overview

Tools

ToolAccessDescription
Partition DocumentReadParse 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.