Expand description
Given a prompt and/or an input image, the model will generate a new image.
Submodules: generate, edit, and variation for specific image
operations. Streaming image generation (stream / partial_images) is
not supported yet.
![warn] The endpoints in this module are untested! No OpenAI-compatible provider accessible to this project (DeepSeek, Alibaba Cloud Model Studio) implements the
/images/*endpoints, and no OpenAI API key was available for testing. If you encounter any issues, please report them on the repository.
Modules§
- edit
- Creates an edited or extended image given an original image and a prompt.
- generate
- Create an image with a model.
- variation
- Creates a variation of a given image.
Structs§
- Image
- Represents the content or the URL of an image generated by the OpenAI API.
- Images
Response - The response from the image generation endpoint.
- Usage
- For
gpt-image-1only, the token usage information for the image generation. - Usage
Input Tokens Details - The input tokens detailed information for the image generation.
- Usage
Output Tokens Details - The output token details for the image generation.
Enums§
- Background
- The background of the generated image(s).
- Image
Response Format - The format in which generated images with
dall-e-2anddall-e-3are returned. Must be one ofurlorb64_json. - Output
Format - The format in which the generated images are returned. This parameter is only supported for the GPT image models.