pub struct ImageGenerationModel {
pub name: String,
pub aliases: Vec<String>,
pub version: String,
pub input_modalities: Vec<Modality>,
pub output_modalities: Vec<Modality>,
pub image_price: i64,
pub max_prompt_length: i32,
pub system_fingerprint: String,
}Expand description
Information about an image generation model.
Image generation models create images from text prompts.
§Pricing Units
image_price: USD cents per image
§Examples
let model = client.get_image_generation_model("image-gen-1").await?;
println!("Model: {}", model.name);
println!("Cost per image: ${:.2}", model.image_price as f64 / 100.0);Fields§
§name: StringThe model name used in API requests.
aliases: Vec<String>Alternative names that can be used for this model.
version: StringVersion number of the model.
input_modalities: Vec<Modality>Supported input modalities (typically Text).
output_modalities: Vec<Modality>Supported output modalities (typically Image).
image_price: i64Price per image in USD cents.
Example: 200 = $2.00 per image
max_prompt_length: i32Maximum length of the prompt/input in tokens.
system_fingerprint: StringBackend configuration fingerprint.
Trait Implementations§
Source§impl Clone for ImageGenerationModel
impl Clone for ImageGenerationModel
Source§fn clone(&self) -> ImageGenerationModel
fn clone(&self) -> ImageGenerationModel
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 moreAuto Trait Implementations§
impl Freeze for ImageGenerationModel
impl RefUnwindSafe for ImageGenerationModel
impl Send for ImageGenerationModel
impl Sync for ImageGenerationModel
impl Unpin for ImageGenerationModel
impl UnwindSafe for ImageGenerationModel
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request