Prediction
Prediction API is the primary endpoint for interacting with your Flowise flows and assistants. It allows you to send messages to your selected flow and receive responses back. This API handles the core chat functionality, including:
Chat Interactions: Send questions or messages to your flow and receive AI-generated responses
Streaming Responses: Get real-time streaming responses for better user experience
Conversation Memory: Maintain context across multiple messages within a session
File Processing: Upload and process images, audio, and other files as part of your queries
Dynamic Configuration: Override chatflow settings and pass variables at runtime
For details, see the Prediction Endpoint API Reference.
Base URL and Authentication
Base URL: http://localhost:3000 (or your Flowise instance URL)
Endpoint: POST /api/v1/prediction/:id
Authentication: Refer Authentication for Flows
Request Format
Basic Request Structure
{
"question": "Your message here",
"streaming": false,
"overrideConfig": {},
"history": [],
"uploads": [],
"form": {}
}Parameters
question
string
Yes
The message/question to send to the flow
form
object
Either question or form
The form object to send to the flow
streaming
boolean
No
Enable streaming responses (default: false)
overrideConfig
object
No
Override flow configuration
history
array
No
Previous conversation messages
uploads
array
No
Files to upload (images, audio, etc.)
humanInput
object
No
Return human feedback and resume execution
SDK Libraries
Flowise provides official SDKs for Python and TypeScript/JavaScript:
Installation
Python: pip install flowise
TypeScript/JavaScript: npm install flowise-sdk
Python SDK Usage
TypeScript/JavaScript SDK Usage
Direct HTTP API Usage
If you prefer to use the REST API directly without SDKs:
Basic Request
Advanced Features
Form Input
In Agentflow V2, you can select form as input type.

You can override the value by Variable Name of the Form Input
Configuration Override
Override chatflow settings dynamically.
Override config is disabled by default for security reasons. Enable it from the top right: Settings → Configuration → Security tab:

For array type, hovering over the info icon will shows the schema that can be overriden.
Array value from overrideConfig will concatenate with existing array values. For example, if existing startState has:
And if we enable override:

The final startState will be:
Overriding Specific Node
By default, if multiple nodes share the same type and no node ID is specified, overriding a property will update that property across all matching nodes.
For example, there are 2 LLM nodes where I want to override the system message:

After enabling the ability to override:

I can override the system message for both LLMs like so:
From the Execution, you can see the overriden system message:


In some cases, you might want to just override config for specific node. You can do so by specifying the node id inside the property you want to override.
For example:
If you head back to Execution, you can see each LLM has the correct overriden value:


Conversation History
Provide conversation context by including previous messages in the history array.
History Message Format
Session Management
Use sessionId to maintain conversation state across multiple API calls. Each session maintains its own conversation context and memory.
Variables
Pass dynamic variables to your flow using the vars property in overrideConfig. Variables can be used in your flow to inject dynamic content.
Variables must be created first before you can override it. Refer to Variables
Image Uploads
Upload images for visual analysis when your flow supports image processing. Refer to Image for more reference.
Upload Structure:
Data: Base64 or URL of an image
Type: url or file
Name: name of the image
Mime: image/png, image/jpeg, image/jpg
Audio Uploads (Speech to Text)
Upload audio files for speech-to-text processing. Refer to Audio for more reference.
Upload Structure:
Data: Base64 or URL of an audio
Type: url or file
Name: name of the audio
Mime: audio/mp4, audio/webm, audio/wav, audio/mpeg
File Uploads
Upload files to have LLM process the files and answer query related to the files. Refer to Files for more reference.
Human Input
When execution/conversation is halted requiring human's input, the response body will returns an action data. Users can use this to render specific actions from UI.
Remember to save chatId as it is needed to resume the execution/conversation.
How UI renders approve/reject/feedback
Flowise Chat UI reads action.elements and renders buttons based on element type:
agentflowv2-approve-button— green outlined button with a checkmark iconagentflowv2-reject-button— red outlined button with an X icon
When clicked, if action.data.input.humanInputEnableFeedback is true, a feedback dialog (text area) is shown before submitting. Otherwise it submits immediately.
For your own Chat UI, render the action like this:
How to resume the conversation
When the user clicks approve or reject, send another POST /api/v1/prediction/{chatflowId} with the humanInput field:
The three key fields in humanInput:
type
"proceed" or "reject"
Maps from the button type — approve → "proceed", reject → "reject"
startNodeId
From action.data.nodeId — tells the server which node to resume
feedback
Optional feedback text if humanInputEnableFeedback was true
Example — reject with feedback:
The server will find the pending action, clear it, and resume the agentflow from the startNodeId with the user's decision.
Troubleshooting
404 Not Found: Verify the flow ID is correct and the flow exists
401 Unauthorized Access: Verify if the flow is API key protected
400 Bad Request: Check request format and required fields
413 Payload Too Large: Reduce file sizes or split large requests
500 Internal Server Error: Check if there is any misconfiguration from the nodes in the flow
Last updated