openai_struct/models/
image.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/// pub Image : Represents the content or the URL of an image generated by the OpenAI API.
12
13#[allow(unused_imports)]
14use serde_json::Value;
15
16#[derive(Debug, Serialize, Deserialize)]
17pub struct Image {
18    /// The base64-encoded JSON of the generated image. Default value for `gpt-image-1`, and only present if `response_format` is set to `b64_json` for `dall-e-2` and `dall-e-3`.
19    #[serde(rename = "b64_json")]
20    pub b64_json: Option<String>,
21    /// For `dall-e-3` only, the revised prompt that was used to generate the image.
22    #[serde(rename = "revised_prompt")]
23    pub revised_prompt: Option<String>,
24    /// When using `dall-e-2` or `dall-e-3`, the URL of the generated image if `response_format` is set to `url` (default value). Unsupported for `gpt-image-1`.
25    #[serde(rename = "url")]
26    pub url: Option<String>,
27}