ImageGenStreamEvent class sealed
A Server-Sent Event from a streaming image generation request.
GPT image models (e.g. gpt-image-2) emit one or more
ImageGenPartialImageEvents followed by a terminal
ImageGenCompletedEvent when stream: true is set on
ImagesResource.generateStream.
Unknown event types are surfaced as ImageGenUnknownEvent with the raw
JSON preserved. Typed fields (ImageSize, ImageQuality,
ImageBackground, ImageOutputFormat) fall back to their .unknown
variant when the server emits a value outside the current spec — for
example, partial-image events sometimes carry transient sizes like
1254x1254.
- Implementers
- Annotations
-
- @immutable
Constructors
-
ImageGenStreamEvent.fromJson(Map<
String, dynamic> json) -
Creates a ImageGenStreamEvent from JSON, dispatching on
type.factory
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Serializes the event.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited