Expand description
Lightweight helpers for GPT Image 2.5-style AI image generation workflows.
This crate provides request, aspect-ratio, resolution, and reference-image types for Rust applications that need to organize image generation prompts before handing them to a backend or HTTP client.
use gptimage_2_5_client::{AspectRatio, ImageRequest, Resolution};
let request = ImageRequest::new("A product poster with the headline SPRING SALE")
.aspect_ratio(AspectRatio::Widescreen)
.resolution(Resolution::TwoK);
assert_eq!(request.resolution, Resolution::TwoK);
assert!(request.validate().is_ok());Structs§
- Image
Request - A structured request for an AI image generation workflow.
- Reference
Image - A single reference image supplied to an image-to-image edit.
Enums§
- Aspect
Ratio - Common image aspect ratios.
- Reference
Role - How a reference image should steer the generation.
- Request
Error - Errors produced when a request is not valid.
- Resolution
- Output resolution tiers.
Constants§
- MAX_
PROMPT_ CHARS - Maximum prompt length in characters.
- MAX_
REFERENCE_ IMAGES - Maximum number of reference images accepted by an image-to-image edit.