Prediction API

POST /api/v1/prediction/{chatflowId}

Use this endpoint to run a chatflow from backend services, web clients, or Unity integrations.

Base URL and auth

  • Base URL: https://<your-flowise-host>
  • Endpoint: /api/v1/prediction/{chatflowId}
  • Auth: Authorization: Bearer <apiKey> when API key protection is enabled.

Request body

{
  "question": "Show me the map",
  "streaming": false,
  "overrideConfig": {
    "sessionId": "UUID-1234-STRING",
    "CurrentFlowId": "FLOW-UUID-5678",
    "mediaContext": ["User is viewing ImageX", "Hardware is Kiosk-ID9"],
    "tenantVariables": {
      "OpenAiKey": "...",
      "AzureKey": "..."
    }
  },
  "history": [],
  "uploads": [],
  "form": {}
}

Fields used in production

  • question: main user input.
  • streaming: set true for SSE token streaming (see Streaming).
  • overrideConfig.sessionId: conversation/session identity.
  • overrideConfig.CurrentFlowId: active Unity flow id.
  • overrideConfig.mediaContext: contextual hints from current scene/UI.
  • overrideConfig.tenantVariables: tenant credentials/variables injected at runtime.
  • form: structured input payload for form-based flows.
  • uploads: files or URLs for multimodal flows.
  • humanInput: resume payload for HITL checkpoints.

Unity ingestion contract (current)

When Unity finalizes transcript, it posts:

{
  "question": "Show me the map",
  "overrideConfig": {
    "sessionId": "UUID-1234-STRING",
    "CurrentFlowId": "FLOW-UUID-5678",
    "mediaContext": ["User is viewing ImageX"],
    "tenantVariables": {
      "OpenAiKey": "..."
    }
  }
}

cURL example

curl -X POST "https://<your-flowise-host>/api/v1/prediction/<chatflowId>" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <apiKey>" \
  -d '{
    "question": "Hello",
    "streaming": false,
    "overrideConfig": { "sessionId": "session-1" }
  }'

Common errors

  • 404: chatflowId does not exist.
  • 401/403: missing or invalid auth / forbidden origin.
  • 400: invalid payload structure.

results matching ""

    No results matching ""