Skip to content

Add selectable OpenAI Responses API image generation mode#223

Open
tianheil3 wants to merge 1 commit into
ATH-MaaS:mainfrom
tianheil3:add-openai-responses-image-api
Open

Add selectable OpenAI Responses API image generation mode#223
tianheil3 wants to merge 1 commit into
ATH-MaaS:mainfrom
tianheil3:add-openai-responses-image-api

Conversation

@tianheil3

Copy link
Copy Markdown

Summary

Adds a selectable OpenAI image generation API mode for direct API media generation:

  • images: existing /v1/images/generations flow
  • responses: new /v1/responses flow using the image_generation tool

This helps OpenAI-compatible gateways and newer image models that expose image generation through the Responses API rather than the legacy Images API.

Changes

  • Adds api_providers.openai.image_api_mode configuration
  • Adds an OpenAI image API selector in the Web UI settings
  • Passes the selected mode through APIProviderMediaService and ImageClient
  • Implements Responses API image generation in ImageGPT
  • Supports extracting generated images from nested response payloads as URL or base64
  • Keeps the existing Images API behavior as the default for backward compatibility

Verification

  • Ran Python syntax checks on changed files:
    • pixelle_video/config/schema.py
    • pixelle_video/services/api_media.py
    • pixelle_video/services/api_services/config.py
    • pixelle_video/services/api_services/image_client.py
    • pixelle_video/services/api_services/image_gpt.py
    • web/components/settings.py
  • Verified Responses API mode with an OpenAI-compatible gateway and gpt-image-2; generation returned a local PNG successfully.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants