pub struct ImageGenerationRequest {
pub prompt: String,
pub model: Option<String>,
pub n: Option<u32>,
pub size: Option<String>,
pub quality: Option<String>,
pub response_format: Option<String>,
pub style: Option<String>,
pub user: Option<String>,
}Expand description
Request body for POST /images/generations.
Fields§
§prompt: String§model: Option<String>§n: Option<u32>§size: Option<String>e.g. "1024x1024", "1792x1024".
quality: Option<String>e.g. "standard", "hd".
response_format: Option<String>"url" (default) or "b64_json".
style: Option<String>e.g. "vivid", "natural".
user: Option<String>Implementations§
Source§impl ImageGenerationRequest
impl ImageGenerationRequest
pub fn new(prompt: impl Into<String>) -> Self
pub fn model(self, model: impl Into<String>) -> Self
pub fn n(self, n: u32) -> Self
pub fn size(self, size: impl Into<String>) -> Self
pub fn quality(self, quality: impl Into<String>) -> Self
pub fn response_format(self, response_format: impl Into<String>) -> Self
Sourcepub fn style(self, style: impl Into<String>) -> Self
pub fn style(self, style: impl Into<String>) -> Self
Image style: "vivid" or "natural" (dall-e-3 only).
pub fn user(self, user: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for ImageGenerationRequest
impl Clone for ImageGenerationRequest
Source§fn clone(&self) -> ImageGenerationRequest
fn clone(&self) -> ImageGenerationRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImageGenerationRequest
impl Debug for ImageGenerationRequest
Auto Trait Implementations§
impl Freeze for ImageGenerationRequest
impl RefUnwindSafe for ImageGenerationRequest
impl Send for ImageGenerationRequest
impl Sync for ImageGenerationRequest
impl Unpin for ImageGenerationRequest
impl UnsafeUnpin for ImageGenerationRequest
impl UnwindSafe for ImageGenerationRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more