Synchronous Execution
Executes the latest published version of a specific Chatflow and waits for the complete result. The response is formatted for immediate use in chat applications. This is a blocking call, best used for quick-running chatflows.
The unique identifier of the Chatflow to execute.
The execution was successful and the final output is returned in an OpenAI-compatible format.
API key is missing or invalid.
An unexpected error occurred on the server.
POST /execute_chatflow/{chatflow_id}/execute HTTP/1.1
Host: api.waterflai.ai
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 66
{
"input_data": {
"query": "What is Waterflai?",
"user_id": "user-123"
}
}
{
"id": "chatcmpl-123",
"object": "chat.completion",
"created": 1,
"model": "text",
"choices": [
{
"index": 1,
"message": {
"role": "assistant",
"content": "Waterflai is a generative AI platform."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 1,
"completion_tokens": 1,
"total_tokens": 1
}
}
Executes the latest published version of a specific Chatflow and streams structured events in real-time using Server-Sent Events (SSE). Each event is a JSON object sent in the format data: <json_object>\n\n
. This provides a detailed, live feed of the execution progress, node by node.
The unique identifier of the Chatflow to execute.
A stream of structured JSON events representing the real-time execution progress and output.
API key is missing or invalid.
An unexpected error occurred on the server.
POST /execute_chatflow/{chatflow_id}/stream_execute HTTP/1.1
Host: api.waterflai.ai
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 66
{
"input_data": {
"query": "What is Waterflai?",
"user_id": "user-123"
}
}
{
"type": "execution_started",
"timestamp": "2025-09-12T19:31:02.421Z"
}
Executes the latest published version of a specific Workflow and waits for the complete, detailed result. This is a blocking call that returns the final output and optionally the execution details of each node.
The unique identifier of the Workflow to execute.
The execution was successful and the final output is returned as a detailed JSON object.
API key is missing or invalid.
An unexpected error occurred on the server.
POST /execute_workflow/{workflow_id}/execute HTTP/1.1
Host: api.waterflai.ai
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 66
{
"input_data": {
"query": "What is Waterflai?",
"user_id": "user-123"
}
}
{
"final_output": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"node_executions": [
{
"node_id": "text",
"node_type": "text",
"execution_detail": {
"parameters": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"execution_info": {
"duration": 1
},
"outputs": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
},
"error_occurred": true,
"error_message": "text"
}
],
"error_occurred": true,
"error_message": "text"
}
Executes the latest published version of a specific Workflow and streams structured events in real-time using Server-Sent Events (SSE). Each event is a JSON object sent in the format data: <json_object>\n\n
. This provides a detailed, live feed of the workflow's progress, node by node.
The unique identifier of the Workflow to execute.
A stream of structured JSON events representing the real-time execution progress and output.
API key is missing or invalid.
An unexpected error occurred on the server.
POST /execute_workflow/{chatflow_id}/stream_execute HTTP/1.1
Host: api.waterflai.ai
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 66
{
"input_data": {
"query": "What is Waterflai?",
"user_id": "user-123"
}
}
{
"type": "execution_started",
"timestamp": "2025-09-12T19:31:02.421Z"
}