pub struct ImagesResponse {
pub created: i64,
pub data: Option<Vec<Image>>,
pub background: Option<ImagesResponseBackground>,
pub output_format: Option<ImagesResponseOutputFormat>,
pub size: Option<ImagesResponseSize>,
pub quality: Option<ImagesResponseQuality>,
pub usage: Option<ImagesResponseUsage>,
}
Expand description
The response from the image generation endpoint.
Fields§
§created: i64
The Unix timestamp (in seconds) of when the image was created.
data: Option<Vec<Image>>
The list of generated images.
background: Option<ImagesResponseBackground>
The background parameter used for the image generation. Either transparent
or opaque
.
output_format: Option<ImagesResponseOutputFormat>
The output format of the image generation. Either png
, webp
, or jpeg
.
size: Option<ImagesResponseSize>
The size of the image generated. Either 1024x1024
, 1024x1536
, or 1536x1024
.
quality: Option<ImagesResponseQuality>
The quality of the image generated. Either low
, medium
, or high
.
usage: Option<ImagesResponseUsage>
For gpt-image-1
only, the token usage information for the image generation.
Implementations§
Source§impl ImagesResponse
impl ImagesResponse
Sourcepub fn builder() -> ImagesResponseBuilder<((), (), (), (), (), (), ())>
pub fn builder() -> ImagesResponseBuilder<((), (), (), (), (), (), ())>
Create a builder for building ImagesResponse
.
On the builder, call .created(...)
, .data(...)
(optional), .background(...)
(optional), .output_format(...)
(optional), .size(...)
(optional), .quality(...)
(optional), .usage(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of ImagesResponse
.
Trait Implementations§
Source§impl Clone for ImagesResponse
impl Clone for ImagesResponse
Source§fn clone(&self) -> ImagesResponse
fn clone(&self) -> ImagesResponse
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more