Streams a single provider/model response for the supplied prompt as Server-Sent Events.
POST/studio/compare_stream
Records an OrcaTaskItem, tracks tokens/cost, charges the user wallet, and persists the streamed assistant output for later comparison.
- Resolves the chat provider by name; creates and saves an
OrcaTaskItemlinked torequestId. - Estimates prompt/completion tokens and costs; if provider returns usage, uses that; otherwise falls back to estimator.
- Applies standard SSE headers (
text/event-stream, no buffering, no compression) and streams tokens incrementally. - On completion: saves assistant output, token counts, computed cost, charges the user's wallet, and marks task as
Generated.
Request
Responses
- 200
- 401
- 403
OK
Unauthorized - missing or invalid credentials.
Forbidden - authenticated but missing required role or policy.