openai_struct/models/
create_image_variation_request.rs

1/*
2 * OpenAI API
3 *
4 * The OpenAI REST API. Please see pub https://platform.openai.com/docs/api-reference for more details.
5 *
6 * OpenAPI spec pub version: 2.3.0
7 *
8 * Generated pub by: https://github.com/swagger-api/swagger-codegen.git
9 */
10
11#[allow(unused_imports)]
12use serde_json::Value;
13
14#[derive(Debug, Serialize, Deserialize)]
15pub struct CreateImageVariationRequest {
16    /// The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.
17    #[serde(rename = "image")]
18    pub image: Vec<u8>,
19    /// The model to use for image generation. Only `dall-e-2` is supported at this time.
20    #[serde(rename = "model")]
21    pub model: Option<Value>,
22    /// The number of images to generate. Must be between 1 and 10.
23    #[serde(rename = "n")]
24    pub n: Option<i32>,
25    /// 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.
26    #[serde(rename = "response_format")]
27    pub response_format: Option<String>,
28    /// The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
29    #[serde(rename = "size")]
30    pub size: Option<String>,
31    /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).
32    #[serde(rename = "user")]
33    pub user: Option<String>,
34}