Class FormatStage<R extends bg.codexio.ai.openai.api.payload.images.request.ImageRequest,E extends RuntimeSelectionStage>

java.lang.Object
bg.codexio.ai.openai.api.sdk.images.ImageConfigurationStage<R>
bg.codexio.ai.openai.api.sdk.images.FormatStage<R,E>
All Implemented Interfaces:
IntermediateStage

public class FormatStage<R extends bg.codexio.ai.openai.api.payload.images.request.ImageRequest,E extends RuntimeSelectionStage> extends ImageConfigurationStage<R> implements IntermediateStage
A stage to choose the format of the response images
  • Method Details

    • expectUrl

      public ImagesTerminalStage<R,E> expectUrl()
      Sets the image format to url.

      Important note: The images are not permanently hosted on the OpenAI servers. If you want to ensure the image is saved, you have to additionally download it.

      Returns:
      ImagesTerminalStage to choose an API for the image request.
    • expectBase64

      public ImagesTerminalStage<R,E> expectBase64()
      Sets the image format to Base 64.
      Returns:
      ImagesTerminalStage to choose an API for the image request.