Synchronous Execution

Execute Chatflow (Synchronous)

post

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.

Authorizations
Path parameters
chatflow_idstringRequired

The unique identifier of the Chatflow to execute.

Body
Responses
200

The execution was successful and the final output is returned in an OpenAI-compatible format.

application/json
post
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
  }
}

Execute Chatflow with Streaming (Synchronous)

post

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.

Authorizations
Path parameters
chatflow_idstringRequired

The unique identifier of the Chatflow to execute.

Body
Responses
200

A stream of structured JSON events representing the real-time execution progress and output.

text/event-stream
Responseone of
or
or
or
or
or
or
post
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"
}

Execute Workflow (Synchronous)

post

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.

Authorizations
Path parameters
workflow_idstringRequired

The unique identifier of the Workflow to execute.

Body
Responses
200

The execution was successful and the final output is returned as a detailed JSON object.

application/json
post
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"
}

Execute Workflow with Streaming (Synchronous)

post

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.

Authorizations
Path parameters
chatflow_idstringRequired

The unique identifier of the Workflow to execute.

Body
Responses
200

A stream of structured JSON events representing the real-time execution progress and output.

text/event-stream
Responseone of
or
or
or
or
or
or
post
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"
}