Skip to main content

Mid-Stream

If generation fails after the stream has begun, a chunk carries a top-level error and a terminal choice:
Content streamed before this chunk is partial. The stream still ends with [DONE].

Before the First Byte

A request rejected before any byte is written (auth, validation, limits, a provider that never opened) returns a normal HTTP error with the standard envelope. See Error format. A streaming client therefore handles two shapes: a non-200 response with a JSON body, and a 200 stream that later carries an error chunk.