Build endpoints
The /build endpoints are used by Langflow's frontend Workspace and Playground code.
+
The /build endpoints are used by Langflow's frontend Workspace and Playground code.
These endpoints are part of the internal Langflow codebase.
Don't use these endpoints to run flows in applications that use your Langflow flows. To run flows in your apps, see Flow trigger endpoints.
The /build endpoints support Langflow's frontend code for building flows in the Langflow Workspace.
diff --git a/api-files.html b/api-files.html
index 30c326d0d8..adccdd3879 100644
--- a/api-files.html
+++ b/api-files.html
@@ -23,7 +23,7 @@
-
+
@) in the request to instruct curl
Send files to your flows (v2)
-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).
The /v2/files endpoint can't send image files to flows.
+To send image files to your flows through the API, see Upload image files (v1).
Send a file to your flow for analysis using the File component and the API. Your flow must contain a File component to receive the file.
The default file limit is 100 MB. To configure this value, change the LANGFLOW_MAX_FILE_SIZE_UPLOAD environment variable.
diff --git a/api-flows-run.html b/api-flows-run.html
index dec861892c..bff3b1648b 100644
--- a/api-flows-run.html
+++ b/api-flows-run.html
@@ -23,7 +23,7 @@
-
+
_17curl -X POST \_17 "$LANGFLOW_SERVER_URL/api/v1/run/$FLOW_ID?stream=true" \_17 -H "Content-Type: application/json" \_17 -H "accept: application/json" \_17 -H "x-api-key: $LANGFLOW_API_KEY" \_17 -d '{_17 "input_value": "Tell me a story",_17 "input_type": "chat",_17 "output_type": "chat",_17 "output_component": "chat_output",_17 "session_id": "chat-123",_17 "tweaks": {_17 "component_id": {_17 "parameter_name": "value"_17 }_17 }_17 }'
Webhook run flow
Use the /webhook endpoint to start a flow by sending an HTTP POST request.
After you add a Webhook component to a flow, open the API access pane, and then click the Webhook cURL tab to get an automatically generated POST /webhook request for your flow.
After you add a Webhook component to a flow, open the API access pane, and then click the Webhook cURL tab to get an automatically generated POST /webhook request for your flow.
+For more information, see Trigger flows with webhooks.
_10curl -X POST \_10 "$LANGFLOW_SERVER_URL/api/v1/webhook/$FLOW_ID" \_10 -H "Content-Type: application/json" \_10 -H "x-api-key: $LANGFLOW_API_KEY" \_10 -d '{"data": "example-data"}'
Result
_10{_10 "message": "Task started in the background",_10 "status": "in progress"_10}
For more information, see Webhook component and Trigger flows with webhooks.
Deprecated flow trigger endpoints
The following endpoints are deprecated and replaced by the /run endpoint:
-
diff --git a/api-flows.html b/api-flows.html
index af87c4fd16..24f8dee6b8 100644
--- a/api-flows.html
+++ b/api-flows.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api-logs.html b/api-logs.html
index 69f29b665b..c6859bb0dd 100644
--- a/api-logs.html
+++ b/api-logs.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api-monitor.html b/api-monitor.html
index 803945a97e..ff4b4ea169 100644
--- a/api-monitor.html
+++ b/api-monitor.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api-projects.html b/api-projects.html
index 6fa37f68b8..d90f55a782 100644
--- a/api-projects.html
+++ b/api-projects.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api-reference-api-examples.html b/api-reference-api-examples.html
index acdfad1d3b..38b4d9767f 100644
--- a/api-reference-api-examples.html
+++ b/api-reference-api-examples.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api-users.html b/api-users.html
index fc60756481..8224a7d8dc 100644
--- a/api-users.html
+++ b/api-users.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api.html b/api.html
index ce222cde31..1c5eead449 100644
--- a/api.html
+++ b/api.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/add-server.html b/api/add-server.html
index df12183dad..eb9dddfa89 100644
--- a/api/add-server.html
+++ b/api/add-server.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/add-user.html b/api/add-user.html
index 560893458f..01876aa669 100644
--- a/api/add-user.html
+++ b/api/add-user.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/auto-login.html b/api/auto-login.html
index 16de775d49..c64375b8fe 100644
--- a/api/auto-login.html
+++ b/api/auto-login.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/build-flow.html b/api/build-flow.html
index f2cfe302e1..32e55d31d6 100644
--- a/api/build-flow.html
+++ b/api/build-flow.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/build-public-tmp.html b/api/build-public-tmp.html
index 8b5040fd5d..6c32e6d9ab 100644
--- a/api/build-public-tmp.html
+++ b/api/build-public-tmp.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/build-vertex-stream.html b/api/build-vertex-stream.html
index 5b2e5d54c3..b87b46ee21 100644
--- a/api/build-vertex-stream.html
+++ b/api/build-vertex-stream.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/build-vertex.html b/api/build-vertex.html
index 398701d483..3d6b9b8f4b 100644
--- a/api/build-vertex.html
+++ b/api/build-vertex.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/cancel-build.html b/api/cancel-build.html
index 4a8b50bb11..e0fc819ff8 100644
--- a/api/cancel-build.html
+++ b/api/cancel-build.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/check-if-store-has-api-key.html b/api/check-if-store-has-api-key.html
index 5fbb06f7ca..baa24ba788 100644
--- a/api/check-if-store-has-api-key.html
+++ b/api/check-if-store-has-api-key.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/check-if-store-is-enabled.html b/api/check-if-store-is-enabled.html
index 74b2798cfb..ba00ddce42 100644
--- a/api/check-if-store-is-enabled.html
+++ b/api/check-if-store-is-enabled.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/check-installed-mcp-servers.html b/api/check-installed-mcp-servers.html
index 649c957407..8235a18f85 100644
--- a/api/check-installed-mcp-servers.html
+++ b/api/check-installed-mcp-servers.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/create-api-key-route.html b/api/create-api-key-route.html
index 4b41e55755..fd838448af 100644
--- a/api/create-api-key-route.html
+++ b/api/create-api-key-route.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/create-flow.html b/api/create-flow.html
index 6bc70c0b1f..d349d02a7b 100644
--- a/api/create-flow.html
+++ b/api/create-flow.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/create-flows.html b/api/create-flows.html
index 892c34cb6e..2f2ecad5d6 100644
--- a/api/create-flows.html
+++ b/api/create-flows.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/create-folder-redirect.html b/api/create-folder-redirect.html
index ae607c66d4..d6f44a2681 100644
--- a/api/create-folder-redirect.html
+++ b/api/create-folder-redirect.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/create-project.html b/api/create-project.html
index dc1c3b3d73..c27d63e1db 100644
--- a/api/create-project.html
+++ b/api/create-project.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/create-upload-file.html b/api/create-upload-file.html
index 9c6f2d9098..03abf7ff8d 100644
--- a/api/create-upload-file.html
+++ b/api/create-upload-file.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/create-variable.html b/api/create-variable.html
index 8deb3d488e..e6d647f66d 100644
--- a/api/create-variable.html
+++ b/api/create-variable.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/custom-component-update.html b/api/custom-component-update.html
index f3ab51801a..38d74a51b6 100644
--- a/api/custom-component-update.html
+++ b/api/custom-component-update.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/custom-component.html b/api/custom-component.html
index 07871e2d3e..34ebf6126d 100644
--- a/api/custom-component.html
+++ b/api/custom-component.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/delete-all-files-1.html b/api/delete-all-files-1.html
index 5eb3f619bd..942a255e3f 100644
--- a/api/delete-all-files-1.html
+++ b/api/delete-all-files-1.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/delete-all-files.html b/api/delete-all-files.html
index 8b759f1014..dd8e41831a 100644
--- a/api/delete-all-files.html
+++ b/api/delete-all-files.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/delete-api-key-route.html b/api/delete-api-key-route.html
index 7f6dc33f1b..d461e7131d 100644
--- a/api/delete-api-key-route.html
+++ b/api/delete-api-key-route.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/delete-file-1.html b/api/delete-file-1.html
index a4e752c480..9d4f75ea43 100644
--- a/api/delete-file-1.html
+++ b/api/delete-file-1.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/delete-file.html b/api/delete-file.html
index 32a8eadaac..abea810813 100644
--- a/api/delete-file.html
+++ b/api/delete-file.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/delete-files-batch.html b/api/delete-files-batch.html
index 36591d996e..54d0e5f313 100644
--- a/api/delete-files-batch.html
+++ b/api/delete-files-batch.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/delete-flow.html b/api/delete-flow.html
index 7089b58a5e..4cf0f7f370 100644
--- a/api/delete-flow.html
+++ b/api/delete-flow.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/delete-folder-redirect.html b/api/delete-folder-redirect.html
index e44e007c0d..926ea0501c 100644
--- a/api/delete-folder-redirect.html
+++ b/api/delete-folder-redirect.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/delete-messages-session.html b/api/delete-messages-session.html
index ffa443d169..29fc21b098 100644
--- a/api/delete-messages-session.html
+++ b/api/delete-messages-session.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/delete-messages.html b/api/delete-messages.html
index 4a3509296e..d1b9921b6e 100644
--- a/api/delete-messages.html
+++ b/api/delete-messages.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/delete-multiple-flows.html b/api/delete-multiple-flows.html
index 204ab74fd5..a9b65746d8 100644
--- a/api/delete-multiple-flows.html
+++ b/api/delete-multiple-flows.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/delete-project.html b/api/delete-project.html
index cd67c5ac2d..fec7050fa6 100644
--- a/api/delete-project.html
+++ b/api/delete-project.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/delete-server.html b/api/delete-server.html
index 0cc01ea3df..1d716744c3 100644
--- a/api/delete-server.html
+++ b/api/delete-server.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/delete-user.html b/api/delete-user.html
index e0a6d97982..f367590396 100644
--- a/api/delete-user.html
+++ b/api/delete-user.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/delete-variable.html b/api/delete-variable.html
index 5febe99582..77d5086df7 100644
--- a/api/delete-variable.html
+++ b/api/delete-variable.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/delete-vertex-builds.html b/api/delete-vertex-builds.html
index 07668f0ddf..73013f29da 100644
--- a/api/delete-vertex-builds.html
+++ b/api/delete-vertex-builds.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/download-component.html b/api/download-component.html
index dacc061388..5e01e546c1 100644
--- a/api/download-component.html
+++ b/api/download-component.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/download-file-1.html b/api/download-file-1.html
index 7b822ab771..e0d04b089b 100644
--- a/api/download-file-1.html
+++ b/api/download-file-1.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/download-file-2.html b/api/download-file-2.html
index 98d5fe1cc1..a3809f2e83 100644
--- a/api/download-file-2.html
+++ b/api/download-file-2.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/download-file-redirect.html b/api/download-file-redirect.html
index 2a0ce1800e..92312c04b1 100644
--- a/api/download-file-redirect.html
+++ b/api/download-file-redirect.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/download-file.html b/api/download-file.html
index e8a4189148..b2a7db8a1f 100644
--- a/api/download-file.html
+++ b/api/download-file.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/download-files-batch.html b/api/download-files-batch.html
index f1132e48a3..9d2624db53 100644
--- a/api/download-files-batch.html
+++ b/api/download-files-batch.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/download-image.html b/api/download-image.html
index 451a708222..6b1ee6fb41 100644
--- a/api/download-image.html
+++ b/api/download-image.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/download-multiple-file.html b/api/download-multiple-file.html
index f0247e5e90..158511b2d0 100644
--- a/api/download-multiple-file.html
+++ b/api/download-multiple-file.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/download-profile-picture.html b/api/download-profile-picture.html
index 136ec80f5b..d66bd6d919 100644
--- a/api/download-profile-picture.html
+++ b/api/download-profile-picture.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/edit-file-name.html b/api/edit-file-name.html
index e64cca737d..123a37ed5c 100644
--- a/api/edit-file-name.html
+++ b/api/edit-file-name.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/experimental-run-flow.html b/api/experimental-run-flow.html
index d8d945a6ac..a1413a898b 100644
--- a/api/experimental-run-flow.html
+++ b/api/experimental-run-flow.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/get-all.html b/api/get-all.html
index 4395f6d605..e1c3d54630 100644
--- a/api/get-all.html
+++ b/api/get-all.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/get-api-keys-route.html b/api/get-api-keys-route.html
index 772481de02..a23811f55b 100644
--- a/api/get-api-keys-route.html
+++ b/api/get-api-keys-route.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/get-build-events.html b/api/get-build-events.html
index 6de62e82a1..3e88c1ec70 100644
--- a/api/get-build-events.html
+++ b/api/get-build-events.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/get-components.html b/api/get-components.html
index eb728e8d36..e1b9d403cc 100644
--- a/api/get-components.html
+++ b/api/get-components.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/get-config.html b/api/get-config.html
index 1f5e5eb837..f1d23490cf 100644
--- a/api/get-config.html
+++ b/api/get-config.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/get-elevenlabs-voice-ids.html b/api/get-elevenlabs-voice-ids.html
index 9f9d588991..754f46efc8 100644
--- a/api/get-elevenlabs-voice-ids.html
+++ b/api/get-elevenlabs-voice-ids.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/get-list-of-components-liked-by-user.html b/api/get-list-of-components-liked-by-user.html
index e65bb3ff15..74e2f7682c 100644
--- a/api/get-list-of-components-liked-by-user.html
+++ b/api/get-list-of-components-liked-by-user.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/get-message-sessions.html b/api/get-message-sessions.html
index cbb654c20b..4aa9c4da2b 100644
--- a/api/get-message-sessions.html
+++ b/api/get-message-sessions.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/get-messages.html b/api/get-messages.html
index b600b6917a..0965a9e727 100644
--- a/api/get-messages.html
+++ b/api/get-messages.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/get-server-endpoint.html b/api/get-server-endpoint.html
index 4596cf7af1..49542f742e 100644
--- a/api/get-server-endpoint.html
+++ b/api/get-server-endpoint.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/get-servers.html b/api/get-servers.html
index 328fadf1d9..fa08d620c3 100644
--- a/api/get-servers.html
+++ b/api/get-servers.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/get-starter-projects.html b/api/get-starter-projects.html
index fbd70533ff..7b52d0c4f3 100644
--- a/api/get-starter-projects.html
+++ b/api/get-starter-projects.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/get-tags.html b/api/get-tags.html
index 1024e2b2fb..3a4c6cd47f 100644
--- a/api/get-tags.html
+++ b/api/get-tags.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/get-task-status.html b/api/get-task-status.html
index e7b0d3be75..e8800c429f 100644
--- a/api/get-task-status.html
+++ b/api/get-task-status.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/get-transactions.html b/api/get-transactions.html
index 1e89dfc862..13d0fbb4b9 100644
--- a/api/get-transactions.html
+++ b/api/get-transactions.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/get-version.html b/api/get-version.html
index ef8153c295..b783a5b531 100644
--- a/api/get-version.html
+++ b/api/get-version.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/get-vertex-builds.html b/api/get-vertex-builds.html
index 5dfbed1526..82dcfb4f3e 100644
--- a/api/get-vertex-builds.html
+++ b/api/get-vertex-builds.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/handle-messages-1.html b/api/handle-messages-1.html
index d8b1b046e1..67a3ad5775 100644
--- a/api/handle-messages-1.html
+++ b/api/handle-messages-1.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/handle-messages.html b/api/handle-messages.html
index 72550292b8..3f66126a91 100644
--- a/api/handle-messages.html
+++ b/api/handle-messages.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/handle-project-messages-with-slash.html b/api/handle-project-messages-with-slash.html
index 3e144ce041..6d6855df32 100644
--- a/api/handle-project-messages-with-slash.html
+++ b/api/handle-project-messages-with-slash.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/handle-project-messages.html b/api/handle-project-messages.html
index 2625d434d9..1fe72da7a6 100644
--- a/api/handle-project-messages.html
+++ b/api/handle-project-messages.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/handle-project-sse.html b/api/handle-project-sse.html
index 855c271b36..061d8f348c 100644
--- a/api/handle-project-sse.html
+++ b/api/handle-project-sse.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/handle-sse-1.html b/api/handle-sse-1.html
index fac8507bee..9183df93fb 100644
--- a/api/handle-sse-1.html
+++ b/api/handle-sse-1.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/handle-sse.html b/api/handle-sse.html
index a7db6e8fac..92b30031cb 100644
--- a/api/handle-sse.html
+++ b/api/handle-sse.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/health-check.html b/api/health-check.html
index 7abebcfd3c..fc8a427d47 100644
--- a/api/health-check.html
+++ b/api/health-check.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/health.html b/api/health.html
index 7963efe7ea..d3e9881b41 100644
--- a/api/health.html
+++ b/api/health.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/install-mcp-config.html b/api/install-mcp-config.html
index 15dd95618e..368451bd61 100644
--- a/api/install-mcp-config.html
+++ b/api/install-mcp-config.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/like-component.html b/api/like-component.html
index 797d6155a8..384ae01b98 100644
--- a/api/like-component.html
+++ b/api/like-component.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/list-files-1.html b/api/list-files-1.html
index 67c57ab5f2..c4597b42b0 100644
--- a/api/list-files-1.html
+++ b/api/list-files-1.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/list-files-2.html b/api/list-files-2.html
index 88fa84ee05..f87d147dee 100644
--- a/api/list-files-2.html
+++ b/api/list-files-2.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/list-files.html b/api/list-files.html
index e531f2426c..349e2f16e5 100644
--- a/api/list-files.html
+++ b/api/list-files.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/list-profile-pictures.html b/api/list-profile-pictures.html
index 746f2b7d16..391814fae5 100644
--- a/api/list-profile-pictures.html
+++ b/api/list-profile-pictures.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/list-project-tools.html b/api/list-project-tools.html
index c48bcaa353..097b13675b 100644
--- a/api/list-project-tools.html
+++ b/api/list-project-tools.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/login-to-get-access-token.html b/api/login-to-get-access-token.html
index 9641241d87..eb99c6216b 100644
--- a/api/login-to-get-access-token.html
+++ b/api/login-to-get-access-token.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/logout.html b/api/logout.html
index 284c0439fd..2b1d5519a8 100644
--- a/api/logout.html
+++ b/api/logout.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/logs.html b/api/logs.html
index c3ab5aa54d..386935e25a 100644
--- a/api/logs.html
+++ b/api/logs.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/patch-user.html b/api/patch-user.html
index 8a67de2bbf..074edca11a 100644
--- a/api/patch-user.html
+++ b/api/patch-user.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/post-validate-code.html b/api/post-validate-code.html
index af44c52888..24144eeca5 100644
--- a/api/post-validate-code.html
+++ b/api/post-validate-code.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/post-validate-prompt.html b/api/post-validate-prompt.html
index 696ade325a..ab9a212cfc 100644
--- a/api/post-validate-prompt.html
+++ b/api/post-validate-prompt.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/process-1.html b/api/process-1.html
index 6f557c4ac1..7846e9a0ee 100644
--- a/api/process-1.html
+++ b/api/process-1.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/process.html b/api/process.html
index ec422cd275..2013d589d3 100644
--- a/api/process.html
+++ b/api/process.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/read-all-users.html b/api/read-all-users.html
index 0e953810f2..6d478ee3bb 100644
--- a/api/read-all-users.html
+++ b/api/read-all-users.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/read-basic-examples.html b/api/read-basic-examples.html
index 87a19ae9bb..c6b345d421 100644
--- a/api/read-basic-examples.html
+++ b/api/read-basic-examples.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/read-current-user.html b/api/read-current-user.html
index 708d63c68a..3c4002c184 100644
--- a/api/read-current-user.html
+++ b/api/read-current-user.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/read-flow.html b/api/read-flow.html
index d47a6838f7..808b42fe1f 100644
--- a/api/read-flow.html
+++ b/api/read-flow.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/read-flows.html b/api/read-flows.html
index 16df440bcf..42d0364652 100644
--- a/api/read-flows.html
+++ b/api/read-flows.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/read-folder-redirect.html b/api/read-folder-redirect.html
index c43801981f..5c56d1e19a 100644
--- a/api/read-folder-redirect.html
+++ b/api/read-folder-redirect.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/read-folders-redirect.html b/api/read-folders-redirect.html
index 3462f36fd8..1b0b375b8e 100644
--- a/api/read-folders-redirect.html
+++ b/api/read-folders-redirect.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/read-project.html b/api/read-project.html
index afb7557fea..191a6cd4c5 100644
--- a/api/read-project.html
+++ b/api/read-project.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/read-projects.html b/api/read-projects.html
index b3cfdee802..b5f3476076 100644
--- a/api/read-projects.html
+++ b/api/read-projects.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/read-public-flow.html b/api/read-public-flow.html
index c801f0e5d6..5b30b0cbc6 100644
--- a/api/read-public-flow.html
+++ b/api/read-public-flow.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/read-variables.html b/api/read-variables.html
index b05957cc8c..10f2bd27ef 100644
--- a/api/read-variables.html
+++ b/api/read-variables.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/refresh-token.html b/api/refresh-token.html
index 7115f99f23..03c1867bca 100644
--- a/api/refresh-token.html
+++ b/api/refresh-token.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/reset-password.html b/api/reset-password.html
index f018f97d31..5187bd26e6 100644
--- a/api/reset-password.html
+++ b/api/reset-password.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/retrieve-vertices-order.html b/api/retrieve-vertices-order.html
index 5ab9daa21a..a75306969b 100644
--- a/api/retrieve-vertices-order.html
+++ b/api/retrieve-vertices-order.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/save-store-api-key.html b/api/save-store-api-key.html
index 395b6f8460..1addd0a42d 100644
--- a/api/save-store-api-key.html
+++ b/api/save-store-api-key.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/share-component.html b/api/share-component.html
index ef52ccbcd7..e66e00ca86 100644
--- a/api/share-component.html
+++ b/api/share-component.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/simplified-run-flow.html b/api/simplified-run-flow.html
index 6ff3b015bd..f09ff25a78 100644
--- a/api/simplified-run-flow.html
+++ b/api/simplified-run-flow.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/stream-logs.html b/api/stream-logs.html
index 1d65fb3f66..aa822dea8a 100644
--- a/api/stream-logs.html
+++ b/api/stream-logs.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/update-flow.html b/api/update-flow.html
index 1a82670f1d..025f164f7b 100644
--- a/api/update-flow.html
+++ b/api/update-flow.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/update-folder-redirect.html b/api/update-folder-redirect.html
index 1a1de13df3..3429c46f9a 100644
--- a/api/update-folder-redirect.html
+++ b/api/update-folder-redirect.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/update-message.html b/api/update-message.html
index 623ecbb1ef..a5dbd66fb0 100644
--- a/api/update-message.html
+++ b/api/update-message.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/update-project-mcp-settings.html b/api/update-project-mcp-settings.html
index f743894a63..3179735cfa 100644
--- a/api/update-project-mcp-settings.html
+++ b/api/update-project-mcp-settings.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/update-project.html b/api/update-project.html
index 0dfccdb19c..51002463e4 100644
--- a/api/update-project.html
+++ b/api/update-project.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/update-server-endpoint.html b/api/update-server-endpoint.html
index c58128dc86..179586dfcb 100644
--- a/api/update-server-endpoint.html
+++ b/api/update-server-endpoint.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/update-session-id.html b/api/update-session-id.html
index f98ab64769..2cb2179e7b 100644
--- a/api/update-session-id.html
+++ b/api/update-session-id.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/update-shared-component.html b/api/update-shared-component.html
index 0972842ea4..53361f8e83 100644
--- a/api/update-shared-component.html
+++ b/api/update-shared-component.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/update-variable.html b/api/update-variable.html
index 73a26190a5..921f789265 100644
--- a/api/update-variable.html
+++ b/api/update-variable.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/upload-file-1.html b/api/upload-file-1.html
index 9483e345c9..0e411d251a 100644
--- a/api/upload-file-1.html
+++ b/api/upload-file-1.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/upload-file-2.html b/api/upload-file-2.html
index bdbeccbd4e..7c1e392710 100644
--- a/api/upload-file-2.html
+++ b/api/upload-file-2.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/upload-file-redirect.html b/api/upload-file-redirect.html
index 8975dabe3b..466814cf73 100644
--- a/api/upload-file-redirect.html
+++ b/api/upload-file-redirect.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/upload-file.html b/api/upload-file.html
index 96e28ae232..c6a110f14d 100644
--- a/api/upload-file.html
+++ b/api/upload-file.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/upload-user-file-1.html b/api/upload-user-file-1.html
index 98201b00e2..04db9ee14d 100644
--- a/api/upload-user-file-1.html
+++ b/api/upload-user-file-1.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/upload-user-file.html b/api/upload-user-file.html
index f690991c9a..6147ac34cd 100644
--- a/api/upload-user-file.html
+++ b/api/upload-user-file.html
@@ -23,7 +23,7 @@
-
+
diff --git a/api/webhook-run-flow.html b/api/webhook-run-flow.html
index 02b0a87b60..689867612a 100644
--- a/api/webhook-run-flow.html
+++ b/api/webhook-run-flow.html
@@ -23,7 +23,7 @@
-
+
diff --git a/assets/js/03aeaaab.12f90601.js b/assets/js/03aeaaab.12f90601.js
deleted file mode 100644
index 69cd40a717..0000000000
--- a/assets/js/03aeaaab.12f90601.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[2901],{9837:(e,t,o)=>{o.r(t),o.d(t,{CH:()=>l,assets:()=>d,chCodeConfig:()=>m,contentTitle:()=>h,default:()=>u,frontMatter:()=>a,metadata:()=>n,toc:()=>g});const n=JSON.parse('{"id":"Templates/memory-chatbot","title":"Memory chatbot","description":"The Chat memory component is also known as the Message history component.","source":"@site/docs/Templates/memory-chatbot.mdx","sourceDirName":"Templates","slug":"/memory-chatbot","permalink":"/memory-chatbot","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Memory chatbot","slug":"/memory-chatbot"},"sidebar":"docs","previous":{"title":"Document QA","permalink":"/document-qa"},"next":{"title":"Vector store RAG","permalink":"/vector-store-rag"}}');var s=o(74848),r=o(28453),i=o(24754),c=o(17886);const a={title:"Memory chatbot",slug:"/memory-chatbot"},h=void 0,d={},l={annotations:i.hk,Code:i.Cy},m={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},g=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Create the memory chatbot flow",id:"create-the-memory-chatbot-flow",level:2},{value:"Run the memory chatbot flow",id:"run-the-memory-chatbot-flow",level:2},{value:"Use Session ID with the memory chatbot flow",id:"use-session-id-with-the-memory-chatbot-flow",level:2}];function p(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return l||x("CH",!1),l.Code||x("CH.Code",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n","\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.strong,{children:"Chat memory"})," component is also known as the ",(0,s.jsx)(t.strong,{children:"Message history"})," component."]})}),"\n",(0,s.jsxs)(t.p,{children:["This flow extends the ",(0,s.jsx)(t.a,{href:"/basic-prompting",children:"basic prompting flow"})," with a ",(0,s.jsx)(t.a,{href:"/components-helpers#message-history",children:"Message history"})," component that stores previous chat messages and uses them to provide context for the current conversation."]}),"\n",(0,s.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/get-started-installation",children:"A running Langflow instance"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"https://platform.openai.com/",children:"An OpenAI API key"})}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"create-the-memory-chatbot-flow",children:"Create the memory chatbot flow"}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["From the Langflow dashboard, click ",(0,s.jsx)(t.strong,{children:"New Flow"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:["Select ",(0,s.jsx)(t.strong,{children:"Memory Chatbot"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:["The ",(0,s.jsx)(t.strong,{children:"Memory Chatbot"})," flow is created."]}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Memory chatbot flow",src:o(97829).A+"",width:"4000",height:"1870"})}),"\n",(0,s.jsxs)(t.p,{children:["This flow adds a ",(0,s.jsx)(t.strong,{children:"Message history"})," component to the Basic Prompting flow.\nThis component retrieves previous messages and sends them to the ",(0,s.jsx)(t.strong,{children:"Prompt"})," component to fill a part of the ",(0,s.jsx)(t.strong,{children:"Template"})," with context."]}),"\n",(0,s.jsxs)(t.p,{children:["To examine the template, click the ",(0,s.jsx)(t.strong,{children:"Template"})," field in the ",(0,s.jsx)(t.strong,{children:"Prompt"})," component.\nThe ",(0,s.jsx)(t.strong,{children:"Prompt"})," instructs the ",(0,s.jsx)(t.strong,{children:"Language model"})," component how to respond to input."]}),"\n",(0,s.jsx)(l.Code,{codeConfig:m,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"You are a helpful assistant that answers questions.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"Use markdown to format your answer, properly embedding images and urls.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"History:",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"{memory}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"{memory}"})," code in the prompt creates a new input port in the component called ",(0,s.jsx)(t.strong,{children:"memory"}),".\nThe ",(0,s.jsx)(t.strong,{children:"Message history"})," component is connected to this port to store chat messages from the ",(0,s.jsx)(t.strong,{children:"Playground"}),", and provide the ",(0,s.jsx)(t.strong,{children:"Language model"})," component with a memory of previous chat messages."]}),"\n",(0,s.jsx)(t.h2,{id:"run-the-memory-chatbot-flow",children:"Run the memory chatbot flow"}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["Open the ",(0,s.jsx)(t.strong,{children:"Playground"}),"."]}),"\n",(0,s.jsx)(t.li,{children:"Enter multiple questions. For example, try entering this conversation:"}),"\n"]}),"\n",(0,s.jsx)(l.Code,{codeConfig:m,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Hi, my name is Luca.",props:{}}]},{tokens:[{content:"Please tell me about PostgreSQL.",props:{}}]},{tokens:[{content:"What is my name?",props:{}}]},{tokens:[{content:"What is the second subject I asked you about?",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsx)(t.p,{children:"The chatbot remembers your name and previous questions."}),"\n",(0,s.jsxs)(t.ol,{start:"3",children:["\n",(0,s.jsxs)(t.li,{children:["To view the ",(0,s.jsx)(t.strong,{children:"Message Logs"})," pane, in the ",(0,s.jsx)(t.strong,{children:"Playground"})," pane, click ",(0,s.jsx)(c.A,{name:"Ellipsis","aria-hidden":"true"})," ",(0,s.jsx)(t.strong,{children:"Options"}),", and then click ",(0,s.jsx)(t.strong,{children:"Message logs"}),".\nThe ",(0,s.jsx)(t.strong,{children:"Message Logs"})," pane displays all previous messages."]}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Message logs pane",src:o(85629).A+"",width:"4000",height:"2182"})}),"\n",(0,s.jsx)(t.h2,{id:"use-session-id-with-the-memory-chatbot-flow",children:"Use Session ID with the memory chatbot flow"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.code,{children:"session_id"})," is a unique identifier in Langflow that stores conversation sessions between the AI and a user. A ",(0,s.jsx)(t.code,{children:"session_id"})," is created when a conversation is initiated, and then associated with all subsequent messages during that session."]}),"\n",(0,s.jsxs)(t.p,{children:["In the ",(0,s.jsx)(t.strong,{children:"Memory Chatbot"})," flow you created, the ",(0,s.jsx)(t.strong,{children:"Message history"})," component references past interactions by ",(0,s.jsx)(t.strong,{children:"Session ID"}),". You can demonstrate this by modifying the ",(0,s.jsx)(t.strong,{children:"Session ID"})," value to switch between conversation histories."]}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["In the ",(0,s.jsx)(t.strong,{children:"Session ID"})," field of the ",(0,s.jsx)(t.strong,{children:"Message history"})," and ",(0,s.jsx)(t.strong,{children:"Chat Input"})," components, add a ",(0,s.jsx)(t.strong,{children:"Session ID"})," value like ",(0,s.jsx)(t.code,{children:"MySessionID"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:["Now, once you send a new message the ",(0,s.jsx)(t.strong,{children:"Playground"}),", you should have a new session created in the ",(0,s.jsx)(t.strong,{children:"Message Logs"})," pane."]}),"\n",(0,s.jsx)(t.li,{children:"Note how your conversation is being stored in different memory sessions."}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["To learn more about memory in Langflow, see ",(0,s.jsx)(t.a,{href:"/memory",children:"Memory"}),"."]})]})}function u(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(p,{...e})}):p(e)}function x(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},17886:(e,t,o)=>{o.d(t,{A:()=>r});o(96540);var n=o(64058),s=o(74848);function r({name:e,...t}){const o=n[e];return o?(0,s.jsx)(o,{...t}):null}},85629:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/messages-logs-0253cad77c1fb946dc1e2f0fe239261f.png"},97829:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/starter-flow-memory-chatbot-6b9e4a5ee08fe124cf7459698893c0a3.png"}}]);
\ No newline at end of file
diff --git a/assets/js/03aeaaab.d796b54e.js b/assets/js/03aeaaab.d796b54e.js
new file mode 100644
index 0000000000..efb3586072
--- /dev/null
+++ b/assets/js/03aeaaab.d796b54e.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[2901],{9837:(e,t,o)=>{o.r(t),o.d(t,{CH:()=>l,assets:()=>d,chCodeConfig:()=>m,contentTitle:()=>h,default:()=>u,frontMatter:()=>a,metadata:()=>s,toc:()=>g});const s=JSON.parse('{"id":"Templates/memory-chatbot","title":"Memory chatbot","description":"This flow extends the Basic Prompting flow template with a Message History component that stores previous chat messages and uses them to provide context for the current conversation.","source":"@site/docs/Templates/memory-chatbot.mdx","sourceDirName":"Templates","slug":"/memory-chatbot","permalink":"/memory-chatbot","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Memory chatbot","slug":"/memory-chatbot"},"sidebar":"docs","previous":{"title":"Document QA","permalink":"/document-qa"},"next":{"title":"Vector store RAG","permalink":"/vector-store-rag"}}');var n=o(74848),r=o(28453),i=o(24754),c=o(17886);const a={title:"Memory chatbot",slug:"/memory-chatbot"},h=void 0,d={},l={annotations:i.hk,Code:i.Cy},m={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},g=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Create the memory chatbot flow",id:"create-the-memory-chatbot-flow",level:2},{value:"Run the memory chatbot flow",id:"run-the-memory-chatbot-flow",level:2},{value:"Use Session ID with the memory chatbot flow",id:"use-session-id-with-the-memory-chatbot-flow",level:2}];function p(e){const t={a:"a",code:"code",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return l||x("CH",!1),l.Code||x("CH.Code",!0),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n","\n",(0,n.jsxs)(t.p,{children:["This flow extends the ",(0,n.jsxs)(t.a,{href:"/basic-prompting",children:[(0,n.jsx)(t.strong,{children:"Basic Prompting"})," flow template"]})," with a ",(0,n.jsxs)(t.a,{href:"/components-helpers#message-history",children:[(0,n.jsx)(t.strong,{children:"Message History"})," component"]})," that stores previous chat messages and uses them to provide context for the current conversation."]}),"\n",(0,n.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"/get-started-installation",children:"Install and start Langflow"})}),"\n",(0,n.jsxs)(t.li,{children:["Create an ",(0,n.jsx)(t.a,{href:"https://platform.openai.com/api-keys",children:"OpenAI API key"})]}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"create-the-memory-chatbot-flow",children:"Create the memory chatbot flow"}),"\n",(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsxs)(t.li,{children:["From the Langflow dashboard, click ",(0,n.jsx)(t.strong,{children:"New Flow"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Select ",(0,n.jsx)(t.strong,{children:"Memory Chatbot"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["The ",(0,n.jsx)(t.strong,{children:"Memory Chatbot"})," flow is created."]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"Memory chatbot flow",src:o(97829).A+"",width:"4000",height:"1870"})}),"\n",(0,n.jsxs)(t.p,{children:["This flow adds a ",(0,n.jsx)(t.strong,{children:"Message History"})," component to the Basic Prompting flow.\nThis component retrieves previous messages and sends them to the ",(0,n.jsx)(t.strong,{children:"Prompt"})," component to fill a part of the ",(0,n.jsx)(t.strong,{children:"Template"})," with context."]}),"\n",(0,n.jsxs)(t.p,{children:["To examine the template, click the ",(0,n.jsx)(t.strong,{children:"Template"})," field in the ",(0,n.jsx)(t.strong,{children:"Prompt"})," component.\nThe ",(0,n.jsx)(t.strong,{children:"Prompt"})," instructs the ",(0,n.jsx)(t.strong,{children:"Language model"})," component how to respond to input."]}),"\n",(0,n.jsx)(l.Code,{codeConfig:m,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"You are a helpful assistant that answers questions.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"Use markdown to format your answer, properly embedding images and urls.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"History:",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"{memory}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.code,{children:"{memory}"})," code in the prompt creates a new input port in the component called ",(0,n.jsx)(t.strong,{children:"memory"}),".\nThe ",(0,n.jsx)(t.strong,{children:"Message history"})," component is connected to this port to store chat messages from the ",(0,n.jsx)(t.strong,{children:"Playground"}),", and provide the ",(0,n.jsx)(t.strong,{children:"Language model"})," component with a memory of previous chat messages."]}),"\n",(0,n.jsx)(t.h2,{id:"run-the-memory-chatbot-flow",children:"Run the memory chatbot flow"}),"\n",(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsxs)(t.li,{children:["Open the ",(0,n.jsx)(t.strong,{children:"Playground"}),"."]}),"\n",(0,n.jsx)(t.li,{children:"Enter multiple questions. For example, try entering this conversation:"}),"\n"]}),"\n",(0,n.jsx)(l.Code,{codeConfig:m,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Hi, my name is Luca.",props:{}}]},{tokens:[{content:"Please tell me about PostgreSQL.",props:{}}]},{tokens:[{content:"What is my name?",props:{}}]},{tokens:[{content:"What is the second subject I asked you about?",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,n.jsx)(t.p,{children:"The chatbot remembers your name and previous questions."}),"\n",(0,n.jsxs)(t.ol,{start:"3",children:["\n",(0,n.jsxs)(t.li,{children:["To view the ",(0,n.jsx)(t.strong,{children:"Message Logs"})," pane, in the ",(0,n.jsx)(t.strong,{children:"Playground"})," pane, click ",(0,n.jsx)(c.A,{name:"Ellipsis","aria-hidden":"true"})," ",(0,n.jsx)(t.strong,{children:"Options"}),", and then click ",(0,n.jsx)(t.strong,{children:"Message logs"}),".\nThe ",(0,n.jsx)(t.strong,{children:"Message Logs"})," pane displays all previous messages."]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"Message logs pane",src:o(85629).A+"",width:"4000",height:"2182"})}),"\n",(0,n.jsx)(t.h2,{id:"use-session-id-with-the-memory-chatbot-flow",children:"Use Session ID with the memory chatbot flow"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.code,{children:"session_id"})," is a unique identifier in Langflow that stores conversation sessions between the AI and a user. A ",(0,n.jsx)(t.code,{children:"session_id"})," is created when a conversation is initiated, and then associated with all subsequent messages during that session."]}),"\n",(0,n.jsxs)(t.p,{children:["In the ",(0,n.jsx)(t.strong,{children:"Memory Chatbot"})," flow you created, the ",(0,n.jsx)(t.strong,{children:"Message history"})," component references past interactions by ",(0,n.jsx)(t.strong,{children:"Session ID"}),". You can demonstrate this by modifying the ",(0,n.jsx)(t.strong,{children:"Session ID"})," value to switch between conversation histories."]}),"\n",(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsxs)(t.li,{children:["In the ",(0,n.jsx)(t.strong,{children:"Session ID"})," field of the ",(0,n.jsx)(t.strong,{children:"Message history"})," and ",(0,n.jsx)(t.strong,{children:"Chat Input"})," components, add a ",(0,n.jsx)(t.strong,{children:"Session ID"})," value like ",(0,n.jsx)(t.code,{children:"MySessionID"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Now, once you send a new message the ",(0,n.jsx)(t.strong,{children:"Playground"}),", you should have a new session created in the ",(0,n.jsx)(t.strong,{children:"Message Logs"})," pane."]}),"\n",(0,n.jsx)(t.li,{children:"Note how your conversation is being stored in different memory sessions."}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["To learn more about memory in Langflow, see ",(0,n.jsx)(t.a,{href:"/memory",children:"Memory"}),"."]})]})}function u(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(p,{...e})}):p(e)}function x(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},17886:(e,t,o)=>{o.d(t,{A:()=>r});o(96540);var s=o(64058),n=o(74848);function r({name:e,...t}){const o=s[e];return o?(0,n.jsx)(o,{...t}):null}},85629:(e,t,o)=>{o.d(t,{A:()=>s});const s=o.p+"assets/images/messages-logs-0253cad77c1fb946dc1e2f0fe239261f.png"},97829:(e,t,o)=>{o.d(t,{A:()=>s});const s=o.p+"assets/images/starter-flow-memory-chatbot-6b9e4a5ee08fe124cf7459698893c0a3.png"}}]);
\ No newline at end of file
diff --git a/assets/js/1ab69cbd.30fb7928.js b/assets/js/1ab69cbd.30fb7928.js
new file mode 100644
index 0000000000..aab35b0247
--- /dev/null
+++ b/assets/js/1ab69cbd.30fb7928.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[2475],{8593:(o,e,t)=>{t.r(e),t.d(e,{CH:()=>i,assets:()=>a,chCodeConfig:()=>d,contentTitle:()=>p,default:()=>y,frontMatter:()=>c,metadata:()=>n,toc:()=>u});const n=JSON.parse('{"id":"API-Reference/api-build","title":"Build endpoints","description":"The /build endpoints are used by Langflow\'s frontend Workspace and Playground code.","source":"@site/docs/API-Reference/api-build.mdx","sourceDirName":"API-Reference","slug":"/api-build","permalink":"/api-build","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Build endpoints","slug":"/api-build"},"sidebar":"docs","previous":{"title":"Monitor endpoints","permalink":"/api-monitor"},"next":{"title":"Users endpoints","permalink":"/api-users"}}');var s=t(74848),r=t(28453),l=t(24754);t(11470),t(19365);const c={title:"Build endpoints",slug:"/api-build"},p=void 0,a={},i={annotations:l.hk,Code:l.Cy},d={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},u=[{value:"Build flow and stream events",id:"build-flow-and-stream-events",level:2},{value:"Build headers",id:"build-headers",level:2},{value:"Build parameters",id:"build-parameters",level:2},{value:"Set start and stop points",id:"set-start-and-stop-points",level:3},{value:"Override flow parameters",id:"override-flow-parameters",level:3},{value:"See also",id:"see-also",level:2}];function h(o){const e={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...o.components},{Details:t}=e;return i||F("CH",!1),i.Code||F("CH.Code",!0),t||F("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n","\n",(0,s.jsxs)(e.admonition,{type:"important",children:[(0,s.jsxs)(e.p,{children:["The ",(0,s.jsx)(e.code,{children:"/build"})," endpoints are used by Langflow's frontend ",(0,s.jsx)(e.strong,{children:"Workspace"})," and ",(0,s.jsx)(e.strong,{children:"Playground"})," code.\nThese endpoints are part of the internal Langflow codebase."]}),(0,s.jsxs)(e.p,{children:["Don't use these endpoints to run flows in applications that use your Langflow flows.\nTo run flows in your apps, see ",(0,s.jsx)(e.a,{href:"/api-flows-run",children:"Flow trigger endpoints"}),"."]})]}),"\n",(0,s.jsxs)(e.p,{children:["The ",(0,s.jsx)(e.code,{children:"/build"})," endpoints support Langflow's frontend code for building flows in the Langflow Workspace.\nYou can use these endpoints to build vertices and flows, as well as execute flows with streaming event responses.\nYou might need to use or understand these endpoints when contributing to the Langflow codebase."]}),"\n",(0,s.jsx)(e.h2,{id:"build-flow-and-stream-events",children:"Build flow and stream events"}),"\n",(0,s.jsx)(e.p,{children:"This endpoint builds and executes a flow, returning a job ID that can be used to stream execution events."}),"\n",(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["Send a POST request to the ",(0,s.jsx)(e.code,{children:"/build/$FLOW_ID/flow"})," endpoint:"]}),"\n",(0,s.jsx)(i.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"POST ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/build/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'/flow" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "inputs": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_value": "Tell me a story"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(i.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "job_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"123e4567-e89b-12d3-a456-426614174000"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["After receiving a job ID from the build endpoint, use the ",(0,s.jsx)(e.code,{children:"/build/$JOB_ID/events"})," endpoint to stream the execution results:"]}),"\n",(0,s.jsx)(i.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/build/123e4567-e89b-12d3-a456-426614174000/events" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(i.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"event"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"vertices_sorted"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"data"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}},{content:'"ids"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}},{content:'"ChatInput-XtBLx"',props:{style:{color:"#A5D6FF"}}},{content:"], ",props:{style:{color:"#C9D1D9"}}},{content:'"to_run"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}},{content:'"Prompt-x74Ze"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"ChatOutput-ylMzN"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"ChatInput-XtBLx"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"OpenAIModel-d1wOZ"',props:{style:{color:"#A5D6FF"}}},{content:"]}}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"event"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"add_message"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"data"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}},{content:'"timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-03-03T17:42:23"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"sender"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"User"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"sender_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"User"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"session_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"d2bbd92b-187e-4c84-b2d4-5df365704201"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Tell me a story"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"files"',props:{style:{color:"#7EE787"}}},{content:": [], ",props:{style:{color:"#C9D1D9"}}},{content:'"error"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"edit"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"properties"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}},{content:'"text_color"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'""',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"background_color"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'""',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"edited"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"source"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}},{content:'"id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"display_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"source"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:"}, ",props:{style:{color:"#C9D1D9"}}},{content:'"icon"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'""',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"allow_markdown"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"positive_feedback"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"state"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"complete"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"targets"',props:{style:{color:"#7EE787"}}},{content:": []}, ",props:{style:{color:"#C9D1D9"}}},{content:'"category"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"message"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"content_blocks"',props:{style:{color:"#7EE787"}}},{content:": [], ",props:{style:{color:"#C9D1D9"}}},{content:'"id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"28879bd8-6a68-4dd5-b658-74d643a4dd92"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"d2bbd92b-187e-4c84-b2d4-5df365704201"',props:{style:{color:"#A5D6FF"}}},{content:"}}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"// ... Additional events as the flow executes ...",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"event"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"end"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"data"',props:{style:{color:"#7EE787"}}},{content:": {}}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["The ",(0,s.jsx)(e.code,{children:"/build/$FLOW_ID/events"})," endpoint accepts an optional ",(0,s.jsx)(e.code,{children:"stream"})," query parameter that defaults to ",(0,s.jsx)(e.code,{children:"true"}),".\nTo disable streaming and get all events at once, set ",(0,s.jsx)(e.code,{children:"stream"})," to ",(0,s.jsx)(e.code,{children:"false"}),"."]}),"\n",(0,s.jsx)(i.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/build/123e4567-e89b-12d3-a456-426614174000/events?stream=false" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,s.jsx)(e.h2,{id:"build-headers",children:"Build headers"}),"\n",(0,s.jsxs)(e.table,{children:[(0,s.jsx)(e.thead,{children:(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.th,{children:"Header"}),(0,s.jsx)(e.th,{children:"Info"}),(0,s.jsx)(e.th,{children:"Example"})]})}),(0,s.jsxs)(e.tbody,{children:[(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Content-Type"}),(0,s.jsx)(e.td,{children:"Required. Specifies the JSON format."}),(0,s.jsx)(e.td,{children:'"application/json"'})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"accept"}),(0,s.jsx)(e.td,{children:"Optional. Specifies the response format."}),(0,s.jsx)(e.td,{children:'"application/json"'})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"x-api-key"}),(0,s.jsx)(e.td,{children:"Optional. Required only if authentication is enabled."}),(0,s.jsx)(e.td,{children:'"sk-..."'})]})]})]}),"\n",(0,s.jsx)(e.h2,{id:"build-parameters",children:"Build parameters"}),"\n",(0,s.jsxs)(e.table,{children:[(0,s.jsx)(e.thead,{children:(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.th,{children:"Parameter"}),(0,s.jsx)(e.th,{children:"Type"}),(0,s.jsx)(e.th,{children:"Description"})]})}),(0,s.jsxs)(e.tbody,{children:[(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"inputs"}),(0,s.jsx)(e.td,{children:"object"}),(0,s.jsx)(e.td,{children:"Optional. Input values for flow components."})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"data"}),(0,s.jsx)(e.td,{children:"object"}),(0,s.jsx)(e.td,{children:"Optional. Flow data to override stored configuration."})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"files"}),(0,s.jsx)(e.td,{children:"array[string]"}),(0,s.jsx)(e.td,{children:"Optional. List of file paths to use."})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"start_component_id"}),(0,s.jsx)(e.td,{children:"string"}),(0,s.jsxs)(e.td,{children:["Optional. ID of the component where the execution should start. Component ",(0,s.jsx)(e.code,{children:"id"})," values can be found in ",(0,s.jsx)(e.a,{href:"/concepts-flows-import#langflow-json-file-contents",children:"Langflow JSON files"})]})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"stop_component_id"}),(0,s.jsx)(e.td,{children:"string"}),(0,s.jsxs)(e.td,{children:["Optional. ID of the component where the execution should stop. Component ",(0,s.jsx)(e.code,{children:"id"})," values can be found in ",(0,s.jsx)(e.a,{href:"/concepts-flows-import#langflow-json-file-contents",children:"Langflow JSON files"}),"."]})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"log_builds"}),(0,s.jsx)(e.td,{children:"boolean"}),(0,s.jsxs)(e.td,{children:["Optional. Control build logging. Default: ",(0,s.jsx)(e.code,{children:"true"}),"."]})]})]})]}),"\n",(0,s.jsx)(e.h3,{id:"set-start-and-stop-points",children:"Set start and stop points"}),"\n",(0,s.jsxs)(e.p,{children:["The ",(0,s.jsx)(e.code,{children:"/build"})," endpoint accepts optional values for ",(0,s.jsx)(e.code,{children:"start_component_id"})," and ",(0,s.jsx)(e.code,{children:"stop_component_id"})," to control where the flow run starts and stops.\nSetting ",(0,s.jsx)(e.code,{children:"stop_component_id"})," for a component triggers the same behavior as clicking the ",(0,s.jsx)(e.strong,{children:"Play"})," button on that component, where all dependent components leading up to that component are also run.\nFor example, to stop flow execution at the OpenAI model component, run the following command:"]}),"\n",(0,s.jsx)(i.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"POST ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/build/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'/flow" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:'\'{"stop_component_id": "OpenAIModel-Uksag"}\'',props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,s.jsx)(e.h3,{id:"override-flow-parameters",children:"Override flow parameters"}),"\n",(0,s.jsxs)(e.p,{children:["The ",(0,s.jsx)(e.code,{children:"/build"})," endpoint also accepts inputs for ",(0,s.jsx)(e.code,{children:"data"})," directly, instead of using the values stored in the Langflow database.\nThis is useful for running flows without having to pass custom values through the UI."]}),"\n",(0,s.jsx)(i.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"POST ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/build/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'/flow" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "data": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "nodes": [],',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "edges": []',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "inputs": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_value": "Your custom input here",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "session": "session_id"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(i.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{ ",props:{style:{color:"#C9D1D9"}}},{content:'"job_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"0bcc7f23-40b4-4bfa-9b8a-a44181fd1175"',props:{style:{color:"#A5D6FF"}}},{content:" }",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(e.h2,{id:"see-also",children:"See also"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"/api-monitor#get-vertex-builds",children:"Get Vertex builds"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"/api-monitor#delete-vertex-builds",children:"Delete Vertex builds"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"/session-id",children:"Session ID"})}),"\n"]})]})}function y(o={}){const{wrapper:e}={...(0,r.R)(),...o.components};return e?(0,s.jsx)(e,{...o,children:(0,s.jsx)(h,{...o})}):h(o)}function F(o,e){throw new Error("Expected "+(e?"component":"object")+" `"+o+"` to be defined: you likely forgot to import, pass, or provide it.")}},11470:(o,e,t)=>{t.d(e,{A:()=>j});var n=t(96540),s=t(18215),r=t(23104),l=t(56347),c=t(205),p=t(57485),a=t(31682),i=t(70679);function d(o){return n.Children.toArray(o).filter(o=>"\n"!==o).map(o=>{if(!o||(0,n.isValidElement)(o)&&function(o){const{props:e}=o;return!!e&&"object"==typeof e&&"value"in e}(o))return o;throw new Error(`Docusaurus error: Bad
/v1/files and /v2/files",id:"differences-between-v1files-and-v2files",level:2},{value:"Files/V1 endpoints",id:"filesv1-endpoints",level:2},{value:"Upload file (v1)",id:"upload-file-v1",level:3},{value:"Upload image files (v1)",id:"upload-image-files-v1",level:3},{value:"List files (v1)",id:"list-files-v1",level:3},{value:"Download file (v1)",id:"download-file-v1",level:3},{value:"Delete file (v1)",id:"delete-file-v1",level:3},{value:"Files/V2 endpoints",id:"filesv2-endpoints",level:2},{value:"Upload file (v2)",id:"upload-file-v2",level:3},{value:"Send files to your flows (v2)",id:"send-files-to-your-flows-v2",level:3},{value:"List files (v2)",id:"list-files-v2",level:3},{value:"Download file (v2)",id:"download-file-v2",level:3},{value:"Edit file name (v2)",id:"edit-file-name-v2",level:3},{value:"Delete file (v2)",id:"delete-file-v2",level:3},{value:"Delete all files (v2)",id:"delete-all-files-v2",level:3},{value:"Create upload file (Deprecated)",id:"create-upload-file-deprecated",level:2}];function h(e){const o={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,l.R)(),...e.components},{Details:t}=o;return a||f("CH",!1),a.Code||f("CH.Code",!0),t||f("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n","\n",(0,s.jsxs)(o.p,{children:["Use the ",(0,s.jsx)(o.code,{children:"/files"})," endpoints to move files between your local machine and Langflow."]}),"\n",(0,s.jsxs)(o.h2,{id:"differences-between-v1files-and-v2files",children:["Differences between ",(0,s.jsx)(o.code,{children:"/v1/files"})," and ",(0,s.jsx)(o.code,{children:"/v2/files"})]}),"\n",(0,s.jsxs)(o.p,{children:["There are two versions of the ",(0,s.jsx)(o.code,{children:"/files"})," endpoints."]}),"\n",(0,s.jsxs)(o.p,{children:[(0,s.jsx)(o.code,{children:"/v2/files"})," offers the following improvements over ",(0,s.jsx)(o.code,{children:"/v1/files"}),":"]}),"\n",(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.code,{children:"/v2"})," files are organized by ",(0,s.jsx)(o.code,{children:"user_id"})," instead of ",(0,s.jsx)(o.code,{children:"flow_id"}),".\nThis means files are owned by users, and they aren't attached to specific flows.\nYou can upload a file to Langflow one time, and use it with multiple flows."]}),"\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.code,{children:"/v2"})," files are tracked in the Langflow database."]}),"\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.code,{children:"/v2"})," supports bulk upload and delete."]}),"\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.code,{children:"/v2"})," responses contain more descriptive metadata."]}),"\n"]}),"\n",(0,s.jsxs)(o.p,{children:["However, ",(0,s.jsx)(o.code,{children:"/v2/files"})," doesn't support image files.\nTo send image files to your flows through the API, use ",(0,s.jsx)(o.a,{href:"#upload-image-files-v1",children:"Upload image files (v1)"}),"."]}),"\n",(0,s.jsx)(o.h2,{id:"filesv1-endpoints",children:"Files/V1 endpoints"}),"\n",(0,s.jsxs)(o.p,{children:["Use the ",(0,s.jsx)(o.code,{children:"/files"})," endpoints to move files between your local machine and Langflow."]}),"\n",(0,s.jsx)(o.h3,{id:"upload-file-v1",children:"Upload file (v1)"}),"\n",(0,s.jsxs)(o.p,{children:["Upload a file to the ",(0,s.jsx)(o.code,{children:"v1/files/upload/$FLOW_ID"})," endpoint:\nReplace ",(0,s.jsx)(o.strong,{children:"FILE_NAME"})," with the uploaded file name."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"POST ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/files/upload/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: multipart/form-data" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -F ",props:{style:{color:"#79C0FF"}}},{content:'"file=@FILE_NAME.txt"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(o.p,{children:["Replace ",(0,s.jsx)(o.code,{children:"FILE_NAME.txt"})," with the name and extension of the file you want to upload.\nNot all file types are supported."]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flowId"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"92f9a4c5-cfc8-4656-ae63-1f0881163c28"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "file_path"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"92f9a4c5-cfc8-4656-ae63-1f0881163c28/2024-12-30_15-19-43_your_file.txt"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h3,{id:"upload-image-files-v1",children:"Upload image files (v1)"}),"\n",(0,s.jsx)(o.p,{children:"Send image files to Langflow to use them in flows."}),"\n",(0,s.jsxs)(o.p,{children:["The default file limit is 100 MB.\nTo change this limit, set the ",(0,s.jsx)(o.code,{children:"LANGFLOW_MAX_FILE_SIZE_UPLOAD"})," ",(0,s.jsx)(o.a,{href:"/environment-variables",children:"environment variable"}),"."]}),"\n",(0,s.jsxs)(o.ol,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Attach the image to a ",(0,s.jsx)(o.code,{children:"POST /v1/files/upload/$FLOW_ID"})," request with ",(0,s.jsx)(o.code,{children:"--form"})," (",(0,s.jsx)(o.code,{children:"-F"}),") and the file path:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:'POST "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/files/upload/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: multipart/form-data" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -F ",props:{style:{color:"#79C0FF"}}},{content:'"file=@PATH/TO/FILE.png"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(o.p,{children:["A successful request returns the ",(0,s.jsx)(o.code,{children:"file_path"})," for the image in the Langflow file management system in the format ",(0,s.jsx)(o.code,{children:"FLOW_ID/TIMESTAMP_FILENAME.TYPE"}),".\nFor example:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flowId"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"a430cc57-06bb-4c11-be39-d3d4de68d2c4"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "file_path"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"a430cc57-06bb-4c11-be39-d3d4de68d2c4/2024-11-27_14-47-50_image-file.png"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Use the returned ",(0,s.jsx)(o.code,{children:"file_path"})," to send the image file to other components that can accept file input. Where you specify the file path depends on the component type."]}),"\n",(0,s.jsxs)(o.p,{children:["The following example runs a ",(0,s.jsx)(o.a,{href:"/basic-prompting",children:"Basic Prompting flow"}),", passing the image file and the query ",(0,s.jsx)(o.code,{children:"describe this image"})," as input for the ",(0,s.jsx)(o.strong,{children:"Chat Input"})," component.\nIn this case, the file path is specified in ",(0,s.jsx)(o.code,{children:"tweaks"}),"."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"POST ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/run/a430cc57-06bb-4c11-be39-d3d4de68d2c4?stream=false" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "output_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "tweaks": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "ChatInput-b67sL": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "files": "a430cc57-06bb-4c11-be39-d3d4de68d2c4/2024-11-27_14-47-50_image-file.png",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_value": "describe this image"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsx)(o.admonition,{type:"tip",children:(0,s.jsxs)(o.p,{children:["For help with tweaks, use the ",(0,s.jsx)(o.strong,{children:"Input Schema"})," in a flow's ",(0,s.jsxs)(o.a,{href:"/concepts-publish#api-access",children:[(0,s.jsx)(o.strong,{children:"API access"})," pane"]}),".\nSetting tweaks with ",(0,s.jsx)(o.strong,{children:"Input Schema"})," also automatically populates the required component IDs."]})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(o.h3,{id:"list-files-v1",children:"List files (v1)"}),"\n",(0,s.jsx)(o.p,{children:"List all files associated with a specific flow."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/files/list/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "files"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-30_15-19-43_your_file.txt"',props:{style:{color:"#A5D6FF"}}},{content:"]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h3,{id:"download-file-v1",children:"Download file (v1)"}),"\n",(0,s.jsx)(o.p,{children:"Download a specific file from a flow."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/files/download/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'/2024-12-30_15-19-43_your_file.txt" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --output ",props:{style:{color:"#79C0FF"}}},{content:"downloaded_file.txt",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"File contents downloaded to downloaded_file.txt",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h3,{id:"delete-file-v1",children:"Delete file (v1)"}),"\n",(0,s.jsx)(o.p,{children:"Delete a specific file from a flow."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"DELETE ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/files/delete/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'/2024-12-30_15-19-43_your_file.txt" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"File 2024-12-30_15-19-43_your_file.txt deleted successfully"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h2,{id:"filesv2-endpoints",children:"Files/V2 endpoints"}),"\n",(0,s.jsxs)(o.p,{children:["Use the ",(0,s.jsx)(o.code,{children:"/files"})," endpoints to move files between your local machine and Langflow."]}),"\n",(0,s.jsxs)(o.p,{children:["The ",(0,s.jsx)(o.code,{children:"/v2/files"})," endpoints can be authenticated by an API key or JWT.\nTo create a Langflow API key and export it as an environment variable, see ",(0,s.jsx)(o.a,{href:"/api-reference-api-examples",children:"Get started with the Langflow API"}),"."]}),"\n",(0,s.jsx)(o.h3,{id:"upload-file-v2",children:"Upload file (v2)"}),"\n",(0,s.jsx)(o.p,{children:"Upload a file to your user account. The file can be used across multiple flows."}),"\n",(0,s.jsxs)(o.p,{children:["The file is uploaded in the format ",(0,s.jsx)(o.code,{children:"USER_ID/FILE_ID.FILE_EXTENSION"}),", such as ",(0,s.jsx)(o.code,{children:"07e5b864-e367-4f52-b647-a48035ae7e5e/d44dc2e1-9ae9-4cf6-9114-8d34a6126c94.pdf"}),"."]}),"\n",(0,s.jsxs)(o.ol,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["To retrieve your current ",(0,s.jsx)(o.code,{children:"user_id"}),", call the ",(0,s.jsx)(o.code,{children:"/whoami"})," endpoint:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/users/whoami" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'{"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}}',props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["In the POST request to ",(0,s.jsx)(o.code,{children:"v2/files"}),", replace ",(0,s.jsx)(o.strong,{children:"@FILE_NAME.EXTENSION"})," with the uploaded file name and its extension.\nYou must include the ampersand (",(0,s.jsx)(o.code,{children:"@"}),") in the request to instruct curl to upload the contents of the file, not the string ",(0,s.jsx)(o.code,{children:"FILE_NAME.EXTENSION"}),"."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"POST ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v2/files" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: multipart/form-data" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -F ",props:{style:{color:"#79C0FF"}}},{content:'"file=@FILE_NAME.EXTENSION"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(o.p,{children:["The file is uploaded in the format ",(0,s.jsx)(o.code,{children:"USER_ID/FILE_ID.FILE_EXTENSION"}),", and the API returns metadata about the uploaded file:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:'"d44dc2e1-9ae9-4cf6-9114-8d34a6126c94"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:'"engine_manual"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "path"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:'"07e5b864-e367-4f52-b647-a48035ae7e5e/d44dc2e1-9ae9-4cf6-9114-8d34a6126c94.pdf"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "size"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:"851160",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "provider"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(o.h3,{id:"send-files-to-your-flows-v2",children:"Send files to your flows (v2)"}),"\n",(0,s.jsx)(o.admonition,{type:"important",children:(0,s.jsxs)(o.p,{children:["The ",(0,s.jsx)(o.code,{children:"/v2/files"})," endpoint does not support sending ",(0,s.jsx)(o.strong,{children:"image"})," files to flows.\nTo send ",(0,s.jsx)(o.strong,{children:"image"})," files to your flows through the API, follow the procedure in ",(0,s.jsx)(o.a,{href:"#upload-image-files-v1",children:"Upload image files (v1)"}),"."]})}),"\n",(0,s.jsxs)(o.p,{children:["Send a file to your flow for analysis using the ",(0,s.jsx)(o.a,{href:"/components-data#file",children:"File"})," component and the API.\nYour flow must contain a ",(0,s.jsx)(o.a,{href:"/components-data#file",children:"File"})," component to receive the file."]}),"\n",(0,s.jsxs)(o.p,{children:["The default file limit is 100 MB. To configure this value, change the ",(0,s.jsx)(o.code,{children:"LANGFLOW_MAX_FILE_SIZE_UPLOAD"})," environment variable.\nFor more information, see ",(0,s.jsx)(o.a,{href:"/environment-variables#supported-variables",children:"Supported environment variables"}),"."]}),"\n",(0,s.jsxs)(o.ol,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["To send a file to your flow with the API, POST the file to the ",(0,s.jsx)(o.code,{children:"/api/v2/files"})," endpoint."]}),"\n",(0,s.jsxs)(o.p,{children:["Replace ",(0,s.jsx)(o.strong,{children:"FILE_NAME.EXTENSION"})," with the name and extension of the file you want to upload.\nThis is the same step described in ",(0,s.jsx)(o.a,{href:"#upload-file-v2",children:"Upload file (v2)"}),", but since you need the filename to upload to your flow, it is included here."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"POST ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v2/files" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: multipart/form-data" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -F ",props:{style:{color:"#79C0FF"}}},{content:'"file=@FILE_NAME.EXTENSION"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(o.p,{children:["The file is uploaded in the format ",(0,s.jsx)(o.code,{children:"USER_ID/FILE_ID.FILE_EXTENSION"}),", and the API returns metadata about the uploaded file:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:'"d44dc2e1-9ae9-4cf6-9114-8d34a6126c94"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:'"engine_manual"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "path"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:'"07e5b864-e367-4f52-b647-a48035ae7e5e/d44dc2e1-9ae9-4cf6-9114-8d34a6126c94.pdf"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "size"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:"851160",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "provider"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["To use this file in your flow, add a ",(0,s.jsx)(o.a,{href:"/components-data#file",children:"File"})," component to load a file into the flow."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["To load the file into your flow, send it to the ",(0,s.jsx)(o.strong,{children:"File"})," component."]}),"\n",(0,s.jsxs)(o.p,{children:["To retrieve the ",(0,s.jsx)(o.strong,{children:"File"})," component's full name with the UUID attached, call the ",(0,s.jsx)(o.a,{href:"/api-flows#read-flow",children:"Read flow"})," endpoint, and then include your ",(0,s.jsx)(o.strong,{children:"File"})," component and the file path as a tweak with the ",(0,s.jsx)(o.code,{children:"/v1/run"})," POST request.\nIn this example, the file uploaded to ",(0,s.jsx)(o.code,{children:"/v2/files"})," is included with the ",(0,s.jsx)(o.code,{children:"/v1/run"})," POST request."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl --request POST \\",props:{}}]},{tokens:[{content:' --url "$LANGFLOW_URL/api/v1/run/$FLOW_ID" \\',props:{}}]},{tokens:[{content:' --header "Content-Type: application/json" \\',props:{}}]},{tokens:[{content:' --header "x-api-key: $LANGFLOW_API_KEY" \\',props:{}}]},{tokens:[{content:" --data '{",props:{}}]},{tokens:[{content:' "input_value": "what do you see?",',props:{}}]},{tokens:[{content:' "output_type": "chat",',props:{}}]},{tokens:[{content:' "input_type": "text",',props:{}}]},{tokens:[{content:' "tweaks": {',props:{}}]},{tokens:[{content:' "File-1olS3": {',props:{}}]},{tokens:[{content:' "path": [',props:{}}]},{tokens:[{content:' "07e5b864-e367-4f52-b647-a48035ae7e5e/3a290013-fe1e-4d3d-a454-cacae81288f3.pdf"',props:{}}]},{tokens:[{content:" ]",props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:"}'",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'"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."',props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(o.h3,{id:"list-files-v2",children:"List files (v2)"}),"\n",(0,s.jsx)(o.p,{children:"List all files associated with your user account."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v2/files" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"[",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"c7b22c4c-d5e0-4ec9-af97-5d85b7657a34"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"your_file"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "path"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"6f17a73e-97d7-4519-a8d9-8e4c0be411bb/c7b22c4c-d5e0-4ec9-af97-5d85b7657a34.txt"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "size"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"1234",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "provider"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h3,{id:"download-file-v2",children:"Download file (v2)"}),"\n",(0,s.jsx)(o.p,{children:"Download a specific file by its ID and file extension."}),"\n",(0,s.jsxs)(o.p,{children:["You must specify the file type you expect in the ",(0,s.jsx)(o.code,{children:"--output"})," value."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v2/files/c7b22c4c-d5e0-4ec9-af97-5d85b7657a34" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --output ",props:{style:{color:"#79C0FF"}}},{content:"downloaded_file.txt",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"File contents downloaded to downloaded_file.txt",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h3,{id:"edit-file-name-v2",children:"Edit file name (v2)"}),"\n",(0,s.jsx)(o.p,{children:"Change a file name."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"PUT ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v2/files/",props:{style:{color:"#A5D6FF"}}},{content:"$FILE_ID",props:{style:{color:"#C9D1D9"}}},{content:'?name=new_file_name" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"76543e40-f388-4cb3-b0ee-a1e870aca3d3"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"new_file_name"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "path"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"6f17a73e-97d7-4519-a8d9-8e4c0be411bb/76543e40-f388-4cb3-b0ee-a1e870aca3d3.png"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "size"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"2728251",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "provider"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h3,{id:"delete-file-v2",children:"Delete file (v2)"}),"\n",(0,s.jsx)(o.p,{children:"Delete a specific file by its ID."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"DELETE ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v2/files/",props:{style:{color:"#A5D6FF"}}},{content:"$FILE_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"File deleted successfully"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h3,{id:"delete-all-files-v2",children:"Delete all files (v2)"}),"\n",(0,s.jsx)(o.p,{children:"Delete all files associated with your user account."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"DELETE ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v2/files" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"All files deleted successfully"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h2,{id:"create-upload-file-deprecated",children:"Create upload file (Deprecated)"}),"\n",(0,s.jsxs)(o.p,{children:["This endpoint is deprecated. Use the ",(0,s.jsx)(o.code,{children:"/files"})," endpoints instead."]})]})}function u(e={}){const{wrapper:o}={...(0,l.R)(),...e.components};return o?(0,s.jsx)(o,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}function f(e,o){throw new Error("Expected "+(o?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}}}]);
\ No newline at end of file
+"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9459],{11470:(e,o,t)=>{t.d(o,{A:()=>g});var n=t(96540),s=t(18215),l=t(23104),c=t(56347),r=t(205),p=t(57485),i=t(31682),a=t(70679);function d(e){return n.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:o}=e;return!!o&&"object"==typeof o&&"value"in o}(e))return e;throw new Error(`Docusaurus error: Bad /v1/files and /v2/files",id:"differences-between-v1files-and-v2files",level:2},{value:"Files/V1 endpoints",id:"filesv1-endpoints",level:2},{value:"Upload file (v1)",id:"upload-file-v1",level:3},{value:"Upload image files (v1)",id:"upload-image-files-v1",level:3},{value:"List files (v1)",id:"list-files-v1",level:3},{value:"Download file (v1)",id:"download-file-v1",level:3},{value:"Delete file (v1)",id:"delete-file-v1",level:3},{value:"Files/V2 endpoints",id:"filesv2-endpoints",level:2},{value:"Upload file (v2)",id:"upload-file-v2",level:3},{value:"Send files to your flows (v2)",id:"send-files-to-your-flows-v2",level:3},{value:"List files (v2)",id:"list-files-v2",level:3},{value:"Download file (v2)",id:"download-file-v2",level:3},{value:"Edit file name (v2)",id:"edit-file-name-v2",level:3},{value:"Delete file (v2)",id:"delete-file-v2",level:3},{value:"Delete all files (v2)",id:"delete-all-files-v2",level:3},{value:"Create upload file (Deprecated)",id:"create-upload-file-deprecated",level:2}];function h(e){const o={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,l.R)(),...e.components},{Details:t}=o;return a||f("CH",!1),a.Code||f("CH.Code",!0),t||f("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n","\n",(0,s.jsxs)(o.p,{children:["Use the ",(0,s.jsx)(o.code,{children:"/files"})," endpoints to move files between your local machine and Langflow."]}),"\n",(0,s.jsxs)(o.h2,{id:"differences-between-v1files-and-v2files",children:["Differences between ",(0,s.jsx)(o.code,{children:"/v1/files"})," and ",(0,s.jsx)(o.code,{children:"/v2/files"})]}),"\n",(0,s.jsxs)(o.p,{children:["There are two versions of the ",(0,s.jsx)(o.code,{children:"/files"})," endpoints."]}),"\n",(0,s.jsxs)(o.p,{children:[(0,s.jsx)(o.code,{children:"/v2/files"})," offers the following improvements over ",(0,s.jsx)(o.code,{children:"/v1/files"}),":"]}),"\n",(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.code,{children:"/v2"})," files are organized by ",(0,s.jsx)(o.code,{children:"user_id"})," instead of ",(0,s.jsx)(o.code,{children:"flow_id"}),".\nThis means files are owned by users, and they aren't attached to specific flows.\nYou can upload a file to Langflow one time, and use it with multiple flows."]}),"\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.code,{children:"/v2"})," files are tracked in the Langflow database."]}),"\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.code,{children:"/v2"})," supports bulk upload and delete."]}),"\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.code,{children:"/v2"})," responses contain more descriptive metadata."]}),"\n"]}),"\n",(0,s.jsxs)(o.p,{children:["However, ",(0,s.jsx)(o.code,{children:"/v2/files"})," doesn't support image files.\nTo send image files to your flows through the API, use ",(0,s.jsx)(o.a,{href:"#upload-image-files-v1",children:"Upload image files (v1)"}),"."]}),"\n",(0,s.jsx)(o.h2,{id:"filesv1-endpoints",children:"Files/V1 endpoints"}),"\n",(0,s.jsxs)(o.p,{children:["Use the ",(0,s.jsx)(o.code,{children:"/files"})," endpoints to move files between your local machine and Langflow."]}),"\n",(0,s.jsx)(o.h3,{id:"upload-file-v1",children:"Upload file (v1)"}),"\n",(0,s.jsxs)(o.p,{children:["Upload a file to the ",(0,s.jsx)(o.code,{children:"v1/files/upload/$FLOW_ID"})," endpoint:\nReplace ",(0,s.jsx)(o.strong,{children:"FILE_NAME"})," with the uploaded file name."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"POST ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/files/upload/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: multipart/form-data" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -F ",props:{style:{color:"#79C0FF"}}},{content:'"file=@FILE_NAME.txt"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(o.p,{children:["Replace ",(0,s.jsx)(o.code,{children:"FILE_NAME.txt"})," with the name and extension of the file you want to upload.\nNot all file types are supported."]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flowId"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"92f9a4c5-cfc8-4656-ae63-1f0881163c28"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "file_path"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"92f9a4c5-cfc8-4656-ae63-1f0881163c28/2024-12-30_15-19-43_your_file.txt"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h3,{id:"upload-image-files-v1",children:"Upload image files (v1)"}),"\n",(0,s.jsx)(o.p,{children:"Send image files to Langflow to use them in flows."}),"\n",(0,s.jsxs)(o.p,{children:["The default file limit is 100 MB.\nTo change this limit, set the ",(0,s.jsx)(o.code,{children:"LANGFLOW_MAX_FILE_SIZE_UPLOAD"})," ",(0,s.jsx)(o.a,{href:"/environment-variables",children:"environment variable"}),"."]}),"\n",(0,s.jsxs)(o.ol,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Attach the image to a ",(0,s.jsx)(o.code,{children:"POST /v1/files/upload/$FLOW_ID"})," request with ",(0,s.jsx)(o.code,{children:"--form"})," (",(0,s.jsx)(o.code,{children:"-F"}),") and the file path:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:'POST "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/files/upload/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: multipart/form-data" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -F ",props:{style:{color:"#79C0FF"}}},{content:'"file=@PATH/TO/FILE.png"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(o.p,{children:["A successful request returns the ",(0,s.jsx)(o.code,{children:"file_path"})," for the image in the Langflow file management system in the format ",(0,s.jsx)(o.code,{children:"FLOW_ID/TIMESTAMP_FILENAME.TYPE"}),".\nFor example:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flowId"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"a430cc57-06bb-4c11-be39-d3d4de68d2c4"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "file_path"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"a430cc57-06bb-4c11-be39-d3d4de68d2c4/2024-11-27_14-47-50_image-file.png"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Use the returned ",(0,s.jsx)(o.code,{children:"file_path"})," to send the image file to other components that can accept file input. Where you specify the file path depends on the component type."]}),"\n",(0,s.jsxs)(o.p,{children:["The following example runs a ",(0,s.jsx)(o.a,{href:"/basic-prompting",children:"Basic Prompting flow"}),", passing the image file and the query ",(0,s.jsx)(o.code,{children:"describe this image"})," as input for the ",(0,s.jsx)(o.strong,{children:"Chat Input"})," component.\nIn this case, the file path is specified in ",(0,s.jsx)(o.code,{children:"tweaks"}),"."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"POST ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/run/a430cc57-06bb-4c11-be39-d3d4de68d2c4?stream=false" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "output_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "tweaks": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "ChatInput-b67sL": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "files": "a430cc57-06bb-4c11-be39-d3d4de68d2c4/2024-11-27_14-47-50_image-file.png",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_value": "describe this image"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsx)(o.admonition,{type:"tip",children:(0,s.jsxs)(o.p,{children:["For help with tweaks, use the ",(0,s.jsx)(o.strong,{children:"Input Schema"})," in a flow's ",(0,s.jsxs)(o.a,{href:"/concepts-publish#api-access",children:[(0,s.jsx)(o.strong,{children:"API access"})," pane"]}),".\nSetting tweaks with ",(0,s.jsx)(o.strong,{children:"Input Schema"})," also automatically populates the required component IDs."]})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(o.h3,{id:"list-files-v1",children:"List files (v1)"}),"\n",(0,s.jsx)(o.p,{children:"List all files associated with a specific flow."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/files/list/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "files"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-30_15-19-43_your_file.txt"',props:{style:{color:"#A5D6FF"}}},{content:"]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h3,{id:"download-file-v1",children:"Download file (v1)"}),"\n",(0,s.jsx)(o.p,{children:"Download a specific file from a flow."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/files/download/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'/2024-12-30_15-19-43_your_file.txt" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --output ",props:{style:{color:"#79C0FF"}}},{content:"downloaded_file.txt",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"File contents downloaded to downloaded_file.txt",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h3,{id:"delete-file-v1",children:"Delete file (v1)"}),"\n",(0,s.jsx)(o.p,{children:"Delete a specific file from a flow."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"DELETE ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/files/delete/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'/2024-12-30_15-19-43_your_file.txt" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"File 2024-12-30_15-19-43_your_file.txt deleted successfully"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h2,{id:"filesv2-endpoints",children:"Files/V2 endpoints"}),"\n",(0,s.jsxs)(o.p,{children:["Use the ",(0,s.jsx)(o.code,{children:"/files"})," endpoints to move files between your local machine and Langflow."]}),"\n",(0,s.jsxs)(o.p,{children:["The ",(0,s.jsx)(o.code,{children:"/v2/files"})," endpoints can be authenticated by an API key or JWT.\nTo create a Langflow API key and export it as an environment variable, see ",(0,s.jsx)(o.a,{href:"/api-reference-api-examples",children:"Get started with the Langflow API"}),"."]}),"\n",(0,s.jsx)(o.h3,{id:"upload-file-v2",children:"Upload file (v2)"}),"\n",(0,s.jsx)(o.p,{children:"Upload a file to your user account. The file can be used across multiple flows."}),"\n",(0,s.jsxs)(o.p,{children:["The file is uploaded in the format ",(0,s.jsx)(o.code,{children:"USER_ID/FILE_ID.FILE_EXTENSION"}),", such as ",(0,s.jsx)(o.code,{children:"07e5b864-e367-4f52-b647-a48035ae7e5e/d44dc2e1-9ae9-4cf6-9114-8d34a6126c94.pdf"}),"."]}),"\n",(0,s.jsxs)(o.ol,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["To retrieve your current ",(0,s.jsx)(o.code,{children:"user_id"}),", call the ",(0,s.jsx)(o.code,{children:"/whoami"})," endpoint:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/users/whoami" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'{"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}}',props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["In the POST request to ",(0,s.jsx)(o.code,{children:"v2/files"}),", replace ",(0,s.jsx)(o.strong,{children:"@FILE_NAME.EXTENSION"})," with the uploaded file name and its extension.\nYou must include the ampersand (",(0,s.jsx)(o.code,{children:"@"}),") in the request to instruct curl to upload the contents of the file, not the string ",(0,s.jsx)(o.code,{children:"FILE_NAME.EXTENSION"}),"."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"POST ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v2/files" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: multipart/form-data" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -F ",props:{style:{color:"#79C0FF"}}},{content:'"file=@FILE_NAME.EXTENSION"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(o.p,{children:["The file is uploaded in the format ",(0,s.jsx)(o.code,{children:"USER_ID/FILE_ID.FILE_EXTENSION"}),", and the API returns metadata about the uploaded file:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:'"d44dc2e1-9ae9-4cf6-9114-8d34a6126c94"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:'"engine_manual"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "path"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:'"07e5b864-e367-4f52-b647-a48035ae7e5e/d44dc2e1-9ae9-4cf6-9114-8d34a6126c94.pdf"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "size"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:"851160",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "provider"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(o.h3,{id:"send-files-to-your-flows-v2",children:"Send files to your flows (v2)"}),"\n",(0,s.jsx)(o.admonition,{type:"important",children:(0,s.jsxs)(o.p,{children:["The ",(0,s.jsx)(o.code,{children:"/v2/files"})," endpoint can't send image files to flows.\nTo send image files to your flows through the API, see ",(0,s.jsx)(o.a,{href:"#upload-image-files-v1",children:"Upload image files (v1)"}),"."]})}),"\n",(0,s.jsxs)(o.p,{children:["Send a file to your flow for analysis using the ",(0,s.jsx)(o.a,{href:"/components-data#file",children:"File"})," component and the API.\nYour flow must contain a ",(0,s.jsx)(o.a,{href:"/components-data#file",children:"File"})," component to receive the file."]}),"\n",(0,s.jsxs)(o.p,{children:["The default file limit is 100 MB. To configure this value, change the ",(0,s.jsx)(o.code,{children:"LANGFLOW_MAX_FILE_SIZE_UPLOAD"})," environment variable.\nFor more information, see ",(0,s.jsx)(o.a,{href:"/environment-variables#supported-variables",children:"Supported environment variables"}),"."]}),"\n",(0,s.jsxs)(o.ol,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["To send a file to your flow with the API, POST the file to the ",(0,s.jsx)(o.code,{children:"/api/v2/files"})," endpoint."]}),"\n",(0,s.jsxs)(o.p,{children:["Replace ",(0,s.jsx)(o.strong,{children:"FILE_NAME.EXTENSION"})," with the name and extension of the file you want to upload.\nThis is the same step described in ",(0,s.jsx)(o.a,{href:"#upload-file-v2",children:"Upload file (v2)"}),", but since you need the filename to upload to your flow, it is included here."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"POST ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v2/files" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: multipart/form-data" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -F ",props:{style:{color:"#79C0FF"}}},{content:'"file=@FILE_NAME.EXTENSION"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(o.p,{children:["The file is uploaded in the format ",(0,s.jsx)(o.code,{children:"USER_ID/FILE_ID.FILE_EXTENSION"}),", and the API returns metadata about the uploaded file:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:'"d44dc2e1-9ae9-4cf6-9114-8d34a6126c94"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:'"engine_manual"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "path"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:'"07e5b864-e367-4f52-b647-a48035ae7e5e/d44dc2e1-9ae9-4cf6-9114-8d34a6126c94.pdf"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "size"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:"851160",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "provider"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["To use this file in your flow, add a ",(0,s.jsx)(o.a,{href:"/components-data#file",children:"File"})," component to load a file into the flow."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["To load the file into your flow, send it to the ",(0,s.jsx)(o.strong,{children:"File"})," component."]}),"\n",(0,s.jsxs)(o.p,{children:["To retrieve the ",(0,s.jsx)(o.strong,{children:"File"})," component's full name with the UUID attached, call the ",(0,s.jsx)(o.a,{href:"/api-flows#read-flow",children:"Read flow"})," endpoint, and then include your ",(0,s.jsx)(o.strong,{children:"File"})," component and the file path as a tweak with the ",(0,s.jsx)(o.code,{children:"/v1/run"})," POST request.\nIn this example, the file uploaded to ",(0,s.jsx)(o.code,{children:"/v2/files"})," is included with the ",(0,s.jsx)(o.code,{children:"/v1/run"})," POST request."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl --request POST \\",props:{}}]},{tokens:[{content:' --url "$LANGFLOW_URL/api/v1/run/$FLOW_ID" \\',props:{}}]},{tokens:[{content:' --header "Content-Type: application/json" \\',props:{}}]},{tokens:[{content:' --header "x-api-key: $LANGFLOW_API_KEY" \\',props:{}}]},{tokens:[{content:" --data '{",props:{}}]},{tokens:[{content:' "input_value": "what do you see?",',props:{}}]},{tokens:[{content:' "output_type": "chat",',props:{}}]},{tokens:[{content:' "input_type": "text",',props:{}}]},{tokens:[{content:' "tweaks": {',props:{}}]},{tokens:[{content:' "File-1olS3": {',props:{}}]},{tokens:[{content:' "path": [',props:{}}]},{tokens:[{content:' "07e5b864-e367-4f52-b647-a48035ae7e5e/3a290013-fe1e-4d3d-a454-cacae81288f3.pdf"',props:{}}]},{tokens:[{content:" ]",props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:"}'",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'"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."',props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(o.h3,{id:"list-files-v2",children:"List files (v2)"}),"\n",(0,s.jsx)(o.p,{children:"List all files associated with your user account."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v2/files" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"[",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"c7b22c4c-d5e0-4ec9-af97-5d85b7657a34"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"your_file"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "path"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"6f17a73e-97d7-4519-a8d9-8e4c0be411bb/c7b22c4c-d5e0-4ec9-af97-5d85b7657a34.txt"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "size"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"1234",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "provider"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h3,{id:"download-file-v2",children:"Download file (v2)"}),"\n",(0,s.jsx)(o.p,{children:"Download a specific file by its ID and file extension."}),"\n",(0,s.jsxs)(o.p,{children:["You must specify the file type you expect in the ",(0,s.jsx)(o.code,{children:"--output"})," value."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v2/files/c7b22c4c-d5e0-4ec9-af97-5d85b7657a34" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --output ",props:{style:{color:"#79C0FF"}}},{content:"downloaded_file.txt",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"File contents downloaded to downloaded_file.txt",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h3,{id:"edit-file-name-v2",children:"Edit file name (v2)"}),"\n",(0,s.jsx)(o.p,{children:"Change a file name."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"PUT ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v2/files/",props:{style:{color:"#A5D6FF"}}},{content:"$FILE_ID",props:{style:{color:"#C9D1D9"}}},{content:'?name=new_file_name" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"76543e40-f388-4cb3-b0ee-a1e870aca3d3"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"new_file_name"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "path"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"6f17a73e-97d7-4519-a8d9-8e4c0be411bb/76543e40-f388-4cb3-b0ee-a1e870aca3d3.png"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "size"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"2728251",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "provider"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h3,{id:"delete-file-v2",children:"Delete file (v2)"}),"\n",(0,s.jsx)(o.p,{children:"Delete a specific file by its ID."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"DELETE ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v2/files/",props:{style:{color:"#A5D6FF"}}},{content:"$FILE_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"File deleted successfully"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h3,{id:"delete-all-files-v2",children:"Delete all files (v2)"}),"\n",(0,s.jsx)(o.p,{children:"Delete all files associated with your user account."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"DELETE ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v2/files" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"All files deleted successfully"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h2,{id:"create-upload-file-deprecated",children:"Create upload file (Deprecated)"}),"\n",(0,s.jsxs)(o.p,{children:["This endpoint is deprecated. Use the ",(0,s.jsx)(o.code,{children:"/files"})," endpoints instead."]})]})}function u(e={}){const{wrapper:o}={...(0,l.R)(),...e.components};return o?(0,s.jsx)(o,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}function f(e,o){throw new Error("Expected "+(o?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}}}]);
\ No newline at end of file
diff --git a/assets/js/9895db20.27d56105.js b/assets/js/9895db20.27d56105.js
new file mode 100644
index 0000000000..9b289e0623
--- /dev/null
+++ b/assets/js/9895db20.27d56105.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[5482],{6892:(e,n,t)=>{t.d(n,{A:()=>a});const a=t.p+"assets/images/component-mcp-astra-db-efbe2da591a955d0a6fa5259bd659a0e.png"},11470:(e,n,t)=>{t.d(n,{A:()=>y});var a=t(96540),r=t(18215),o=t(23104),s=t(56347),l=t(205),i=t(57485),c=t(31682),d=t(70679);function u(e){return a.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad 