About this project

opencode-gpt-imagegen is an unofficial OpenCode plugin that brings ChatGPT Images 2.0 (gpt-image-2) to OpenCode. It allows users to generate images through their ChatGPT subscription (no extra API costs) or via the OpenAI API (coming soon). Key features include natural language prompts, support for multiple reference images for style guidance or edits, and automatic file versioning to avoid overwriting existing files. The plugin reuses OpenCode's existing Codex backend channel for ChatGPT subscription chat, reading auth from OpenCode's standard auth.json. Installation is simple via OpenCode config, and usage is as easy as asking the agent in natural language. The roadmap includes API key support and pixel-precise mask inpainting.