diff --git a/404.html b/404.html index 4109476b63..ed11d786ba 100644 --- a/404.html +++ b/404.html @@ -21,7 +21,7 @@ - +
diff --git a/agents-overview.html b/agents-overview.html index 521670b635..97c6d6df3d 100644 --- a/agents-overview.html +++ b/agents-overview.html @@ -21,7 +21,7 @@ - + diff --git a/agents-tool-calling-agent-component.html b/agents-tool-calling-agent-component.html index 06f491ea22..1bcb2df934 100644 --- a/agents-tool-calling-agent-component.html +++ b/agents-tool-calling-agent-component.html @@ -21,7 +21,7 @@ - + diff --git a/api-reference-api-examples.html b/api-reference-api-examples.html index 5dd1807a9b..57264918d1 100644 --- a/api-reference-api-examples.html +++ b/api-reference-api-examples.html @@ -21,7 +21,7 @@ - + @@ -210,7 +210,9 @@ To create a Langflow API key and export it as an environment variable, see
_10{"id":"07e5b864-e367-4f52-b647-a48035ae7e5e","username":"langflow","profile_image":null,"store_api_key":null,"is_active":true,"is_superuser":true,"create_at":"2025-05-08T17:59:07.855965","updated_at":"2025-05-28T19:00:42.556460","last_login_at":"2025-05-28T19:00:42.554338","optins":{"github_starred":false,"dialog_dismissed":true,"discord_clicked":false,"mcp_dialog_dismissed":true}}
In the POST request to v2/files, replace @FILE_NAME.EXTENSION with the uploaded file name and its extension.
You must include the ampersand (@) in the request to instruct curl to upload the contents of the file, not the string FILE_NAME.EXTENSION.
_10curl -X POST \_10 "$LANGFLOW_URL/api/v2/files" \_10 -H "accept: application/json" \_10 -H "Content-Type: multipart/form-data" \_10 -H "x-api-key: $LANGFLOW_API_KEY" \_10 -F "file=@FILE_NAME.EXTENSION"
The file is uploaded in the format USER_ID/FILE_ID.FILE_EXTENSION, and the API returns metadata about the uploaded file:
_10{_10 "id":"d44dc2e1-9ae9-4cf6-9114-8d34a6126c94",_10 "name":"engine_manual",_10 "path":"07e5b864-e367-4f52-b647-a48035ae7e5e/d44dc2e1-9ae9-4cf6-9114-8d34a6126c94.pdf",_10 "size":851160,_10 "provider":null_10}
_10curl -X POST \_10 "$LANGFLOW_URL/api/v2/files" \_10 -H "accept: application/json" \_10 -H "Content-Type: multipart/form-data" \_10 -H "x-api-key: $LANGFLOW_API_KEY" \_10 -F "file=@FILE_NAME.EXTENSION"
The file is uploaded in the format USER_ID/FILE_ID.FILE_EXTENSION, and the API returns metadata about the uploaded file:
_10{_10 "id":"d44dc2e1-9ae9-4cf6-9114-8d34a6126c94",_10 "name":"engine_manual",_10 "path":"07e5b864-e367-4f52-b647-a48035ae7e5e/d44dc2e1-9ae9-4cf6-9114-8d34a6126c94.pdf",_10 "size":851160,_10 "provider":null_10}
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.
diff --git a/api.html b/api.html index 9fbbd64ba2..bc9172b063 100644 --- a/api.html +++ b/api.html @@ -21,7 +21,7 @@ - + diff --git a/api/add-user.html b/api/add-user.html index 75f3929260..8a0fdf64c6 100644 --- a/api/add-user.html +++ b/api/add-user.html @@ -21,7 +21,7 @@ - + diff --git a/api/auto-login.html b/api/auto-login.html index 6533635ef9..fe45418616 100644 --- a/api/auto-login.html +++ b/api/auto-login.html @@ -21,7 +21,7 @@ - + diff --git a/api/build-flow.html b/api/build-flow.html index d0481ca9a1..c0da6249cc 100644 --- a/api/build-flow.html +++ b/api/build-flow.html @@ -21,7 +21,7 @@ - + diff --git a/api/build-public-tmp.html b/api/build-public-tmp.html index 261bd928ea..8919607dca 100644 --- a/api/build-public-tmp.html +++ b/api/build-public-tmp.html @@ -21,7 +21,7 @@ - + diff --git a/api/build-vertex-stream.html b/api/build-vertex-stream.html index 75b887f9b8..34e7272946 100644 --- a/api/build-vertex-stream.html +++ b/api/build-vertex-stream.html @@ -21,7 +21,7 @@ - + diff --git a/api/build-vertex.html b/api/build-vertex.html index 8872323550..288269222b 100644 --- a/api/build-vertex.html +++ b/api/build-vertex.html @@ -21,7 +21,7 @@ - + diff --git a/api/cancel-build.html b/api/cancel-build.html index 1868462e91..c7dc603580 100644 --- a/api/cancel-build.html +++ b/api/cancel-build.html @@ -21,7 +21,7 @@ - + diff --git a/api/check-if-store-has-api-key.html b/api/check-if-store-has-api-key.html index 8fb1250f8e..923df7459f 100644 --- a/api/check-if-store-has-api-key.html +++ b/api/check-if-store-has-api-key.html @@ -21,7 +21,7 @@ - + diff --git a/api/check-if-store-is-enabled.html b/api/check-if-store-is-enabled.html index 49634013ff..6eb5ed0860 100644 --- a/api/check-if-store-is-enabled.html +++ b/api/check-if-store-is-enabled.html @@ -21,7 +21,7 @@ - + diff --git a/api/create-api-key-route.html b/api/create-api-key-route.html index 239c9661ec..8ae85320ce 100644 --- a/api/create-api-key-route.html +++ b/api/create-api-key-route.html @@ -21,7 +21,7 @@ - + diff --git a/api/create-flow.html b/api/create-flow.html index 6cbdf64edf..da1627a2c2 100644 --- a/api/create-flow.html +++ b/api/create-flow.html @@ -21,7 +21,7 @@ - + diff --git a/api/create-flows.html b/api/create-flows.html index d996828b1e..85ab4ab935 100644 --- a/api/create-flows.html +++ b/api/create-flows.html @@ -21,7 +21,7 @@ - + diff --git a/api/create-folder-redirect.html b/api/create-folder-redirect.html index f38e3a0949..dab5d67ff8 100644 --- a/api/create-folder-redirect.html +++ b/api/create-folder-redirect.html @@ -21,7 +21,7 @@ - + diff --git a/api/create-project.html b/api/create-project.html index 72ca506cf8..1e7d9906f0 100644 --- a/api/create-project.html +++ b/api/create-project.html @@ -21,7 +21,7 @@ - + diff --git a/api/create-upload-file.html b/api/create-upload-file.html index 8b14c5d72f..e898a81dd4 100644 --- a/api/create-upload-file.html +++ b/api/create-upload-file.html @@ -21,7 +21,7 @@ - + diff --git a/api/create-variable.html b/api/create-variable.html index a3bfd2f924..128796cad5 100644 --- a/api/create-variable.html +++ b/api/create-variable.html @@ -21,7 +21,7 @@ - + diff --git a/api/custom-component-update.html b/api/custom-component-update.html index 5fde79b210..dc1ce91809 100644 --- a/api/custom-component-update.html +++ b/api/custom-component-update.html @@ -21,7 +21,7 @@ - + diff --git a/api/custom-component.html b/api/custom-component.html index b9e8b668d7..1fd7bdf6c7 100644 --- a/api/custom-component.html +++ b/api/custom-component.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-all-files-1.html b/api/delete-all-files-1.html index b636c6ec3a..5c68a416d5 100644 --- a/api/delete-all-files-1.html +++ b/api/delete-all-files-1.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-all-files.html b/api/delete-all-files.html index 2bc29a9a1b..55960dfc11 100644 --- a/api/delete-all-files.html +++ b/api/delete-all-files.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-api-key-route.html b/api/delete-api-key-route.html index 4afdafe758..b987dbc927 100644 --- a/api/delete-api-key-route.html +++ b/api/delete-api-key-route.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-file-1.html b/api/delete-file-1.html index fd8e65cc95..6b473f25c8 100644 --- a/api/delete-file-1.html +++ b/api/delete-file-1.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-file.html b/api/delete-file.html index 2c1e8d3f5e..036278f272 100644 --- a/api/delete-file.html +++ b/api/delete-file.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-files-batch.html b/api/delete-files-batch.html index 0a281501b5..48a0946f99 100644 --- a/api/delete-files-batch.html +++ b/api/delete-files-batch.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-flow.html b/api/delete-flow.html index ac80daa228..e28e383d1d 100644 --- a/api/delete-flow.html +++ b/api/delete-flow.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-folder-redirect.html b/api/delete-folder-redirect.html index dba58116eb..ee51be8601 100644 --- a/api/delete-folder-redirect.html +++ b/api/delete-folder-redirect.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-messages-session.html b/api/delete-messages-session.html index 7217cbc1df..9fb38e39c9 100644 --- a/api/delete-messages-session.html +++ b/api/delete-messages-session.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-messages.html b/api/delete-messages.html index 04870c2b65..9cdd95cebe 100644 --- a/api/delete-messages.html +++ b/api/delete-messages.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-multiple-flows.html b/api/delete-multiple-flows.html index a1962817d6..cefbeb381e 100644 --- a/api/delete-multiple-flows.html +++ b/api/delete-multiple-flows.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-project.html b/api/delete-project.html index 7349f6bd9f..e958035f30 100644 --- a/api/delete-project.html +++ b/api/delete-project.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-user.html b/api/delete-user.html index ffad3762ad..f978d16e3b 100644 --- a/api/delete-user.html +++ b/api/delete-user.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-variable.html b/api/delete-variable.html index c4337fd54e..b88a045bd1 100644 --- a/api/delete-variable.html +++ b/api/delete-variable.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-vertex-builds.html b/api/delete-vertex-builds.html index 0a8727c7e1..f4a9131b26 100644 --- a/api/delete-vertex-builds.html +++ b/api/delete-vertex-builds.html @@ -21,7 +21,7 @@ - + diff --git a/api/download-component.html b/api/download-component.html index 76828fe8f3..241d6da7ee 100644 --- a/api/download-component.html +++ b/api/download-component.html @@ -21,7 +21,7 @@ - + diff --git a/api/download-file-1.html b/api/download-file-1.html index a43ac4b3a3..93b55f20b6 100644 --- a/api/download-file-1.html +++ b/api/download-file-1.html @@ -21,7 +21,7 @@ - + diff --git a/api/download-file-2.html b/api/download-file-2.html index f272420b36..49a25b7ed5 100644 --- a/api/download-file-2.html +++ b/api/download-file-2.html @@ -21,7 +21,7 @@ - + diff --git a/api/download-file-redirect.html b/api/download-file-redirect.html index 9d2230da1d..523411a055 100644 --- a/api/download-file-redirect.html +++ b/api/download-file-redirect.html @@ -21,7 +21,7 @@ - + diff --git a/api/download-file.html b/api/download-file.html index 66615dccd1..1081949368 100644 --- a/api/download-file.html +++ b/api/download-file.html @@ -21,7 +21,7 @@ - + diff --git a/api/download-files-batch.html b/api/download-files-batch.html index 4f7e7fc7da..ed29519bb1 100644 --- a/api/download-files-batch.html +++ b/api/download-files-batch.html @@ -21,7 +21,7 @@ - + diff --git a/api/download-image.html b/api/download-image.html index 01356b10e0..1e45af9d0f 100644 --- a/api/download-image.html +++ b/api/download-image.html @@ -21,7 +21,7 @@ - + diff --git a/api/download-multiple-file.html b/api/download-multiple-file.html index 9ba0e40216..1b7af90fc4 100644 --- a/api/download-multiple-file.html +++ b/api/download-multiple-file.html @@ -21,7 +21,7 @@ - + diff --git a/api/download-profile-picture.html b/api/download-profile-picture.html index a4afd58a71..68bd613aa4 100644 --- a/api/download-profile-picture.html +++ b/api/download-profile-picture.html @@ -21,7 +21,7 @@ - + diff --git a/api/edit-file-name.html b/api/edit-file-name.html index 51df5136b2..b1c621081a 100644 --- a/api/edit-file-name.html +++ b/api/edit-file-name.html @@ -21,7 +21,7 @@ - + diff --git a/api/experimental-run-flow.html b/api/experimental-run-flow.html index 79c8fb7994..6981ecea4c 100644 --- a/api/experimental-run-flow.html +++ b/api/experimental-run-flow.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-all.html b/api/get-all.html index 090b8337ef..40881c9543 100644 --- a/api/get-all.html +++ b/api/get-all.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-api-keys-route.html b/api/get-api-keys-route.html index 9cd47878b4..9d5736e96b 100644 --- a/api/get-api-keys-route.html +++ b/api/get-api-keys-route.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-build-events.html b/api/get-build-events.html index b5a1dda592..cdc675a814 100644 --- a/api/get-build-events.html +++ b/api/get-build-events.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-components.html b/api/get-components.html index be54b15c87..068b9ff201 100644 --- a/api/get-components.html +++ b/api/get-components.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-config.html b/api/get-config.html index d21044444c..5de05b5a28 100644 --- a/api/get-config.html +++ b/api/get-config.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-elevenlabs-voice-ids.html b/api/get-elevenlabs-voice-ids.html index 3aacabf195..c4c5c886fb 100644 --- a/api/get-elevenlabs-voice-ids.html +++ b/api/get-elevenlabs-voice-ids.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-list-of-components-liked-by-user.html b/api/get-list-of-components-liked-by-user.html index f52402a15a..1dfc706900 100644 --- a/api/get-list-of-components-liked-by-user.html +++ b/api/get-list-of-components-liked-by-user.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-messages.html b/api/get-messages.html index e633e3818c..5b549f32a3 100644 --- a/api/get-messages.html +++ b/api/get-messages.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-starter-projects.html b/api/get-starter-projects.html index 7b200f870f..96b0e9fd15 100644 --- a/api/get-starter-projects.html +++ b/api/get-starter-projects.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-tags.html b/api/get-tags.html index 8c893a84cf..9c79df8a76 100644 --- a/api/get-tags.html +++ b/api/get-tags.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-task-status.html b/api/get-task-status.html index 2eac5ee3f2..cc9054303e 100644 --- a/api/get-task-status.html +++ b/api/get-task-status.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-transactions.html b/api/get-transactions.html index 036c71d216..449ee07750 100644 --- a/api/get-transactions.html +++ b/api/get-transactions.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-version.html b/api/get-version.html index 4064553d34..21c4908eb7 100644 --- a/api/get-version.html +++ b/api/get-version.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-vertex-builds.html b/api/get-vertex-builds.html index c3c6d8bdd4..077b41689a 100644 --- a/api/get-vertex-builds.html +++ b/api/get-vertex-builds.html @@ -21,7 +21,7 @@ - + diff --git a/api/handle-messages-1.html b/api/handle-messages-1.html index 33d993bba0..80de74217b 100644 --- a/api/handle-messages-1.html +++ b/api/handle-messages-1.html @@ -21,7 +21,7 @@ - + diff --git a/api/handle-messages.html b/api/handle-messages.html index 5f4efdb2ca..e5af9f03f6 100644 --- a/api/handle-messages.html +++ b/api/handle-messages.html @@ -21,7 +21,7 @@ - + diff --git a/api/handle-project-messages-with-slash.html b/api/handle-project-messages-with-slash.html index ad1f5281d8..1e4bdc4888 100644 --- a/api/handle-project-messages-with-slash.html +++ b/api/handle-project-messages-with-slash.html @@ -21,7 +21,7 @@ - + diff --git a/api/handle-project-messages.html b/api/handle-project-messages.html index d48b8b137b..260273880f 100644 --- a/api/handle-project-messages.html +++ b/api/handle-project-messages.html @@ -21,7 +21,7 @@ - + diff --git a/api/handle-project-sse.html b/api/handle-project-sse.html index de7c0274a1..d12f1ff3a9 100644 --- a/api/handle-project-sse.html +++ b/api/handle-project-sse.html @@ -21,7 +21,7 @@ - + diff --git a/api/handle-sse-1.html b/api/handle-sse-1.html index 735c373d89..0b6a2dbc05 100644 --- a/api/handle-sse-1.html +++ b/api/handle-sse-1.html @@ -21,7 +21,7 @@ - + diff --git a/api/handle-sse.html b/api/handle-sse.html index 277c1de3fa..e44b866a58 100644 --- a/api/handle-sse.html +++ b/api/handle-sse.html @@ -21,7 +21,7 @@ - + diff --git a/api/health-check.html b/api/health-check.html index e1f3fcbf73..8a10432a54 100644 --- a/api/health-check.html +++ b/api/health-check.html @@ -21,7 +21,7 @@ - + diff --git a/api/health.html b/api/health.html index 593faf719f..0993acd53b 100644 --- a/api/health.html +++ b/api/health.html @@ -21,7 +21,7 @@ - + diff --git a/api/like-component.html b/api/like-component.html index c1e548486a..1933532ffa 100644 --- a/api/like-component.html +++ b/api/like-component.html @@ -21,7 +21,7 @@ - + diff --git a/api/list-files-1.html b/api/list-files-1.html index c7a196d58f..4060fc58a4 100644 --- a/api/list-files-1.html +++ b/api/list-files-1.html @@ -21,7 +21,7 @@ - + diff --git a/api/list-files-2.html b/api/list-files-2.html index 4fc7484022..b22461ef1f 100644 --- a/api/list-files-2.html +++ b/api/list-files-2.html @@ -21,7 +21,7 @@ - + diff --git a/api/list-files.html b/api/list-files.html index 47c3f173b6..1d8273013e 100644 --- a/api/list-files.html +++ b/api/list-files.html @@ -21,7 +21,7 @@ - + diff --git a/api/list-profile-pictures.html b/api/list-profile-pictures.html index 8f0bd97b63..225ce5482e 100644 --- a/api/list-profile-pictures.html +++ b/api/list-profile-pictures.html @@ -21,7 +21,7 @@ - + diff --git a/api/list-project-tools.html b/api/list-project-tools.html index 9ed7af093d..8a625b4eca 100644 --- a/api/list-project-tools.html +++ b/api/list-project-tools.html @@ -21,7 +21,7 @@ - + diff --git a/api/login-to-get-access-token.html b/api/login-to-get-access-token.html index da3b0c9ab3..4e16067d0b 100644 --- a/api/login-to-get-access-token.html +++ b/api/login-to-get-access-token.html @@ -21,7 +21,7 @@ - + diff --git a/api/logout.html b/api/logout.html index d1501edc97..bf71847536 100644 --- a/api/logout.html +++ b/api/logout.html @@ -21,7 +21,7 @@ - + diff --git a/api/logs.html b/api/logs.html index f90d007119..e9143a91e8 100644 --- a/api/logs.html +++ b/api/logs.html @@ -21,7 +21,7 @@ - + diff --git a/api/patch-user.html b/api/patch-user.html index f4cd4d3358..cfe5e8e85e 100644 --- a/api/patch-user.html +++ b/api/patch-user.html @@ -21,7 +21,7 @@ - + diff --git a/api/post-validate-code.html b/api/post-validate-code.html index 02781b6f3b..f300452f87 100644 --- a/api/post-validate-code.html +++ b/api/post-validate-code.html @@ -21,7 +21,7 @@ - + diff --git a/api/post-validate-prompt.html b/api/post-validate-prompt.html index a70451411b..86386fa9a8 100644 --- a/api/post-validate-prompt.html +++ b/api/post-validate-prompt.html @@ -21,7 +21,7 @@ - + diff --git a/api/process-1.html b/api/process-1.html index f4a01ae5f2..95810e4f25 100644 --- a/api/process-1.html +++ b/api/process-1.html @@ -21,7 +21,7 @@ - + diff --git a/api/process.html b/api/process.html index c4f547204a..c42beaf999 100644 --- a/api/process.html +++ b/api/process.html @@ -21,7 +21,7 @@ - + diff --git a/api/read-all-users.html b/api/read-all-users.html index ae2cd1083f..a5b73cd2f7 100644 --- a/api/read-all-users.html +++ b/api/read-all-users.html @@ -21,7 +21,7 @@ - + diff --git a/api/read-basic-examples.html b/api/read-basic-examples.html index 3b60a6bb89..262c3fe6b4 100644 --- a/api/read-basic-examples.html +++ b/api/read-basic-examples.html @@ -21,7 +21,7 @@ - + diff --git a/api/read-current-user.html b/api/read-current-user.html index d258580385..16ce942168 100644 --- a/api/read-current-user.html +++ b/api/read-current-user.html @@ -21,7 +21,7 @@ - + diff --git a/api/read-flow.html b/api/read-flow.html index 6a99576be0..b54cbbdb5a 100644 --- a/api/read-flow.html +++ b/api/read-flow.html @@ -21,7 +21,7 @@ - + diff --git a/api/read-flows.html b/api/read-flows.html index 63eba4d640..a2b3cf0df9 100644 --- a/api/read-flows.html +++ b/api/read-flows.html @@ -21,7 +21,7 @@ - + diff --git a/api/read-folder-redirect.html b/api/read-folder-redirect.html index c0da371f68..377836cc16 100644 --- a/api/read-folder-redirect.html +++ b/api/read-folder-redirect.html @@ -21,7 +21,7 @@ - + diff --git a/api/read-folders-redirect.html b/api/read-folders-redirect.html index 674b3c062f..dce5c35475 100644 --- a/api/read-folders-redirect.html +++ b/api/read-folders-redirect.html @@ -21,7 +21,7 @@ - + diff --git a/api/read-project.html b/api/read-project.html index 106c468d6e..266463101b 100644 --- a/api/read-project.html +++ b/api/read-project.html @@ -21,7 +21,7 @@ - + diff --git a/api/read-projects.html b/api/read-projects.html index 255c514db6..5642222ebb 100644 --- a/api/read-projects.html +++ b/api/read-projects.html @@ -21,7 +21,7 @@ - + diff --git a/api/read-public-flow.html b/api/read-public-flow.html index 921db69714..bb9131caea 100644 --- a/api/read-public-flow.html +++ b/api/read-public-flow.html @@ -21,7 +21,7 @@ - + diff --git a/api/read-variables.html b/api/read-variables.html index e2e7ddba17..05e713d82c 100644 --- a/api/read-variables.html +++ b/api/read-variables.html @@ -21,7 +21,7 @@ - + diff --git a/api/refresh-token.html b/api/refresh-token.html index 8998c1caf3..7224b595d6 100644 --- a/api/refresh-token.html +++ b/api/refresh-token.html @@ -21,7 +21,7 @@ - + diff --git a/api/reset-password.html b/api/reset-password.html index 5cd98ac976..635bc4ef8d 100644 --- a/api/reset-password.html +++ b/api/reset-password.html @@ -21,7 +21,7 @@ - + diff --git a/api/retrieve-vertices-order.html b/api/retrieve-vertices-order.html index 66744e098e..a5199b3bf8 100644 --- a/api/retrieve-vertices-order.html +++ b/api/retrieve-vertices-order.html @@ -21,7 +21,7 @@ - + diff --git a/api/save-store-api-key.html b/api/save-store-api-key.html index 94fdacf4ea..4d23778090 100644 --- a/api/save-store-api-key.html +++ b/api/save-store-api-key.html @@ -21,7 +21,7 @@ - + diff --git a/api/share-component.html b/api/share-component.html index 3da54a8455..dbb7d4c69f 100644 --- a/api/share-component.html +++ b/api/share-component.html @@ -21,7 +21,7 @@ - + diff --git a/api/simplified-run-flow.html b/api/simplified-run-flow.html index c6fab770dc..3bb2c62d03 100644 --- a/api/simplified-run-flow.html +++ b/api/simplified-run-flow.html @@ -21,7 +21,7 @@ - + diff --git a/api/stream-logs.html b/api/stream-logs.html index 475b24ed6d..21e687e11b 100644 --- a/api/stream-logs.html +++ b/api/stream-logs.html @@ -21,7 +21,7 @@ - + diff --git a/api/update-flow.html b/api/update-flow.html index df6d81511e..c13115592d 100644 --- a/api/update-flow.html +++ b/api/update-flow.html @@ -21,7 +21,7 @@ - + diff --git a/api/update-folder-redirect.html b/api/update-folder-redirect.html index ae735fa27b..315ea00973 100644 --- a/api/update-folder-redirect.html +++ b/api/update-folder-redirect.html @@ -21,7 +21,7 @@ - + diff --git a/api/update-message.html b/api/update-message.html index 8563379f1a..4aee3f10ba 100644 --- a/api/update-message.html +++ b/api/update-message.html @@ -21,7 +21,7 @@ - + diff --git a/api/update-project-mcp-settings.html b/api/update-project-mcp-settings.html index 71129bc76b..40bd4ab6c0 100644 --- a/api/update-project-mcp-settings.html +++ b/api/update-project-mcp-settings.html @@ -21,7 +21,7 @@ - + diff --git a/api/update-project.html b/api/update-project.html index 0040f4e4c5..6eae6ad6d6 100644 --- a/api/update-project.html +++ b/api/update-project.html @@ -21,7 +21,7 @@ - + diff --git a/api/update-session-id.html b/api/update-session-id.html index f84c2dc052..9462bbd7ea 100644 --- a/api/update-session-id.html +++ b/api/update-session-id.html @@ -21,7 +21,7 @@ - + diff --git a/api/update-shared-component.html b/api/update-shared-component.html index dad53c576f..cb82ccf33e 100644 --- a/api/update-shared-component.html +++ b/api/update-shared-component.html @@ -21,7 +21,7 @@ - + diff --git a/api/update-variable.html b/api/update-variable.html index 9fc5370ff7..15ee8ee46e 100644 --- a/api/update-variable.html +++ b/api/update-variable.html @@ -21,7 +21,7 @@ - + diff --git a/api/upload-file-1.html b/api/upload-file-1.html index 600909e0cf..0fbf837713 100644 --- a/api/upload-file-1.html +++ b/api/upload-file-1.html @@ -21,7 +21,7 @@ - + diff --git a/api/upload-file-2.html b/api/upload-file-2.html index 464f9e1c97..13fcd632b7 100644 --- a/api/upload-file-2.html +++ b/api/upload-file-2.html @@ -21,7 +21,7 @@ - + diff --git a/api/upload-file-redirect.html b/api/upload-file-redirect.html index c14450ac98..124afe1217 100644 --- a/api/upload-file-redirect.html +++ b/api/upload-file-redirect.html @@ -21,7 +21,7 @@ - + diff --git a/api/upload-file.html b/api/upload-file.html index 5bc8f5f040..40fb562278 100644 --- a/api/upload-file.html +++ b/api/upload-file.html @@ -21,7 +21,7 @@ - + diff --git a/api/upload-user-file-1.html b/api/upload-user-file-1.html index f358734fbf..1bbeedfb74 100644 --- a/api/upload-user-file-1.html +++ b/api/upload-user-file-1.html @@ -21,7 +21,7 @@ - + diff --git a/api/upload-user-file.html b/api/upload-user-file.html index 3054a52206..486d060f58 100644 --- a/api/upload-user-file.html +++ b/api/upload-user-file.html @@ -21,7 +21,7 @@ - + diff --git a/api/webhook-run-flow.html b/api/webhook-run-flow.html index b716c9398f..b66eb6f70c 100644 --- a/api/webhook-run-flow.html +++ b/api/webhook-run-flow.html @@ -21,7 +21,7 @@ - + diff --git a/assets/js/14f42f9e.4b286c01.js b/assets/js/14f42f9e.4b286c01.js new file mode 100644 index 0000000000..a058484fac --- /dev/null +++ b/assets/js/14f42f9e.4b286c01.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[444],{41671:(o,t,e)=>{e.r(t),e.d(t,{CH:()=>D,assets:()=>y,chCodeConfig:()=>d,contentTitle:()=>i,default:()=>C,frontMatter:()=>a,metadata:()=>n,toc:()=>F});const n=JSON.parse('{"id":"API-Reference/api-reference-api-examples","title":"API examples","description":"This page provides examples and practices for managing Langflow using the Langflow API.","source":"@site/docs/API-Reference/api-reference-api-examples.md","sourceDirName":"API-Reference","slug":"/api-reference-api-examples","permalink":"/api-reference-api-examples","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"API examples","slug":"/api-reference-api-examples"},"sidebar":"docs","previous":{"title":"Render","permalink":"/deployment-render"},"next":{"title":"Apify","permalink":"/integrations-apify"}}');var s=e(74848),l=e(28453),r=e(24754),c=e(65537),p=e(79329);const a={title:"API examples",slug:"/api-reference-api-examples"},i=void 0,y={},D={annotations:r.hk,Code:r.Cy},d={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},F=[{value:"Export values",id:"export-values",level:2},{value:"Base",id:"base",level:2},{value:"Get all components",id:"get-all-components",level:3},{value:"Run flow",id:"run-flow",level:3},{value:"Run endpoint headers and parameters",id:"run-endpoint-headers-and-parameters",level:4},{value:"Webhook run flow",id:"webhook-run-flow",level:3},{value:"Process",id:"process",level:3},{value:"Predict",id:"predict",level:3},{value:"Get task status",id:"get-task-status",level:3},{value:"Create upload file (Deprecated)",id:"create-upload-file-deprecated",level:3},{value:"Get version",id:"get-version",level:3},{value:"Get config",id:"get-config",level:3},{value:"Build",id:"build",level:2},{value:"Build flow",id:"build-flow",level:3},{value:"Build endpoint headers and parameters",id:"build-endpoint-headers-and-parameters",level:3},{value:"Configure the build endpoint",id:"configure-the-build-endpoint",level:3},{value:"Files",id:"files",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:"Flows",id:"flows",level:2},{value:"Create flow",id:"create-flow",level:3},{value:"Read flows",id:"read-flows",level:3},{value:"Read flow",id:"read-flow",level:3},{value:"Update flow",id:"update-flow",level:3},{value:"Delete flow",id:"delete-flow",level:3},{value:"Create flows",id:"create-flows",level:3},{value:"Upload flows",id:"upload-flows",level:3},{value:"Download all flows",id:"download-all-flows",level:3},{value:"Read basic examples",id:"read-basic-examples",level:3},{value:"Projects",id:"projects",level:2},{value:"Read projects",id:"read-projects",level:3},{value:"Create project",id:"create-project",level:3},{value:"Read project",id:"read-project",level:3},{value:"Update project",id:"update-project",level:3},{value:"Delete project",id:"delete-project",level:3},{value:"Download project",id:"download-project",level:3},{value:"Upload project",id:"upload-project",level:3},{value:"Logs",id:"logs",level:2},{value:"Stream logs",id:"stream-logs",level:3},{value:"Retrieve logs with optional parameters",id:"retrieve-logs-with-optional-parameters",level:3},{value:"Monitor",id:"monitor",level:2},{value:"Get Vertex builds",id:"get-vertex-builds",level:3},{value:"Delete Vertex builds",id:"delete-vertex-builds",level:3},{value:"Get messages",id:"get-messages",level:3},{value:"Delete messages",id:"delete-messages",level:3},{value:"Update message",id:"update-message",level:3},{value:"Update session ID",id:"update-session-id",level:3},{value:"Delete messages by session",id:"delete-messages-by-session",level:3},{value:"Get transactions",id:"get-transactions",level:3}];function h(o){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,l.R)(),...o.components};return D||u("CH",!1),D.Code||u("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.p,{children:"This page provides examples and practices for managing Langflow using the Langflow API."}),"\n",(0,s.jsxs)(t.p,{children:["The Langflow API's OpenAPI spec can be viewed and tested at your Langflow deployment's ",(0,s.jsx)(t.code,{children:"docs"})," endpoint.\nFor example, ",(0,s.jsx)(t.code,{children:"http://127.0.0.1:7860/docs"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"export-values",children:"Export values"}),"\n",(0,s.jsx)(t.p,{children:"You might find it helpful to set the following environment variables in your terminal."}),"\n",(0,s.jsx)(t.p,{children:"The examples in this guide use environment variables for these values."}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["Export your Langflow URL in your terminal.\nLangflow starts by default at ",(0,s.jsx)(t.code,{children:"http://127.0.0.1:7860"}),"."]}),"\n"]}),"\n",(0,s.jsx)(D.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"export",props:{style:{color:"#FF7B72"}}},{content:" LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"http://127.0.0.1:7860"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["Export the ",(0,s.jsx)(t.code,{children:"flow-id"})," in your terminal.\nThe ",(0,s.jsx)(t.code,{children:"flow-id"})," is found in the ",(0,s.jsx)(t.a,{href:"/concepts-publish",children:"Publish pane"})," or in the flow's URL."]}),"\n"]}),"\n",(0,s.jsx)(D.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'export FLOW_ID="359cd752-07ea-46f2-9d3b-a4407ef618da"',props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["Export the ",(0,s.jsx)(t.code,{children:"project-id"})," in your terminal.\nTo find your project ID, call the Langflow ",(0,s.jsx)(t.a,{href:"#read-projects",children:"/api/v1/projects/"})," endpoint for a list of projects."]}),"\n"]}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(p.A,{value:"curl",label:"curl",default:!0,children:(0,s.jsx)(D.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/projects/" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]})}),(0,s.jsx)(p.A,{value:"result",label:"Result",children:(0,s.jsx)(D.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:' "name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"My Projects"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "description"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Manage your own projects. Download and upload projects."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"1415de42-8f01-4f36-bf34-539f23e47466"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "parent_id"',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.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["Export the ",(0,s.jsx)(t.code,{children:"project-id"})," as an environment variable."]}),"\n"]}),"\n",(0,s.jsx)(D.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"export",props:{style:{color:"#FF7B72"}}},{content:" project_ID",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"1415de42-8f01-4f36-bf34-539f23e47466"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Export the Langflow API key as an environment variable.\nTo create a Langflow API key, run the following command in the Langflow CLI."}),"\n"]}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(p.A,{value:"curl",label:"curl",default:!0,children:(0,s.jsx)(D.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"langflow api-key",props:{}}]}],lang:"text"},annotations:[]}]})}),(0,s.jsx)(p.A,{value:"result",label:"Result",children:(0,s.jsx)(D.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"API Key Created Successfully:",props:{}}]},{tokens:[{content:"sk-...",props:{}}]}],lang:"text"},annotations:[]}]})})]}),"\n",(0,s.jsx)(t.p,{children:"Export the generated API key as an environment variable."}),"\n",(0,s.jsx)(D.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'export LANGFLOW_API_KEY="sk-..."',props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsx)(t.h2,{id:"base",children:"Base"}),"\n",(0,s.jsx)(t.p,{children:"Use the base Langflow API to run your flow and retrieve configuration information."}),"\n",(0,s.jsx)(t.h3,{id:"get-all-components",children:"Get all components"}),"\n",(0,s.jsx)(t.p,{children:"This operation returns a dictionary of all Langflow components."}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(p.A,{value:"curl",label:"curl",default:!0,children:(0,s.jsx)(D.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/all" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]})}),(0,s.jsx)(p.A,{value:"result",label:"Result",children:(0,s.jsx)(D.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"A dictionary of all Langflow components.",props:{}}]}],lang:"text"},annotations:[]}]})})]}),"\n",(0,s.jsx)(t.h3,{id:"run-flow",children:"Run flow"}),"\n",(0,s.jsx)(t.p,{children:"Execute a specified flow by ID or name.\nThe flow is executed as a batch, but LLM responses can be streamed."}),"\n",(0,s.jsxs)(t.p,{children:["This example runs a ",(0,s.jsx)(t.a,{href:"/starter-projects-basic-prompting",children:"Basic Prompting"})," flow with a given ",(0,s.jsx)(t.code,{children:"flow_id"})," and passes a JSON object as the input value."]}),"\n",(0,s.jsx)(t.p,{children:"The parameters are passed in the request body. In this example, the values are the default values."}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(p.A,{value:"curl",label:"curl",default:!0,children:(0,s.jsx)(D.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/",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: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_value": "Tell me about something interesting!",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "session_id": "chat-123",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "output_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "output_component": "",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "tweaks": null',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]})}),(0,s.jsx)(p.A,{value:"result",label:"Result",children:(0,s.jsx)(D.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{}}]},{tokens:[{content:' "session_id": "chat-123",',props:{}}]},{tokens:[{content:' "outputs": [{',props:{}}]},{tokens:[{content:' "inputs": {',props:{}}]},{tokens:[{content:' "input_value": "Tell me about something interesting!"',props:{}}]},{tokens:[{content:" },",props:{}}]},{tokens:[{content:' "outputs": [{',props:{}}]},{tokens:[{content:' "results": {',props:{}}]},{tokens:[{content:' "message": {',props:{}}]},{tokens:[{content:' "text": "Sure! Have you ever heard of the phenomenon known as \\"bioluminescence\\"? It\'s a fascinating natural occurrence where living organisms produce and emit light. This ability is found in various species, including certain types of jellyfish, fireflies, and deep-sea creatures like anglerfish.\\n\\nBioluminescence occurs through a chemical reaction in which a light-emitting molecule called luciferin reacts with oxygen, catalyzed by an enzyme called luciferase. The result is a beautiful glow that can serve various purposes, such as attracting mates, deterring predators, or luring prey.\\n\\nOne of the most stunning displays of bioluminescence can be seen in the ocean, where certain plankton emit light when disturbed, creating a mesmerizing blue glow in the water. This phenomenon is often referred to as \\"sea sparkle\\" and can be seen in coastal areas around the world.\\n\\nBioluminescence not only captivates our imagination but also has practical applications in science and medicine, including the development of biosensors and imaging techniques. It\'s a remarkable example of nature\'s creativity and complexity!",',props:{}}]},{tokens:[{content:' "sender": "Machine",',props:{}}]},{tokens:[{content:' "sender_name": "AI",',props:{}}]},{tokens:[{content:' "session_id": "chat-123",',props:{}}]},{tokens:[{content:' "timestamp": "2025-03-03T17:17:37+00:00",',props:{}}]},{tokens:[{content:' "flow_id": "d2bbd92b-187e-4c84-b2d4-5df365704201",',props:{}}]},{tokens:[{content:' "properties": {',props:{}}]},{tokens:[{content:' "source": {',props:{}}]},{tokens:[{content:' "id": "OpenAIModel-d1wOZ",',props:{}}]},{tokens:[{content:' "display_name": "OpenAI",',props:{}}]},{tokens:[{content:' "source": "gpt-4o-mini"',props:{}}]},{tokens:[{content:" },",props:{}}]},{tokens:[{content:' "icon": "OpenAI"',props:{}}]},{tokens:[{content:" },",props:{}}]},{tokens:[{content:' "component_id": "ChatOutput-ylMzN"',props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:" }]",props:{}}]},{tokens:[{content:" }]",props:{}}]},{tokens:[{content:"}",props:{}}]}],lang:"text"},annotations:[]}]})})]}),"\n",(0,s.jsxs)(t.p,{children:["To stream LLM token responses, append the ",(0,s.jsx)(t.code,{children:"?stream=true"})," query parameter to the request. LLM chat responses are streamed back as ",(0,s.jsx)(t.code,{children:"token"})," events until the ",(0,s.jsx)(t.code,{children:"end"})," event closes the connection."]}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(p.A,{value:"curl",label:"curl",default:!0,children:(0,s.jsx)(D.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/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'?stream=true" ',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:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "message": "Tell me something interesting!",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "session_id": "chat-123"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]})}),(0,s.jsx)(p.A,{value:"result",label:"Result",children:(0,s.jsx)(D.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'{"event": "add_message", "data": {"timestamp": "2025-03-03T17:20:18", "sender": "User", "sender_name": "User", "session_id": "chat-123", "text": "Tell me about something interesting!", "files": [], "error": false, "edit": false, "properties": {"text_color": "", "background_color": "", "edited": false, "source": {"id": null, "display_name": null, "source": null}, "icon": "", "allow_markdown": false, "positive_feedback": null, "state": "complete", "targets": []}, "category": "message", "content_blocks": [], "id": "0103a21b-ebf7-4c02-9d72-017fb297f812", "flow_id": "d2bbd92b-187e-4c84-b2d4-5df365704201"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "add_message", "data": {"timestamp": "2025-03-03T17:20:18", "sender": "Machine", "sender_name": "AI", "session_id": "chat-123", "text": "", "files": [], "error": false, "edit": false, "properties": {"text_color": "", "background_color": "", "edited": false, "source": {"id": "OpenAIModel-d1wOZ", "display_name": "OpenAI", "source": "gpt-4o-mini"}, "icon": "OpenAI", "allow_markdown": false, "positive_feedback": null, "state": "complete", "targets": []}, "category": "message", "content_blocks": [], "id": "27b66789-e673-4c65-9e81-021752925161", "flow_id": "d2bbd92b-187e-4c84-b2d4-5df365704201"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "token", "data": {"chunk": " Have", "id": "27b66789-e673-4c65-9e81-021752925161", "timestamp": "2025-03-03 17:20:18 UTC"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "token", "data": {"chunk": " you", "id": "27b66789-e673-4c65-9e81-021752925161", "timestamp": "2025-03-03 17:20:18 UTC"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "token", "data": {"chunk": " ever", "id": "27b66789-e673-4c65-9e81-021752925161", "timestamp": "2025-03-03 17:20:18 UTC"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "token", "data": {"chunk": " heard", "id": "27b66789-e673-4c65-9e81-021752925161", "timestamp": "2025-03-03 17:20:18 UTC"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "token", "data": {"chunk": " of", "id": "27b66789-e673-4c65-9e81-021752925161", "timestamp": "2025-03-03 17:20:18 UTC"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "token", "data": {"chunk": " the", "id": "27b66789-e673-4c65-9e81-021752925161", "timestamp": "2025-03-03 17:20:18 UTC"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "token", "data": {"chunk": " phenomenon", "id": "27b66789-e673-4c65-9e81-021752925161", "timestamp": "2025-03-03 17:20:18 UTC"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "end", "data": {"result": {"session_id": "chat-123", "message": "Sure! Have you ever heard of the phenomenon known as \\"bioluminescence\\"?..."}}}',props:{}}]}],lang:"text"},annotations:[]}]})})]}),"\n",(0,s.jsxs)(t.p,{children:["This result is abbreviated, but illustrates where the ",(0,s.jsx)(t.code,{children:"end"})," event completes the LLM's token streaming response."]}),"\n",(0,s.jsx)(t.h4,{id:"run-endpoint-headers-and-parameters",children:"Run endpoint headers and parameters"}),"\n",(0,s.jsxs)(t.p,{children:["Parameters can be passed to the ",(0,s.jsx)(t.code,{children:"/run"})," endpoint in three ways:"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["URL path: ",(0,s.jsx)(t.code,{children:"flow_id"})," as part of the endpoint path"]}),"\n",(0,s.jsxs)(t.li,{children:["Query string: ",(0,s.jsx)(t.code,{children:"stream"})," parameter in the URL"]}),"\n",(0,s.jsx)(t.li,{children:"Request body: JSON object containing the remaining parameters"}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Headers"})}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Header"}),(0,s.jsx)(t.th,{children:"Info"}),(0,s.jsx)(t.th,{children:"Example"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Content-Type"}),(0,s.jsx)(t.td,{children:"Required. Specifies the JSON format."}),(0,s.jsx)(t.td,{children:'"application/json"'})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"accept"}),(0,s.jsx)(t.td,{children:"Required. Specifies the response format."}),(0,s.jsx)(t.td,{children:'"application/json"'})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"x-api-key"}),(0,s.jsx)(t.td,{children:"Optional. Required only if authentication is enabled."}),(0,s.jsx)(t.td,{children:'"sk-..."'})]})]})]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Parameter"}),(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Info"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"flow_id"}),(0,s.jsx)(t.td,{children:"UUID/string"}),(0,s.jsxs)(t.td,{children:["Required. Part of URL: ",(0,s.jsx)(t.code,{children:"/run/{flow_id}"})]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"stream"}),(0,s.jsx)(t.td,{children:"boolean"}),(0,s.jsxs)(t.td,{children:["Optional. Query parameter: ",(0,s.jsx)(t.code,{children:"/run/{flow_id}?stream=true"})]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"input_value"}),(0,s.jsx)(t.td,{children:"string"}),(0,s.jsxs)(t.td,{children:["Optional. JSON body field. Main input text/prompt. Default: ",(0,s.jsx)(t.code,{children:"null"})]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"input_type"}),(0,s.jsx)(t.td,{children:"string"}),(0,s.jsxs)(t.td,{children:['Optional. JSON body field. Input type ("chat" or "text"). Default: ',(0,s.jsx)(t.code,{children:'"chat"'})]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"output_type"}),(0,s.jsx)(t.td,{children:"string"}),(0,s.jsxs)(t.td,{children:['Optional. JSON body field. Output type ("chat", "any", "debug"). Default: ',(0,s.jsx)(t.code,{children:'"chat"'})]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"output_component"}),(0,s.jsx)(t.td,{children:"string"}),(0,s.jsxs)(t.td,{children:["Optional. JSON body field. Target component for output. Default: ",(0,s.jsx)(t.code,{children:'""'})]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"tweaks"}),(0,s.jsx)(t.td,{children:"object"}),(0,s.jsxs)(t.td,{children:["Optional. JSON body field. Component adjustments. Default: ",(0,s.jsx)(t.code,{children:"null"})]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"session_id"}),(0,s.jsx)(t.td,{children:"string"}),(0,s.jsxs)(t.td,{children:["Optional. JSON body field. Conversation context ID. Default: ",(0,s.jsx)(t.code,{children:"null"})]})]})]})]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Example request"})}),"\n",(0,s.jsx)(D.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:' "http://',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/run/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'?stream=true" ',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:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: sk-..." ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_value": "Tell me a story",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "output_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "output_component": "chat_output",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "session_id": "chat-123",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "tweaks": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "component_id": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "parameter_name": "value"',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)(t.h3,{id:"webhook-run-flow",children:"Webhook run flow"}),"\n",(0,s.jsx)(t.p,{children:"The webhook endpoint triggers flow execution with an HTTP POST request."}),"\n",(0,s.jsxs)(t.p,{children:["When a ",(0,s.jsx)(t.strong,{children:"Webhook"})," component is added to the workspace, a new ",(0,s.jsx)(t.strong,{children:"Webhook cURL"})," tab becomes available in the ",(0,s.jsx)(t.strong,{children:"API"})," pane that contains an HTTP POST request for triggering the webhook component, similar to the call in this example."]}),"\n",(0,s.jsxs)(t.p,{children:["To test the ",(0,s.jsx)(t.strong,{children:"Webhook"})," component in your flow, see the ",(0,s.jsx)(t.a,{href:"/components-data#webhook",children:"Webhook component"}),"."]}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(p.A,{value:"curl",label:"curl",default:!0,children:(0,s.jsx)(D.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/webhook/",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: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:'\'{"data": "example-data"}\'',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]})}),(0,s.jsx)(p.A,{value:"result",label:"Result",children:(0,s.jsx)(D.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{}}]},{tokens:[{content:' {"message":"Task started in the background","status":"in progress"}',props:{}}]},{tokens:[{content:"}",props:{}}]}],lang:"text"},annotations:[]}]})})]}),"\n",(0,s.jsx)(t.h3,{id:"process",children:"Process"}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["This endpoint is deprecated. Use the ",(0,s.jsx)(t.code,{children:"/run"})," endpoint instead."]})}),"\n",(0,s.jsx)(t.h3,{id:"predict",children:"Predict"}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["This endpoint is deprecated. Use the ",(0,s.jsx)(t.code,{children:"/run"})," endpoint instead."]})}),"\n",(0,s.jsx)(t.h3,{id:"get-task-status",children:"Get task status"}),"\n",(0,s.jsx)(t.p,{children:"Get the status of a task."}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(p.A,{value:"curl",label:"curl",default:!0,children:(0,s.jsx)(D.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/task/TASK_ID" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]})}),(0,s.jsx)(p.A,{value:"result",label:"Result",children:(0,s.jsx)(D.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{}}]},{tokens:[{content:' "status": "Task status",',props:{}}]},{tokens:[{content:' "result": "Task result if completed"',props:{}}]},{tokens:[{content:"}",props:{}}]}],lang:"text"},annotations:[]}]})})]}),"\n",(0,s.jsx)(t.h3,{id:"create-upload-file-deprecated",children:"Create upload file (Deprecated)"}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["This endpoint is deprecated. Use the ",(0,s.jsx)(t.code,{children:"/file"})," endpoint instead."]})}),"\n",(0,s.jsx)(t.h3,{id:"get-version",children:"Get version"}),"\n",(0,s.jsx)(t.p,{children:"Get the version of the Langflow API."}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(p.A,{value:"curl",label:"curl",default:!0,children:(0,s.jsx)(D.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/version" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]})}),(0,s.jsx)(p.A,{value:"result",label:"Result",children:(0,s.jsx)(D.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{}}]},{tokens:[{content:' "version": "1.1.1",',props:{}}]},{tokens:[{content:' "main_version": "1.1.1",',props:{}}]},{tokens:[{content:' "package": "Langflow"',props:{}}]},{tokens:[{content:"}",props:{}}]}],lang:"text"},annotations:[]}]})})]}),"\n",(0,s.jsx)(t.h3,{id:"get-config",children:"Get config"}),"\n",(0,s.jsx)(t.p,{children:"Retrieve the Langflow configuration information."}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(p.A,{value:"curl",label:"curl",default:!0,children:(0,s.jsx)(D.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/config" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]})}),(0,s.jsx)(p.A,{value:"result",label:"Result",children:(0,s.jsx)(D.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "feature_flags"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "mvp_components"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "frontend_timeout"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"0",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "auto_saving"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "auto_saving_interval"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"1000",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "health_check_max_retries"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"5",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "max_file_size_upload"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"100",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})})]}),"\n",(0,s.jsx)(t.h2,{id:"build",children:"Build"}),"\n",(0,s.jsxs)(t.p,{children:["Use the ",(0,s.jsx)(t.code,{children:"/build"})," endpoint to build vertices and flows, and execute those flows with streaming event responses."]}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"/build"})," endpoint offers additional configuration for running flows."]}),"\n",(0,s.jsxs)(t.p,{children:["For a simpler execution of your flows, use the ",(0,s.jsxs)(t.a,{href:"/api-reference-api-examples#run-flow",children:[(0,s.jsx)(t.code,{children:"/run"})," endpoint"]})," instead."]}),"\n",(0,s.jsx)(t.h3,{id:"build-flow",children:"Build flow"}),"\n",(0,s.jsx)(t.admonition,{type:"important",children:(0,s.jsxs)(t.p,{children:["This endpoint is meant to be used by the frontend and is not optimized for external use.\nTo run your flow, use the ",(0,s.jsxs)(t.a,{href:"/api-reference-api-examples#run-flow",children:[(0,s.jsx)(t.code,{children:"/run"})," endpoint"]})," instead."]})}),"\n",(0,s.jsx)(t.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)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["Send a POST request to the ",(0,s.jsx)(t.code,{children:"/build/{flow_id}/flow"})," endpoint."]}),"\n"]}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(p.A,{value:"curl",label:"curl",default:!0,children:(0,s.jsx)(D.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:" -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:"bash"},annotations:[]}]})}),(0,s.jsx)(p.A,{value:"result",label:"Result",children:(0,s.jsx)(D.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",(0,s.jsxs)(t.ol,{start:"2",children:["\n",(0,s.jsxs)(t.li,{children:["After receiving a job ID from the build endpoint, use the ",(0,s.jsx)(t.code,{children:"/build/{job_id}/events"})," endpoint to stream the execution results:"]}),"\n"]}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(p.A,{value:"curl",label:"curl",default:!0,children:(0,s.jsx)(D.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl -X GET \\",props:{}}]},{tokens:[{content:' "$LANGFLOW_URL/api/v1/build/123e4567-e89b-12d3-a456-426614174000/events" \\',props:{}}]},{tokens:[{content:' -H "accept: application/json"',props:{}}]}],lang:"text"},annotations:[]}]})}),(0,s.jsx)(p.A,{value:"result",label:"Result",children:(0,s.jsx)(D.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",(0,s.jsxs)(t.p,{children:["The events endpoint accepts an optional ",(0,s.jsx)(t.code,{children:"stream"})," query parameter which defaults to ",(0,s.jsx)(t.code,{children:"true"}),".\nTo disable streaming and get all events at once, set ",(0,s.jsx)(t.code,{children:"stream"})," to ",(0,s.jsx)(t.code,{children:"false"}),"."]}),"\n",(0,s.jsx)(D.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl -X GET \\",props:{}}]},{tokens:[{content:' "$LANGFLOW_URL/api/v1/build/123e4567-e89b-12d3-a456-426614174000/events?stream=false" \\',props:{}}]},{tokens:[{content:' -H "accept: application/json"',props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsx)(t.h3,{id:"build-endpoint-headers-and-parameters",children:"Build endpoint headers and parameters"}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Headers"})}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Header"}),(0,s.jsx)(t.th,{children:"Info"}),(0,s.jsx)(t.th,{children:"Example"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Content-Type"}),(0,s.jsx)(t.td,{children:"Required. Specifies the JSON format."}),(0,s.jsx)(t.td,{children:'"application/json"'})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"accept"}),(0,s.jsx)(t.td,{children:"Required. Specifies the response format."}),(0,s.jsx)(t.td,{children:'"application/json"'})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"x-api-key"}),(0,s.jsx)(t.td,{children:"Optional. Required only if authentication is enabled."}),(0,s.jsx)(t.td,{children:'"sk-..."'})]})]})]}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"/build/{flow_id}/flow"})," endpoint accepts the following parameters in its request body:"]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Parameter"}),(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"inputs"}),(0,s.jsx)(t.td,{children:"object"}),(0,s.jsx)(t.td,{children:"Optional. Input values for flow components."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"data"}),(0,s.jsx)(t.td,{children:"object"}),(0,s.jsx)(t.td,{children:"Optional. Flow data to override stored configuration."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"files"}),(0,s.jsx)(t.td,{children:"array[string]"}),(0,s.jsx)(t.td,{children:"Optional. List of file paths to use."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"stop_component_id"}),(0,s.jsx)(t.td,{children:"string"}),(0,s.jsx)(t.td,{children:"Optional. ID of the component where the execution should stop."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"start_component_id"}),(0,s.jsx)(t.td,{children:"string"}),(0,s.jsx)(t.td,{children:"Optional. ID of the component where the execution should start."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"log_builds"}),(0,s.jsx)(t.td,{children:"boolean"}),(0,s.jsxs)(t.td,{children:["Optional. Control build logging. Default: ",(0,s.jsx)(t.code,{children:"true"}),"."]})]})]})]}),"\n",(0,s.jsx)(t.h3,{id:"configure-the-build-endpoint",children:"Configure the build endpoint"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"/build"})," endpoint accepts optional values for ",(0,s.jsx)(t.code,{children:"start_component_id"})," and ",(0,s.jsx)(t.code,{children:"stop_component_id"})," to control where the flow run starts and stops.\nSetting ",(0,s.jsx)(t.code,{children:"stop_component_id"})," for a component triggers the same behavior as clicking the ",(0,s.jsx)(t.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 Open AI model component, run the following command:"]}),"\n",(0,s.jsx)(D.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:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"/build"})," endpoint also accepts inputs for ",(0,s.jsx)(t.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.jsxs)(c.A,{children:[(0,s.jsx)(p.A,{value:"curl",label:"curl",default:!0,children:(0,s.jsx)(D.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:" -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:"bash"},annotations:[]}]})}),(0,s.jsx)(p.A,{value:"result",label:"Result",children:(0,s.jsx)(D.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)(t.h2,{id:"files",children:"Files"}),"\n",(0,s.jsxs)(t.p,{children:["Use the ",(0,s.jsx)(t.code,{children:"/files"})," endpoint to add or delete files between your local machine and Langflow."]}),"\n",(0,s.jsxs)(t.p,{children:["There are ",(0,s.jsx)(t.code,{children:"/v1"})," and ",(0,s.jsx)(t.code,{children:"/v2"})," versions of the ",(0,s.jsx)(t.code,{children:"/files"})," endpoints.\nThe ",(0,s.jsx)(t.code,{children:"v2/files"})," version offers several improvements over ",(0,s.jsx)(t.code,{children:"/v1"}),":"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["In ",(0,s.jsx)(t.code,{children:"v1"}),", files are organized by ",(0,s.jsx)(t.code,{children:"flow_id"}),". In ",(0,s.jsx)(t.code,{children:"v2"}),", files are organized by ",(0,s.jsx)(t.code,{children:"user_id"}),".\nThis means files are accessed based on user ownership, and not tied to specific flows.\nYou can upload a file to Langflow one time, and use it with multiple flows."]}),"\n",(0,s.jsxs)(t.li,{children:["In ",(0,s.jsx)(t.code,{children:"v2"}),", files are tracked in the Langflow database, and can be added or deleted in bulk, instead of one by one."]}),"\n",(0,s.jsxs)(t.li,{children:["Responses from the ",(0,s.jsx)(t.code,{children:"/v2"})," endpoint contain more descriptive metadata."]}),"\n",(0,s.jsxs)(t.li,{children:["The ",(0,s.jsx)(t.code,{children:"v2"})," endpoints require authentication by an API key or JWT."]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"filesv1-endpoints",children:"Files/V1 endpoints"}),"\n",(0,s.jsxs)(t.p,{children:["Use the ",(0,s.jsx)(t.code,{children:"/files"})," endpoint to add or delete files between your local machine and Langflow."]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["In ",(0,s.jsx)(t.code,{children:"v1"}),", files are organized by ",(0,s.jsx)(t.code,{children:"flow_id"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:["In ",(0,s.jsx)(t.code,{children:"v2"}),", files are organized by ",(0,s.jsx)(t.code,{children:"user_id"})," and tracked in the Langflow database, and can be added or deleted in bulk, instead of one by one."]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"upload-file-v1",children:"Upload file (v1)"}),"\n",(0,s.jsxs)(t.p,{children:["Upload a file to the ",(0,s.jsx)(t.code,{children:"v1/files/upload/