> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cambioml.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Async API Endpoints

> API Reference for the asynchronous functions of the AnyParser API

## Overview

The `AnyParser` API has asynchronous endpoints for its parsing and extraction features. These are asynchronous endpoints that will return a file ID. You can use this file ID to fetch the results of the extraction at a later time. Consider using if you have longer or more complex files. These async endpoints have a timeout of 180 seconds.

There are 2 async endpoints:

| Endpoint                                        | Description                                                           |
| ----------------------------------------------- | --------------------------------------------------------------------- |
| [/async/upload](/api-reference/endpoint/upload) | Upload the file to process and the process type. Returns the file ID. |
| [/async/fetch](/api-reference/endpoint/fetch)   | Poll the results for a file ID.                                       |

Generally, for all async requests, you would upload a file via the `/async/upload` endpoint, get its file\_id, and then poll the `/async/fetch` endpoint to get the result.

## /async/upload

This endpoint is used to upload a file with a specified `process_type` and get a file ID.

You can specify the following for the `process_type`:

| process\_type              | Description                                                                                                                                                                             |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parse`                    | This is the Default. It parses the full content from a file. This has the same functionality as the [full-content-parse.parse](/sdk-reference/parse) in the SDK                         |
| `parse_with_ocr`           | It parses the full content from a file with OCR detection and correction. This has the same functionality as the [full-content-parse.parse\_with\_ocr](/sdk-reference/parse) in the SDK |
| `parse_with_layout`        | It parses the full content from a file with layout structure analysis. This has the same functionality as the [full-content-parse.parse\_with\_layout](/sdk-reference/parse) in the SDK |
| `extract_pii`              | This extracts PII from the document. This has the same functionality as the [Extract PII](/sdk-reference/extract_pii) in the SDK                                                        |
| `extract_tables`           | This extracts tables from the document. This has the same functionality as the [Extract Tables](/sdk-reference/extract_tables) in the SDK                                               |
| `extract_key_value`        | This extracts key-value pairs from the document. This has the same functionality as the [Extract Key-Value](/sdk-reference/extract_key_value) in the SDK                                |
| `extract_resume_key_value` | This extracts the candidate's information from the resume. This has the same functionality as the [Extract Resume Key-Value](/sdk-reference/extract_resume_key_value) in the SDK        |

For more details on how to call this endpoint see the [Async Upload Endpoint Example](/api-reference/endpoint/async-upload).

## /async/fetch

Once you have retrieved the `file_id` from the `/async/upload` endpoint, you then send that `file_id` to the `/async/fetch` endpoint to retrieve the result.

For more details on how to call this endpoint see the [Async Upload Endpoint Example](/api-reference/endpoint/async-fetch).
