A flow that only runs in the Playground helps one person. The same flow becomes useful to other apps when it is called through the Langflow API: another app sends a message, the flow runs, and the reply comes back as data.
Before you start
You need a working Langflow agent flow and a Langflow API key. Keep the key private and set access control on the calling app first, because anyone with the key can run the flow.
Save the flow and find its endpoint
Save the flow in Langflow and note its flow ID. The API call targets the flow run endpoint for that ID, sending the user message in the request body. The Langflow documentation describes the LFX MCP server, which also calls the Langflow REST API, so flows an agent creates appear in the Langflow UI.
Send one test message and check the reply
Send a single test message with a question the flow should answer, and read the reply the API returns. Check the reply matches what the Playground gives for the same question. If the API reply is empty or an error, check the flow ID and the API key first.
Worked example: One API call for a fictional support app
Maple Support is a fictional support desk. Its app sends support questions to a Langflow agent flow. The table shows one call.
| Part | Value |
|---|---|
| Flow | Support agent flow |
| Message sent | How do I reset my password? |
| Expected reply | The agent says it has no password tool and points to the help page |
Expected result (UNTESTED): the API call returns the same answer the Playground gives for the same question. We checked the Langflow MCP documentation, which describes calling the Langflow REST API to run flows, but we did not send the request to a live Langflow instance.
Limits
An API endpoint is a door into your flow: anyone with the key and the flow ID can run it, and each call costs a model call. Do not publish the key, and set a usage limit on the provider side. The API returns the flow output, not the tool trace, so debugging still happens in the Playground.
