跳到主要内容

Logan-AI CTR Optimizer

POST 

/v1/skills/stream

Call the Logan-AI CTR Optimizer skill with a new-api Token. This page is fixed to skill_key=app-ctr-diagnostic-optimizer; the gateway maps it to model skill/app-ctr-diagnostic-optimizer and returns streamed SSE events.

Request

Responses

Streamed SSE response.

SSE Streaming Event Reference (Generic)

Each business message is pushed through SSE as data: {json}\n\n. Parse messages by top-level type.

typeMeaningFrontend handling suggestion
systemStream initialization event (usually subtype=init)Extract session_id and pass it back as session_id for follow-up turns
assistantAssistant output chunks (text/image/thinking, etc.)Render as the main assistant stream
userSDK passthrough messages (usually tool execution output)Mark as "tool output", do not treat as manually typed user input
resultSuccess end signal for the current turnStop stream concatenation and mark completion
errorFailure end signal for the current turnStop stream concatenation, show error, and allow retry
doneOptional SDK passthrough end hintCan be used to stop loading, but business completion should follow result / error

Notes

  • Heartbeats are SSE comment lines (for example : heartbeat ...) instead of data events, and can be ignored in business rendering.