> For the complete documentation index, see [llms.txt](https://docs.cortexlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cortexlabs.com/0.32/workloads/async-apis.md).

# Async APIs

The AsyncAPI kind is designed for asynchronous workloads, in which the user submits a request to start the processing and retrieves the result later, either by polling or through a webhook.

The design is summarized in the image below.

![](https://user-images.githubusercontent.com/7456627/111491999-9b67f100-873c-11eb-87f0-effcf4aab01b.png)

The Async Gateway is responsible for submitting the workloads to the queue and for the retrieval of the respective workload status and results. Cortex fully manages the Async Gateway and the queue, while the user is in charge of implementing the API predictor. Autoscaling is provided based on the average number of messages in the queue.

## Use-cases

AsyncAPI matches the use-cases of the users that want to submit longer machine learning workloads, such as video, audio or document processing, and do not need the result immediately.

{% hint style="info" %}
AsyncAPI is still in a beta state.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cortexlabs.com/0.32/workloads/async-apis.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
