pub struct ImageGenBody<N>{
pub model: N,
pub prompt: Option<String>,
pub quality: Option<ImageQuality>,
pub size: Option<ImageSize>,
pub watermark_enabled: Option<bool>,
pub user_id: Option<String>,
}Expand description
Request body for image generation
Fields§
§model: NThe model to use for image generation
prompt: Option<String>Text description of the desired image
quality: Option<ImageQuality>Image generation quality
- HD: generates more refined and detailed images with higher consistency, takes ~20 seconds
- Standard: fast image generation, suitable for scenarios requiring speed, takes ~5-10 seconds This parameter only supports cogview-4-250304
size: Option<ImageSize>Image size Recommended values: 1024x1024 (default), 768x1344, 864x1152, 1344x768, 1152x864, 1440x720, 720x1440 Custom dimensions: width and height must be between 512-2048px, divisible by 16, and total pixels must not exceed 2^21 (2,097,152)
watermark_enabled: Option<bool>Whether to add watermark to AI generated images
user_id: Option<String>Unique ID of the end user to help platform intervene against violations, illegal content generation, or other abusive behaviors
Trait Implementations§
Source§impl<N> Clone for ImageGenBody<N>
impl<N> Clone for ImageGenBody<N>
Source§fn clone(&self) -> ImageGenBody<N>
fn clone(&self) -> ImageGenBody<N>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<N> Debug for ImageGenBody<N>
impl<N> Debug for ImageGenBody<N>
Source§impl<N> Serialize for ImageGenBody<N>
impl<N> Serialize for ImageGenBody<N>
Source§impl<N> Validate for ImageGenBody<N>
impl<N> Validate for ImageGenBody<N>
Source§impl<'v_a, N> ValidateArgs<'v_a> for ImageGenBody<N>
impl<'v_a, N> ValidateArgs<'v_a> for ImageGenBody<N>
Auto Trait Implementations§
impl<N> Freeze for ImageGenBody<N>where
N: Freeze,
impl<N> RefUnwindSafe for ImageGenBody<N>where
N: RefUnwindSafe,
impl<N> Send for ImageGenBody<N>where
N: Send,
impl<N> Sync for ImageGenBody<N>where
N: Sync,
impl<N> Unpin for ImageGenBody<N>where
N: Unpin,
impl<N> UnsafeUnpin for ImageGenBody<N>where
N: UnsafeUnpin,
impl<N> UnwindSafe for ImageGenBody<N>where
N: UnwindSafe,
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