API
API
Learn how to use the Flowise Prediction, Vector Upsert and Message API
1. Prediction API
POST
/api/v1/prediction/{your-chatflowid}
Request Body
question
User's question
string
Yes
overrideConfig
Override existing flow configuration
object
No
history
Prepend history messages at the start of conversation
array
No
You can use the chatflow as API and connect to frontend applications.

Override Config
You also have the flexibility to override input configuration with overrideConfig property.

History
You can prepend history messages to give some context to LLM. For example, if you want the LLM to remember user's name:
Persists Memory
If the chatflow contains Memory nodes, you can pass a sessionId to persists the state of the conversation, so the every subsequent API calls will have context about previous conversation. Otherwise, a new session will be generated each time.
Image Uploads
When Allow Image Upload is enabled, images can be uploaded from chat interface.


Speech to Text
When Speech to Text is enabled, users can speak directly into microphone and speech will be transcribed into text.


Authentication
You can assign an API key to the prediction API from the UI. Refer Chatflow Level for more details.
The Authorization header must be provided with the correct API key specified during a HTTP call.
2. Vector Upsert API
POST
/api/v1/vector/upsert/{your-chatflowid}
Request Body
overrideConfig
Override existing flow configuration
object
No
stopNodeId
Node ID of the vector store. When you have multiple vector stores in a flow, you might not want to upsert all of them. Specifying stopNodeId will ensure only that specific vector store node is upserted.
array
No
Document Loaders with Upload
Some document loaders in Flowise allow user to upload files:

If the flow contains Document Loaders with Upload File functionality, the API looks slightly different. Instead of passing body as JSON, form-data is being used. This allows you to upload any files to the API.
It is user's responsibility to make sure the file type is compatible with the expected file type from document loader. For example, if a Text File Loader is being used, you should only upload file with .txt extension.
Document Loaders without Upload
For other Document Loaders nodes without Upload File functionality, the API body is in JSON format similar to Prediction API.
Authentication
You can assign an API key to the prediction API from the UI. Refer Chatflow Level for more details.
The Authorization header must be provided with the correct API key specified during a HTTP call.
3. Message API
GET
/api/v1/chatmessage/{your-chatflowid}DELETE
/api/v1/chatmessage/{your-chatflowid}
Query Parameters
sessionId
string
sort
enum
ASC or DESC
startDate
string
endDate
string
Authentication
Message API is restricted to only Flowise admin user. Basic authentication must be provided in the headers if Flowise instance has been configured with FLOWISE_USERNAME and FLOWISE_PASSWORD. Refer App Level for more details.
Video Tutorials
Those video tutorials cover the main use cases for implementing the Flowise API.