Expand description
Create/Edit Images to a Responses image-generation tool or Gemini.
Builders produce one native call; ImageRequestContext::n tells the adapter
how many independent calls are required. The host chooses the generation
model separately from the Responses image tool model. Explicit equivalent
controls are mapped; unsupported controls fail before any resource read.
In particular Gemini Developer API does not accept responseMimeType for
images, and its resolution classes cannot guarantee exact Images pixel sizes.
Output MIME and dimensions come from validated PNG/JPEG/WebP containers, never from requested settings. This is container validation, not pixel decoding or transcoding. Native usage remains typed per call because generic generation counters cannot fabricate Images’ image/text token breakdown.
Structs§
- Generated
Image Part - Image
Call Result - Image
Metadata - Image
Request Context - Image
Response Facts - Image
Target Models - The generation model is selected by the host. An image tool model is a separate routing decision; an absent override retains the source image model.
- Prepared
Image Request - Resolved
Image Input
Enums§
Functions§
- build_
request - Builds ONE call;
context.nis the adapter’s total call count. - decode_
image - image_
reference - image_
response_ from_ gemini - image_
response_ from_ responses - inspect_
image - Container validation and dimensions; this does not decode pixels. PNG CRCs, JPEG marker framing and WebP RIFF framing are checked before publication.
- preflight
- Selects the source resources and return parameters used by the adapter.