> ## Documentation Index
> Fetch the complete documentation index at: https://unstructured-53-kapa-ai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Using API from partition_via_api()

If you're used to working the [Unstructured Open Source library](https://github.com/Unstructured-IO/unstructured) but
would like to leverage the advanced capabilities of the Unstructured API services, you can do so without leaving the comfort
and familiarity of the open source library.  Whether you're using the free Unstructured API, the SaaS Unstructured API,
Unstructured API on Azure/AWS or your local deployment of Unstructured API, you can access it from the open source library
through `partition_via_api`.

## Installation

Make sure you have the Unstructured Open Source library installed.
Refer to the [Unstructured Open Source library Quickstart guide](/open-source/introduction/quick-start) for instructions.

## Basics

Here's a basic example in which you send an email file to partition via Unstructured API using `partition_via_api` available
in the Unstructured Open Source library:

```python
from unstructured.partition.api import partition_via_api

elements = partition_via_api(
    filename="example-docs/eml/fake-email.eml",
    api_key="YOUR_API_KEY",
    # you may need to specify your unique API URL
    # api_url="YOUR_API_URL",
    content_type="message/rfc822"
    )
```

When sending a request to the free Unstructured API, you only need to provide your individual API key.
When sending requests to the SaaS Unstructured API, you need to supply your unique API URL in addition to your API key.
For Unstructured API on Azure/AWS, use the API URL that you configured through those services.

## Parameters & examples

The API parameters are the same across all methods of accessing the Unstructured API.

* Refer to the [API parameters](/api-reference/api-services/api-parameters) page for the full list of available parameters.
* Refer to the [Examples](/api-reference/api-services/examples) page for some inspiration on using the parameters.

[//]: # "TODO: when we have the concepts page shared across products, link it from here for the users to learn about partition strategies, chunking strategies and other important shared concepts"
