pub struct ImageVariationRequest {
pub image: PathBuf,
pub model: Option<String>,
pub n: Option<u32>,
pub response_format: Option<ImageResponseFormat>,
pub size: Option<VariationSize>,
pub user: Option<String>,
pub extra_body_map: Option<Map<String, Value>>,
}Expand description
Creates a variation of a given image.
Fields§
§image: PathBufThe image to use as the basis for the variation(s), as a file path.
Must be a valid PNG file, less than 4MB, and square.
model: Option<String>The model to use for image generation. Only dall-e-2 is supported
at this time.
n: Option<u32>The number of images to generate. Must be between 1 and 10.
response_format: Option<ImageResponseFormat>The format in which the generated images are returned. Must be one of
url or b64_json. URLs are only valid for 60 minutes after the
image has been generated.
size: Option<VariationSize>The size of the generated images. Must be one of 256x256,
512x512, or 1024x1024.
user: Option<String>A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.
extra_body_map: Option<Map<String, Value>>Additional JSON properties, sent as extra multipart text fields (strings verbatim, other JSON values serialized).
Trait Implementations§
Source§impl Clone for ImageVariationRequest
impl Clone for ImageVariationRequest
Source§fn clone(&self) -> ImageVariationRequest
fn clone(&self) -> ImageVariationRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ImageVariationRequest
impl Debug for ImageVariationRequest
Source§impl Default for ImageVariationRequest
impl Default for ImageVariationRequest
Source§fn default() -> ImageVariationRequest
fn default() -> ImageVariationRequest
Source§impl Post for ImageVariationRequest
impl Post for ImageVariationRequest
Source§impl PostNoStream for ImageVariationRequest
impl PostNoStream for ImageVariationRequest
Source§async fn get_response_string(
&self,
client: &Client,
base_url: &str,
options: &RequestOptions,
) -> Result<String, OapiError>
async fn get_response_string( &self, client: &Client, base_url: &str, options: &RequestOptions, ) -> Result<String, OapiError>
Sends an image variation POST request using multipart/form-data format, following the field layout of the official SDK.