To start using the Unstructured Partition Endpoint right away, skip ahead to the quickstart now!
Get started
To call the Unstructured Partition Endpoint, you need an Unstructured account and an Unstructured API key:-
If you do not already have an Unstructured account, sign up for free.
After you sign up, you are automatically signed in to your new Unstructured Starter account, at https://platform.unstructured.io.
To sign up for a Team or Enterprise account instead, contact Unstructured Sales, or learn more.
-
If you have an Unstructured Starter or Team account and are not already signed in, sign in to your account at https://platform.unstructured.io.
For an Enterprise account, see your Unstructured account administrator for instructions, or email Unstructured Support at support@unstructured.io.
-
Get your Unstructured API key:
a. After you sign in to your Unstructured Starter account, click API Keys on the sidebar.
b. Click Generate API Key.For a Team or Enterprise account, before you click API Keys, make sure you have selected the organizational workspace you want to create an API key for. Each API key works with one and only one organizational workspace. Learn more.
c. Follow the on-screen instructions to finish generating the key.
d. Click the Copy icon next to your new key to add the key to your system’s clipboard. If you lose this key, simply return and click the Copy icon again.
Pricing
Unstructured offers several account types with different pricing plans:- Starter - A single user, with a single workspace, hosted alongside other accounts on Unstructured’s cloud infrastructure.
- Team - Multiple users and workspaces, hosted alongside other accounts on Unstructured’s cloud instrastructure.
-
Enterprise - Multiple users and workspaces, isolated from all other accounts, with two hosting options for additional security and control:
- Dedicated instance - Hosted within a virtual private cloud (VPC) running inside Unstructured’s cloud infrastructure.
- In-VPC - Hosted within your own VPC on your own cloud infrastructure.
- For these file types, a page is a page, slide, or image:
.pdf
,.pptx
, and.tiff
. - For
.docx
files that have page metadata, Unstructured calculates the number of pages based on that metadata. - For all other file types, Unstructured calculates the number of pages as the file’s size divided by 100 KB.
- For non-file data, Unstructured calculates a page as 100 KB of incoming data to be processed.
Quickstart
To use the Unstructured Python SDK instead of
curl
for the following quickstart,
skip ahead to the SDK version instead.1
Set environment variables
From your terminal or Command Prompt, set the following two environment variables.
-
Replace
<your-unstructured-api-url>
with the Unstructured Partition Endpoint URL. This URL was provided to you when your Unstructured account was created. If you do not have this URL, email Unstructured Support at support@unstructured.io.The default URL for the Unstructured Partition Endpoint ishttps://api.unstructuredapp.io/general/v0/general
. However, you should always use the URL that was provided to you when your Unstructured account was created. -
Replace
<your-unstructured-api-key>
with your Unstructured API key, which you generated earlier on this page.
2
Run the curl command
Run the following
curl
command, replacing <path/to/file>
with the path to the source file on your local machine.If the source file is not a PDF file, then remove ;type=application/pdf
from the final --form
option in this command.3
Examine the results
After you run the
curl
command, the results are printed to your terminal or Command Prompt. The command might take several
minutes to complete.By default, the JSON is printed without indenting or other whitespace. You can pretty-print the JSON output by using utilities such as jq in future command runs.You can also pipe the JSON output to a local file by using the curl
option -o, —output <file> in future command runs.