Skip to main content

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 OrcaTaskItem linked to requestId.
  • 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

OK