Package Exports
- @huwatermelon/openclaw-gpt-image-proxy
- @huwatermelon/openclaw-gpt-image-proxy/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@huwatermelon/openclaw-gpt-image-proxy) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
OpenClaw GPT Image Proxy
OpenClaw plugin for huwatermelon GPT image proxy. It exposes a gpt_image_generate
tool that supports both text-to-image and image-to-image through the proxy async
job API.
It uses the proxy async job API:
POST /v1/images/jobsGET /v1/images/jobs/{job_id}
This avoids Cloudflare's long synchronous request timeout.
Install
From npm:
npm install -g @huwatermelon/openclaw-gpt-image-proxy
openclaw plugins install @huwatermelon/openclaw-gpt-image-proxyFrom a local checkout:
openclaw plugins install /path/to/openclaw-gpt-image-proxyFrom a tarball:
npm pack
openclaw plugins install ./huwatermelon-openclaw-gpt-image-proxy-0.1.0.tgzRestart the OpenClaw gateway after installing.
Configure
In ~/.openclaw/openclaw.json:
{
"plugins": {
"entries": {
"openclaw-gpt-image-proxy": {
"enabled": true,
"config": {
"baseUrl": "https://proxy.huwatermelon.top/v1",
"apiKey": "sk-...",
"model": "gpt-image-2",
"timeoutMs": 600000
}
}
}
}
}baseUrl accepts either https://host or https://host/v1.
You can also keep the key out of config:
export GPT_IMAGE_PROXY_API_KEY=sk-...Use
Ask OpenClaw to call gpt_image_generate.
Tool parameters:
prompt: required text promptinput_images: optional array of local paths,file://URLs, HTTPS URLs, ordata:image/...;base64,...URLsmodel: optional model override, defaults togpt-image-2output_dir: optional local output directory
Generated images are saved under:
~/.openclaw/generated-images/openclaw-gpt-image-proxy/The tool returns an OpenClaw image result plus a MEDIA:<path> marker.
If a future OpenClaw runtime exposes registerImageGenerationProvider, this
plugin also registers provider id gpt-image-proxy; current OpenClaw releases
tested locally only expose the tool API.
Options
baseUrl: proxy API base URL, defaults tohttps://proxy.huwatermelon.top/v1apiKey: proxy API keymodel: defaults togpt-image-2backend: defaults tocliproxyapipollIntervalMs: defaults to2000maxPollIntervalMs: defaults to5000timeoutMs: defaults to600000