Publish flows
Langflow provides several ways to publish and integrate your flows into external applications. Whether you want to expose your flow as an API endpoint, embed it as a chat widget in your website, or share it as a public playground, this guide covers the options available for making your flows accessible to users.
API access
The API access pane presents code templates for integrating your flow into external applications.
- Python
- JavaScript
- curl
The Python tab displays code to interact with your flow using the Python requests
library.
- Copy and paste the code into a Python script.
- Run the script.
_10python3 python-test-script.py --message="tell me about something interesting"
The response content depends on your flow. Make sure the endpoint returns a successful response.
The JavaScript API tab displays code to interact with your flow in JavaScript.
- Copy and paste the code into a JavaScript file.
- Run the script.
_10node test-script.js "tell me about something interesting"
The response content depends on your flow. Make sure the endpoint returns a successful response.
The cURL tab displays sample code for posting a query to your flow.
Copy the code and run it to post a query to your flow and get the result.
The response content depends on your flow. Make sure the endpoint returns a successful response.
Temporary overrides
The Temporary overrides tab displays the available parameters for your flow.
Modifying the parameters changes the code parameters across all windows.
For example, changing the Chat Input component's input_value
changes that value across all API calls to the /run
endpoint of this flow.
Send files to your flow with the API
For information on sending files to the Langflow API, see API examples.
Shareable playground
The Shareable playground exposes your Langflow application's Playground at the /public_flow/{flow-id}
endpoint.
You can share this endpoint publicly using a sharing platform like Ngrok or zrok.
If you're using Datastax Langflow, you can share the URL with any users within your Organization.
Embed into site
The Embed into site tab displays code that can be inserted in the <body>
of your HTML to interact with your flow.
For more information, see Embedded chat widget.