langflow icon indicating copy to clipboard operation
langflow copied to clipboard

API not responding when using stream=true

Open FILM6912 opened this issue 1 year ago • 1 comments

Issue: Calling the API at http://localhost:7860/api/v1/run/{FLOW_ID}?stream=true returns HTTP 200 but no data is received.

Additional Info: When using stream=false, the response works as expected.

FILM6912 avatar Jul 10 '25 17:07 FILM6912

Hi @FILM6912! I'm Dosu and I’m helping the langflow team.

The /api/v1/run/{FLOW_ID}?stream=true endpoint is deprecated in recent Langflow versions, which is why you get HTTP 200 but no data. For streaming, use the /build endpoint instead: first POST to /api/v1/build/{flow_id}/flow to get a job ID, then GET /api/v1/build/{job_id}/events to receive streaming events. Make sure your config has 'event_delivery' set to 'streaming', and only enable streaming on the last LLM nodes in your flow—enabling it elsewhere can cause issues. If the backend generator yields nothing (due to errors or misconfiguration), FastAPI will return 200 with no body, matching what you see. More details and examples are in these threads: issue 5914, issue 7243, and issue 7398.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

dosubot[bot] avatar Jul 10 '25 17:07 dosubot[bot]