pub struct CreateImageEditRequest {
pub image: ImageInput,
pub prompt: String,
pub mask: Option<ImageInput>,
pub model: Option<ImageModel>,
pub n: Option<u8>,
pub size: Option<DallE2ImageSize>,
pub response_format: Option<ImageResponseFormat>,
pub user: Option<String>,
}
Fields§
§image: ImageInput
The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.
prompt: String
A text description of the desired image(s). The maximum length is 1000 characters.
mask: Option<ImageInput>
An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image
should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as image
.
model: Option<ImageModel>
The model to use for image generation. Only dall-e-2
is supported at this time.
n: Option<u8>
The number of images to generate. Must be between 1 and 10.
size: Option<DallE2ImageSize>
The size of the generated images. Must be one of 256x256
, 512x512
, or 1024x1024
.
response_format: Option<ImageResponseFormat>
The format in which the generated images are returned. Must be one of url
or b64_json
.
user: Option<String>
A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. Learn more.
Trait Implementations§
source§impl Clone for CreateImageEditRequest
impl Clone for CreateImageEditRequest
source§fn clone(&self) -> CreateImageEditRequest
fn clone(&self) -> CreateImageEditRequest
1.6.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CreateImageEditRequest
impl Debug for CreateImageEditRequest
source§impl Default for CreateImageEditRequest
impl Default for CreateImageEditRequest
source§fn default() -> CreateImageEditRequest
fn default() -> CreateImageEditRequest
source§impl PartialEq for CreateImageEditRequest
impl PartialEq for CreateImageEditRequest
source§impl TryFrom<CreateImageEditRequest> for Form
impl TryFrom<CreateImageEditRequest> for Form
impl StructuralPartialEq for CreateImageEditRequest
Auto Trait Implementations§
impl !Freeze for CreateImageEditRequest
impl RefUnwindSafe for CreateImageEditRequest
impl Send for CreateImageEditRequest
impl Sync for CreateImageEditRequest
impl Unpin for CreateImageEditRequest
impl UnwindSafe for CreateImageEditRequest
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)