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
To resume the execution from a previously stopped checkpoint, humanInput needs to be provided. Refer Human In The Loop for details.
Human Input Structure
type: Either
proceedorrejectfeedback: Feedback to the last output
Must specify the same sessionId where the execution was stopped
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