热度观测:等待有效的新观测。

← 返回内容列表
GGitHub采集材料

OpenCode调用ChatGPT生成图片

发布时间未知 · 北京时间

图像与视频

有实践材料可继续查看

代码仓库安装说明使用说明示例代码

原文与观测指标

1 个来源
GGitHub

OpenCode调用ChatGPT生成图片

yuji-hatakeyama
查看原文
星标115采集时的累计值
每小时增长待观察星标 / 小时 · 观测区间平均值
最近提交10-27 08:58提交时间不是项目发布时间

发布时间:未知 · 首次发现 10-27 15:48 · 北京时间

指标采集:10-27 15:48 · 指标已取得

项目文档有线索安装说明有线索使用说明有线索示例有线索

仅反映文档与示例线索,未实际运行项目。

摘要

该插件让 OpenCode 通过 ChatGPT 订阅调用图像生成与编辑,可在提示词中附带最多五张参考图,用于风格参考、编辑或合成。材料提供配置示例,并说明可通过代理地址转发图像生成和编辑请求。

摘要由 AI 生成,请以原文为准。
观测历史 · 最近 1 条 展开 / 收起

缺失不计为零;增长只比较同一指标来源的有效记录,按实际间隔折算每小时。上游缓存可能延迟数值更新。

采集时间 · 北京时间指标数值来源状态
10-27 15:48:16Star115GitHub 公开页面已取得
采集原文 展开 / 收起

opencode-gpt-imagegen

OpenCode plugin: image generation via your ChatGPT subscription
项目说明 展开 / 收起
opencode-gpt-imagegen ⚠️ Plugin versions before 0.1.13 no longer generate images. GPT-5.5 retired from Codex with ChatGPT sign-in on October 14, 2026, and those versions use it. Follow the update steps to install the latest version. 📣 1.0.0 changes how gpt_imagegen is used. size now accepts only seven fixed sizes, and quality is removed. See the release notes for all changes. 📣 OpenAI API key support is on hold. This plugin supports only ChatGPT sign-in. If you need API key support, please share your use case in #120. Bring ChatGPT Images 2.0 (gpt-image-2) to OpenCode. Use it through your ChatGPT subscription (no API costs!). Highlights Subscription-friendly. Generations ride on the same Codex backend channel OpenCode already uses for ChatGPT subscription chat — billed against your existing ChatGPT Plus, Pro, or Business plan, not your API credits. Reference images. Pass up to five input images alongside the prompt for style guidance, edit targets, or compositing inputs. Transparent backgrounds. Ask for a transparent background, a cutout, or background removal, and the agent passes background: "transparent" to get an RGBA PNG. The cutout edges can be rough, with a faint semi-transparent halo. For a clean cutout, generate the image on a plain background and remove the background yourself. Installation Add this plugin to your OpenCode config. For example, in opencode.json: { "$schema": "https://opencode.ai/config.json", "plugin": ["opencode-gpt-imagegen"] } OpenCode auto-installs the package via Bun on next launch — no separate npm install step is needed. The plugin requires OpenCode to be authenticated with ChatGPT, unless you send requests through a proxy as described in Sending requests through a proxy. Sending requests through a proxy Set baseURL if you reach ChatGPT through a gateway rather than signing OpenCode in to ChatGPT yourself, for example a local proxy that holds one or more ChatGPT sign-ins and spreads requests across them. In that setup OpenCode's auth.json usually has no ChatGPT sign-in, and calling chatgpt.com directly would bypass the gateway. { "plugin": [["opencode-gpt-imagegen", { "baseURL": "http://127.0.0.1:3457/v1" }]] } With baseURL set, the plugin does not read auth.json and sends the proxy no credentials. It sends the same requests it would send to ChatGPT, to <baseURL>/images/generations, or to <baseURL>/images/edits when reference images are given. Your proxy works with this option if it: accepts those two POST routes without an Authorization header; forwards the JSON body unchanged to the Codex images endpoints (https://chatgpt.com/backend-api/codex/images/generations and /edits), signed in with a ChatGPT account. The body has prompt, model, quality, size and background, plus images (a list of { "image_url": "data:..." }) for edits; answers with the backend's JSON, in which data[0].b64_json holds the PNG. Any non-2xx status is reported as an error together with the start of the response body. The request takes as long as the backend needs to draw the image, often 30 seconds or more, so the proxy must not time it out early. Updating the plugin OpenCode caches npm plugins, so restarting it may keep an older version. To update this plugin: Check the plugin entry in your OpenCode config. Use "opencode-gpt-imagegen" or "opencode-gpt-imagegen@latest" to request the latest version. If you pinned a version, remove the version suffix or change it to the version you want to install. Quit OpenCode completely. If your entry is unversioned or uses @latest, delete the cached directory ~/.cache/opencode/packages/opencode-gpt-imagegen@latest/. Restart OpenCode to install the requested version. If you use an unversioned entry or @latest but do not have that directory, see OpenCode's cache-clearing instructions for other cache layouts. Usage Just ask your agent in natural language and gpt_imagegen will be picked up. The four examples below are the actual prompts and outputs of this repo's e2e test suite — see tests/e2e/gpt_imagegen.test.ts for the assertions. The e2e prompts name the tool and the output path explicitly to keep the test runs predictable. In normal use, you can just describe the image you want. Example A — generate Use the gpt_imagegen tool to generate an image at character.png. Content: a man wearing a navy-blue samue and a red hachimaki headband, standing in a garden of cherry blossoms in full bloom. Style: hand-drawn 90s Japanese animation style. Size: 1024x1536 (portrait). Example B — auto-versioning gpt_imagegen never overwrites an existing file: when the out path is already taken, it picks -v2, -v3, … instead. Use the gpt_imagegen tool to generate an image at character.png. Content: a woman wearing a yellow yukata and holding a red wagasa parasol, standing in a garden at night with fireflies dancing around her. Style: hand-drawn 90s Japanese animation style. Size: 1536x1024 (landscape). The previous character.png is left untouched; the new image lands at character-v2.png. Example C — feed existing image files as input Pass up to five image paths via the images argument and the model uses them as references for the next generation — for style guidance, characters to keep, scenes to extend, and so on. Use the gpt_imagegen tool to generate an image at together.png. Pass ./character.png and ./character-v2.png in the images argument. Content: the man from Image 1 (navy samue + red hachimaki) and the woman from Image 2 (yellow yukata + red wagasa) standing side by side on the engawa veranda of an old Japanese house, smiling at the viewer. Preserve each character's outfit, hairstyle, and props exactly. Style: hand-drawn 90s Japanese animation style. Size: 1672x941. Example D — transparent background Ask for a transparent background, and the agent passes background: "transparent" to get an RGBA PNG. Use the gpt_imagegen tool to generate an image at sticker.png. Content: a sticker of a red paper lantern with a transparent background. Style: hand-drawn 90s Japanese