
Deploy Unstructured API | (Just Updated) Document Parsing API for RAG, Key-Locked From Boot
Unstructured API. Key-locked from boot, no fields to fill, public URL
unstructured-api
Just deployed
Deploy and Host Unstructured API on Railway
Unstructured API is a REST service that turns PDFs, Word and PowerPoint files, HTML, emails and images into clean, typed elements (titles, narrative text, tables, list items) with metadata. It is the document-partitioning step in front of RAG, search and LLM pipelines: send a file, get JSON back.
This template runs the official Unstructured API image as one service, pinned by digest, with a public Railway domain and an API key generated for every deploy.
About Hosting Unstructured API
- The API is key-protected from the first request. Upstream only enables authentication when
UNSTRUCTURED_API_KEYis set; without it the endpoint is open to anyone who finds the URL. Here the key is generated for your deploy and the container refuses to start without it. Calls without theunstructured-api-keyheader get 401./healthcheckstays open so Railway can check the service. - Nothing to fill in. There are no required fields on the deploy form and no volume: the API keeps nothing between requests.
- Thread count matches your plan. The start command reads the container's CPU limit and caps the OpenMP, MKL and OpenBLAS thread pools to it, so layout and OCR work does not oversubscribe the shared host.
- Size and memory. The image is large (about 10 GB compressed), so the first deploy spends
several minutes pulling it. The
hi_resstrategy loads layout models and uses much more memory thanfast, so give the service room if you parse scanned or layout-heavy PDFs. - Long requests. Railway's edge closes requests after about five minutes. Keep individual files small enough to finish inside that, or split large PDFs before sending.
Common Use Cases
- Preparing PDFs, slides and Word files for a RAG or vector-search ingestion pipeline
- Extracting text, tables and titles from scanned documents and images with OCR
- Normalising emails, HTML and Markdown into one JSON schema for an LLM agent
- Giving no-code and automation tools (n8n, Flowise, Dify) a document-parsing endpoint
Dependencies for Unstructured API Hosting
- None. A single service, no database and no volume.
Deployment Dependencies
- Unstructured API: https://github.com/Unstructured-IO/unstructured-api
- Documentation: https://docs.unstructured.io/open-source/introduction/overview
Implementation Details
| Variable | Purpose |
|---|---|
UNSTRUCTURED_API_KEY | Key required in the unstructured-api-key header on every call except /healthcheck, generated per deploy. |
curl -X POST https:///general/v0/general \
-H "unstructured-api-key: " \
-F files=@report.pdf \
-F strategy=hi_res
Strategies are auto, fast, hi_res and ocr_only. Interactive API docs are at
/general/docs. Inside the same Railway project use http://unstructured-api.railway.internal:8080
with the same header.
Why Deploy Unstructured API on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Unstructured API on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
unstructured-api
quay.io/unstructured-io/unstructured-api:0.1.11