Skip to main content

Module images

Module images 

Source
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.
ImagesResponse
The response from the image generation endpoint.
Usage
For gpt-image-1 only, the token usage information for the image generation.
UsageInputTokensDetails
The input tokens detailed information for the image generation.
UsageOutputTokensDetails
The output token details for the image generation.

Enums§

Background
The background of the generated image(s).
ImageResponseFormat
The format in which generated images with dall-e-2 and dall-e-3 are returned. Must be one of url or b64_json.
OutputFormat
The format in which the generated images are returned. This parameter is only supported for the GPT image models.