跳到主要内容

公开入口流式运行 workflow

POST 

/embed/api/workflows/:workflowName/run/stream

conversation embed 使用该接口消费 NDJSON runtime events。output 节点的 node_chunk 会在 workflow running 期间增量渲染到 assistant 气泡; timer_started / timer_finished 会在 workflow running 期间增量渲染计时卡片; 最后一行 run_result 返回完整运行记录用于状态收敛和备用输出。 Embed token、登录状态、固定目标版本和入口会在发送 NDJSON 响应头前完成校验; 未知入口返回 HTTP 400 JSON,不创建 run。开始流式响应后的执行错误继续使用 NDJSON error event。 Kanban Embed 调用该接口返回 409 且不创建运行记录。

Request

Responses

NDJSON 流,每行是 runtime event、run_result 或 error;runtime event 包含 timer_started / timer_finished,用于展示业务计时卡片。