An agent can use custom components as tools.
+This endpoint builds and executes a flow, returning a job ID that can be used to stream execution events.
Get Vertex builds
diff --git a/api-files.html b/api-files.html
index 0014e18689..0ebdde02e0 100644
--- a/api-files.html
+++ b/api-files.html
@@ -23,7 +23,7 @@
-
+
@@ -66,9 +66,12 @@ To send image files to your flows through the API, use Files/V1 endpoints
Use the /files endpoints to move files between your local machine and Langflow.
-Upload a file to the v1/files/upload/<YOUR-FLOW-ID> endpoint of your flow.
+
Upload a file to the v1/files/upload/$FLOW_ID endpoint:
Replace FILE_NAME with the uploaded file name.
-_10 "$LANGFLOW_URL/api/v1/files/upload/$FLOW_ID" \
_10 -H "accept: application/json" \
_10 -H "Content-Type: multipart/form-data" \
_10 -H "x-api-key: $LANGFLOW_API_KEY" \
_10 -F "file=@FILE_NAME.txt"
_10 "flowId": "92f9a4c5-cfc8-4656-ae63-1f0881163c28",
_10 "file_path": "92f9a4c5-cfc8-4656-ae63-1f0881163c28/2024-12-30_15-19-43_your_file.txt"
+_10 "$LANGFLOW_URL/api/v1/files/upload/$FLOW_ID" \
_10 -H "accept: application/json" \
_10 -H "Content-Type: multipart/form-data" \
_10 -H "x-api-key: $LANGFLOW_API_KEY" \
_10 -F "file=@FILE_NAME.txt"
+Replace FILE_NAME.txt with the name and extension of the file you want to upload.
+Not all file types are supported.
+Result _10 "flowId": "92f9a4c5-cfc8-4656-ae63-1f0881163c28",
_10 "file_path": "92f9a4c5-cfc8-4656-ae63-1f0881163c28/2024-12-30_15-19-43_your_file.txt"
Send image files to Langflow to use them in flows.
The default file limit is 100 MB.
@@ -92,13 +95,16 @@ Setting tweaks with Input Schema also automatically populates t
List all files associated with a specific flow.
-_10 "$LANGFLOW_URL/api/v1/files/list/$FLOW_ID" \
_10 -H "accept: application/json" \
_10 -H "x-api-key: $LANGFLOW_API_KEY"
_10 "files": ["2024-12-30_15-19-43_your_file.txt"]
+_10 "$LANGFLOW_URL/api/v1/files/list/$FLOW_ID" \
_10 -H "accept: application/json" \
_10 -H "x-api-key: $LANGFLOW_API_KEY"
+Result _10 "files": ["2024-12-30_15-19-43_your_file.txt"]
Download a specific file from a flow.
-_10 "$LANGFLOW_URL/api/v1/files/download/$FLOW_ID/2024-12-30_15-19-43_your_file.txt" \
_10 -H "accept: application/json" \
_10 -H "x-api-key: $LANGFLOW_API_KEY" \
_10 --output downloaded_file.txt
_10 File contents downloaded to downloaded_file.txt
+_10 "$LANGFLOW_URL/api/v1/files/download/$FLOW_ID/2024-12-30_15-19-43_your_file.txt" \
_10 -H "accept: application/json" \
_10 -H "x-api-key: $LANGFLOW_API_KEY" \
_10 --output downloaded_file.txt
+Result _10 File contents downloaded to downloaded_file.txt
Delete a specific file from a flow.
-_10 "$LANGFLOW_URL/api/v1/files/delete/$FLOW_ID/2024-12-30_15-19-43_your_file.txt" \
_10 -H "accept: application/json" \
_10 -H "x-api-key: $LANGFLOW_API_KEY"
_10 "message": "File 2024-12-30_15-19-43_your_file.txt deleted successfully"
+_10 "$LANGFLOW_URL/api/v1/files/delete/$FLOW_ID/2024-12-30_15-19-43_your_file.txt" \
_10 -H "accept: application/json" \
_10 -H "x-api-key: $LANGFLOW_API_KEY"
+Result _10 "message": "File 2024-12-30_15-19-43_your_file.txt deleted successfully"
Use the /files endpoints to move files between your local machine and Langflow.
The /v2/files endpoints can be authenticated by an API key or JWT.
@@ -106,15 +112,20 @@ To create a Langflow API key and export it as an environment variable, see Upload file (v2)
Upload a file to your user account. The file can be used across multiple flows.
The file is uploaded in the format USER_ID/FILE_ID.FILE_EXTENSION, such as 07e5b864-e367-4f52-b647-a48035ae7e5e/d44dc2e1-9ae9-4cf6-9114-8d34a6126c94.pdf.
-To retrieve your current user_id, call the /whoami endpoint.
+
+
+To retrieve your current user_id, call the /whoami endpoint:
_10 "$LANGFLOW_URL/api/v1/users/whoami" \
_10 -H "accept: application/json" \
_10 -H "x-api-key: $LANGFLOW_API_KEY"
-Result:
-_10 {"id":"07e5b864-e367-4f52-b647-a48035ae7e5e","username":"langflow","profile_image":null,"store_api_key":null,"is_active":true,"is_superuser":true,"create_at":"2025-05-08T17:59:07.855965","updated_at":"2025-05-28T19:00:42.556460","last_login_at":"2025-05-28T19:00:42.554338","optins":{"github_starred":false,"dialog_dismissed":true,"discord_clicked":false,"mcp_dialog_dismissed":true}}
+Result _10 {"id":"07e5b864-e367-4f52-b647-a48035ae7e5e","username":"langflow","profile_image":null,"store_api_key":null,"is_active":true,"is_superuser":true,"create_at":"2025-05-08T17:59:07.855965","updated_at":"2025-05-28T19:00:42.556460","last_login_at":"2025-05-28T19:00:42.554338","optins":{"github_starred":false,"dialog_dismissed":true,"discord_clicked":false,"mcp_dialog_dismissed":true}}
+
+
In the POST request to v2/files, replace @FILE_NAME.EXTENSION with the uploaded file name and its extension.
You must include the ampersand (@) in the request to instruct curl to upload the contents of the file, not the string FILE_NAME.EXTENSION.
_10 "$LANGFLOW_URL/api/v2/files" \
_10 -H "accept: application/json" \
_10 -H "Content-Type: multipart/form-data" \
_10 -H "x-api-key: $LANGFLOW_API_KEY" \
_10 -F "file=@FILE_NAME.EXTENSION"
The file is uploaded in the format USER_ID/FILE_ID.FILE_EXTENSION, and the API returns metadata about the uploaded file:
_10 "id":"d44dc2e1-9ae9-4cf6-9114-8d34a6126c94",
_10 "name":"engine_manual",
_10 "path":"07e5b864-e367-4f52-b647-a48035ae7e5e/d44dc2e1-9ae9-4cf6-9114-8d34a6126c94.pdf",
+
+
The /v2/files endpoint does not support sending image files to flows.
To send image files to your flows through the API, follow the procedure in Upload image files (v1) .
@@ -123,38 +134,46 @@ Your flow must contain a File component to r
The default file limit is 100 MB. To configure this value, change the LANGFLOW_MAX_FILE_SIZE_UPLOAD environment variable.
For more information, see Supported environment variables .
-To send a file to your flow with the API, POST the file to the /api/v2/files endpoint.
-Replace FILE_NAME with the uploaded file name.
-This is the same step described in Upload file (v2) , but since you need the filename to upload to your flow, it is included here.
-
+
+To send a file to your flow with the API, POST the file to the /api/v2/files endpoint.
+Replace FILE_NAME.EXTENSION with the name and extension of the file you want to upload.
+This is the same step described in Upload file (v2) , but since you need the filename to upload to your flow, it is included here.
_10 "$LANGFLOW_URL/api/v2/files" \
_10 -H "accept: application/json" \
_10 -H "Content-Type: multipart/form-data" \
_10 -H "x-api-key: $LANGFLOW_API_KEY" \
_10 -F "file=@FILE_NAME.EXTENSION"
The file is uploaded in the format USER_ID/FILE_ID.FILE_EXTENSION, and the API returns metadata about the uploaded file:
_10 "id":"d44dc2e1-9ae9-4cf6-9114-8d34a6126c94",
_10 "name":"engine_manual",
_10 "path":"07e5b864-e367-4f52-b647-a48035ae7e5e/d44dc2e1-9ae9-4cf6-9114-8d34a6126c94.pdf",
-
-To use this file in your flow, add a File component to load a file into the flow.
-To load the file into your flow, send it to the File component.
-To retrieve the File component's full name with the UUID attached, call the Read flow endpoint, and then include your File component and the file path as a tweak with the /v1/run POST request.
-In this example, the file uploaded to /v2/files is included with the /v1/run POST request.
-
+
+
+To use this file in your flow, add a File component to load a file into the flow.
+
+
+To load the file into your flow, send it to the File component.
+To retrieve the File component's full name with the UUID attached, call the Read flow endpoint, and then include your File component and the file path as a tweak with the /v1/run POST request.
+In this example, the file uploaded to /v2/files is included with the /v1/run POST request.
_16 --url "$LANGFLOW_URL/api/v1/run/$FLOW_ID" \
_16 --header "Content-Type: application/json" \
_16 --header "x-api-key: $LANGFLOW_API_KEY" \
_16 "input_value": "what do you see?",
_16 "output_type": "chat",
_16 "input_type": "text",
_16 "07e5b864-e367-4f52-b647-a48035ae7e5e/3a290013-fe1e-4d3d-a454-cacae81288f3.pdf"
-Result:
-_10 "text":"This document provides important safety information and instructions for selecting, installing, and operating Briggs & Stratton engines. It includes warnings and guidelines to prevent injury, fire, or damage, such as choosing the correct engine model, proper installation procedures, safe fuel handling, and correct engine operation. The document emphasizes following all safety precautions and using authorized parts to ensure safe and effective engine use."
+Result _10 "text":"This document provides important safety information and instructions for selecting, installing, and operating Briggs & Stratton engines. It includes warnings and guidelines to prevent injury, fire, or damage, such as choosing the correct engine model, proper installation procedures, safe fuel handling, and correct engine operation. The document emphasizes following all safety precautions and using authorized parts to ensure safe and effective engine use."
+
+
List all files associated with your user account.
-_10 "$LANGFLOW_URL/api/v2/files" \
_10 -H "accept: application/json" \
_10 -H "x-api-key: $LANGFLOW_API_KEY"
_10 "id": "c7b22c4c-d5e0-4ec9-af97-5d85b7657a34",
_10 "path": "6f17a73e-97d7-4519-a8d9-8e4c0be411bb/c7b22c4c-d5e0-4ec9-af97-5d85b7657a34.txt",
+_10 "$LANGFLOW_URL/api/v2/files" \
_10 -H "accept: application/json" \
_10 -H "x-api-key: $LANGFLOW_API_KEY"
+Result _10 "id": "c7b22c4c-d5e0-4ec9-af97-5d85b7657a34",
_10 "path": "6f17a73e-97d7-4519-a8d9-8e4c0be411bb/c7b22c4c-d5e0-4ec9-af97-5d85b7657a34.txt",
Download a specific file by its ID and file extension.
-You must specify the file type you expect in the --output value.
-_10 "$LANGFLOW_URL/api/v2/files/c7b22c4c-d5e0-4ec9-af97-5d85b7657a34" \
_10 -H "accept: application/json" \
_10 -H "x-api-key: $LANGFLOW_API_KEY" \
_10 --output downloaded_file.txt
_10 File contents downloaded to downloaded_file.txt
+You must specify the file type you expect in the --output value.
+_10 "$LANGFLOW_URL/api/v2/files/c7b22c4c-d5e0-4ec9-af97-5d85b7657a34" \
_10 -H "accept: application/json" \
_10 -H "x-api-key: $LANGFLOW_API_KEY" \
_10 --output downloaded_file.txt
+Result _10 File contents downloaded to downloaded_file.txt
Change a file name.
-_10 "$LANGFLOW_URL/api/v2/files/$FILE_ID?name=new_file_name" \
_10 -H "accept: application/json" \
_10 -H "x-api-key: $LANGFLOW_API_KEY"
_10 "id": "76543e40-f388-4cb3-b0ee-a1e870aca3d3",
_10 "name": "new_file_name",
_10 "path": "6f17a73e-97d7-4519-a8d9-8e4c0be411bb/76543e40-f388-4cb3-b0ee-a1e870aca3d3.png",
+_10 "$LANGFLOW_URL/api/v2/files/$FILE_ID?name=new_file_name" \
_10 -H "accept: application/json" \
_10 -H "x-api-key: $LANGFLOW_API_KEY"
+Result _10 "id": "76543e40-f388-4cb3-b0ee-a1e870aca3d3",
_10 "name": "new_file_name",
_10 "path": "6f17a73e-97d7-4519-a8d9-8e4c0be411bb/76543e40-f388-4cb3-b0ee-a1e870aca3d3.png",
Delete a specific file by its ID.
-_10 "$LANGFLOW_URL/api/v2/files/$FILE_ID" \
_10 -H "accept: application/json" \
_10 -H "x-api-key: $LANGFLOW_API_KEY"
_10 "message": "File deleted successfully"
+_10 "$LANGFLOW_URL/api/v2/files/$FILE_ID" \
_10 -H "accept: application/json" \
_10 -H "x-api-key: $LANGFLOW_API_KEY"
+Result _10 "message": "File deleted successfully"
Delete all files associated with your user account.
-_10 "$LANGFLOW_URL/api/v2/files" \
_10 -H "accept: application/json" \
_10 -H "x-api-key: $LANGFLOW_API_KEY"
_10 "message": "All files deleted successfully"
+_10 "$LANGFLOW_URL/api/v2/files" \
_10 -H "accept: application/json" \
_10 -H "x-api-key: $LANGFLOW_API_KEY"
+Result _10 "message": "All files deleted successfully"
This endpoint is deprecated. Use the /files endpoints instead.