Skip to main content
Set stream: true and iterate over the returned stream.
Streaming is supported by Chat Completions, Responses, and Messages, using each endpoint’s normal event format. Prompt Guard can return a streamed refusal. The output content filter runs on Chat Completions streams and on Responses streams that are not continuations. It does not run on Messages streams. You cannot combine streaming with serv_shadow_agent. SERV rejects that combination with a 400 response because Shadow Agent must validate a completed response. The exception is a Responses continuation (previous_response_id): SERV skips Shadow Agent, Prompt Guard, and the output content filter there, so it does not reject the combination, and the stream runs without validation, screening, or filtering. The request can still fail upstream: SERV always sends store: false, so OpenAI usually has no stored response to continue from. See continuing a conversation and When SERV features are skipped.