BizKitHub
DocsAPI ReferenceBff/bff/ai/question-stream
postBffAdmin BFF

/bff/ai/question-stream

Returns a Server-Sent Events stream. Events: "token" ({ text }) for partial chunks, "done" ({ answer }) for the complete response, "error" ({ message }) on failure. Pass messages for multi-turn chat.

bffpostBffAiQuestion-stream

Parameters

JSON body

Request body

application/json
questionstringRequired

Single-turn prompt. Ignored when messages is provided.

ExampleHello!
modelstringOptional

AI model identifier. Defaults to gemini-2.5-flash.

Examplegemini-2.5-flash
messagesobject[]Optional

Full conversation history including the last user turn. When present, the endpoint runs a proper multi-turn request and bypasses the ai__question cache.

Each array item:
role"system" | "user" | "assistant"Required
contentstringRequired

Response schema

1 status code documented

200Success

This response returns no JSON body.

Response example

application/json
{
  "success": true
}

Request example

POST /bff/ai/question-stream

post
curl -X POST "https://api.bizkithub.com/bff/ai/question-stream" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "question": "Hello!",
  "model": "gemini-2.5-flash",
  "messages": [
    {
      "content": "example_content"
    }
  ]
}'

Need an API key?

All BizKitHub public API endpoints require authentication via API key.

Get API Key