Assynchronous Processing

Asynchronous Processing


Starting from version 0.5, Langflow introduces a new feature to its API: the sync flag. This flag allows users to opt for asynchronous processing of their flows, freeing up resources and enabling better control over long-running tasks. This feature supports running tasks in a Celery worker queue and AnyIO task groups for now.


This is an experimental feature. The default behavior of the API is still synchronous processing. The API may change in the future.

The sync Flag

The sync flag can be included in the payload of your POST request to the /api/v1/process/<your_flow_id> endpoint. When set to false, the API will initiate an asynchronous task instead of processing the flow synchronously.

API Request with sync flag

curl -X POST \
  http://localhost:3000/api/v1/process/<your_flow_id> \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: <your_api_key>' \
  -d '{"inputs": {"text": ""}, "tweaks": {}, "sync": false}'


  "result": {
    "output": "..."
  "task": {
    "id": "...",
    "href": "api/v1/task/<task_id>"
  "session_id": "...",
  "backend": "..."

Checking Task Status

You can check the status of an asynchronous task by making a GET request to the /task/{task_id} endpoint.

curl -X GET \
  http://localhost:3000/api/v1/task/<task_id> \
  -H 'x-api-key: <your_api_key>'


The endpoint will return the current status of the task and, if completed, the result of the task. Possible statuses include:

  • PENDING: The task is waiting for execution.

  • SUCCESS: The task has completed successfully.

  • FAILURE: The task has failed.

Example response for a completed task:

  "status": "SUCCESS",
  "result": {
    "output": "..."

Getting Started

👋 Welcome to Langflow
📦 How to install?
🤗 HuggingFace Spaces
🎨 Creating Flows


Sign up and Sign in
API Keys
Assynchronous Processing
Prompt Customization
Chat Interface
Chat Widget
Custom Components

Step-by-Step Guides

Async API
Integrating documents with prompt variables
Building chatbots with System Message
Integrating Langfuse with Langflow


FlowRunner Component
Conversation Chain
Buffer Memory
MidJourney Prompt Chain
CSV Loader
Serp API Tool
Multiple Vector Stores
Python Function
📚 How to Upload Examples?


Deploy on Google Cloud Platform


How to contribute?
GitHub Issues

Search Docs…

Search Docs…