Package io.github.sashirestela.openai
Interface OpenAI.Images
-
- Enclosing interface:
- OpenAI
@Resource("/v1/images") public static interface OpenAI.Images
Given a prompt and/or an input image, the model will generate a new image.- See Also:
- OpenAI Image
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default CompletableFuture<List<Image>>
create(ImageRequest imageRequest)
Creates an image given a prompt.default CompletableFuture<List<Image>>
createEdits(ImageEditsRequest imageRequest)
Creates an edited or extended image given an original image and a prompt.CompletableFuture<Generic<Image>>
createEditsPrimitive(ImageEditsRequest imageRequest)
Creates a Generic of edited or extended image given an original image and a prompt (don't call it directly).CompletableFuture<Generic<Image>>
createPrimitive(ImageRequest imageRequest)
Creates a Genric object of image given a prompt (don't call it directly).default CompletableFuture<List<Image>>
createVariations(ImageVariationsRequest imageRequest)
Creates a variation of a given image.CompletableFuture<Generic<Image>>
createVariationsPrimitive(ImageVariationsRequest imageRequest)
Creates a Generic of variation of a given image (don't call it directly).
-
-
-
Method Detail
-
createPrimitive
@POST("/generations") CompletableFuture<Generic<Image>> createPrimitive(@Body ImageRequest imageRequest)
Creates a Genric object of image given a prompt (don't call it directly).- Parameters:
imageRequest
- A text description of the desired image(s) and other parameters such as number, size or responseFormat.- Returns:
- Returns a Generic of image objects (the url or the binary content).
-
createEditsPrimitive
@Multipart @POST("/edits") CompletableFuture<Generic<Image>> createEditsPrimitive(@Body ImageEditsRequest imageRequest)
Creates a Generic of edited or extended image given an original image and a prompt (don't call it directly).- Parameters:
imageRequest
- Includes the image file to edit and a text description of the desired image(s).- Returns:
- Returns a Generic of image objects (the url or the binary content).
-
createVariationsPrimitive
@Multipart @POST("/variations") CompletableFuture<Generic<Image>> createVariationsPrimitive(@Body ImageVariationsRequest imageRequest)
Creates a Generic of variation of a given image (don't call it directly).- Parameters:
imageRequest
- Includes the image file to use as the basis for the variation(s).- Returns:
- Returns a Generic of image objects (the url or the binary content).
-
create
default CompletableFuture<List<Image>> create(ImageRequest imageRequest)
Creates an image given a prompt.- Parameters:
imageRequest
- A text description of the desired image(s) and other parameters such as number, size or responseFormat.- Returns:
- Returns a list of image objects (the url or the binary content).
-
createEdits
default CompletableFuture<List<Image>> createEdits(ImageEditsRequest imageRequest)
Creates an edited or extended image given an original image and a prompt.- Parameters:
imageRequest
- Includes the image file to edit and a text description of the desired image(s).- Returns:
- Returns a list of image objects (the url or the binary content).
-
createVariations
default CompletableFuture<List<Image>> createVariations(ImageVariationsRequest imageRequest)
Creates a variation of a given image.- Parameters:
imageRequest
- Includes the image file to use as the basis for the variation(s).- Returns:
- Returns a list of image objects (the url or the binary content).
-
-