Skip to content

Conversation

@mucsi96
Copy link

@mucsi96 mucsi96 commented Dec 15, 2025

Add support for outputFormat and outputCompression parameters in image generation using the OpenAI SDK. These options allow users to specify the output format (png, jpeg, webp) and compression level for generated images.

Changes:

  • Add outputFormat and outputCompression fields to OpenAiSdkImageOptions
  • Add getters, setters, and builder methods for the new fields
  • Update equals, hashCode, and toString methods
  • Update toOpenAiImageGenerateParams to include the new parameters
  • Update Builder.from() and Builder.merge() to handle new fields
  • Add test coverage for the new properties

Thank you for taking time to contribute this pull request!
You might have already read the contributor guide, but as a reminder, please make sure to:

  • Add a Signed-off-by line to each commit (git commit -s) per the DCO
  • Rebase your changes on the latest main branch and squash your commits
  • Add/Update unit tests as needed
  • Run a build and make sure all tests pass prior to submission

For more details, please check the contributor guide.
Thank you upfront!

Add support for outputFormat and outputCompression parameters in
image generation using the OpenAI SDK. These options allow users
to specify the output format (png, jpeg, webp) and compression
level for generated images, which is supported by the gpt-image-1
model.

Changes:
* Add outputFormat and outputCompression fields to OpenAiSdkImageOptions
* Add getters, setters, and builder methods for the new fields
* Update equals, hashCode, and toString methods
* Update toOpenAiImageGenerateParams to include the new parameters
* Update Builder.from() and Builder.merge() to handle new fields
* Add test coverage for the new properties
* Update documentation with new properties and gpt-image-1 example

Signed-off-by: Igor Bari <mucsi96@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants