{"repo":"fengyunzaidushi/sub2api-4k-image-generator-ts","free":true,"listed":false,"github":"https://github.com/fengyunzaidushi/sub2api-4k-image-generator-ts","clone":"git clone https://github.com/fengyunzaidushi/sub2api-4k-image-generator-ts.git","description":"Codex skill and TypeScript CLI for 4K AI image generation through self-hosted sub2api OpenAI-compatible endpoints, with streaming, SSE, partial image capture, and Cloudflare 524 timeout mitigation.","language":"TypeScript","stars":12,"topics":["4k-image-generation","agent-skills","ai-image-generator","codex-skill","codex-skills","gpt-image","gpt-image-generation","high-resolution-images","image-generation","nodejs"],"license":"MIT","category":"media-processing","readme_excerpt":"sub2api 4K Image Generator TS Skill 这是一个 Codex 可用的 agent skill，同时也是一个 TypeScript CLI，用来通过 sub2api 的 OpenAI-compatible endpoint 生成、流式接收、保存和调试高分辨率 AI 图片。 当你需要基于本地 SUB2API BASE URL / SUB2API API KEY 调用 /v1/images/generations 或 /v1/responses 时可以使用它，尤其适合 3840x2160 、 2160x3840 这类 4K 输出、streaming partial-image 诊断，以及 Cloudflare 524 timeout 排查。 安装 只安装当前 skill 到 Codex： 正确安装后，skill 目录里应该包含 SKILL.md 、 dist/ 、 scripts/ 和 package.json 。如果你只看到 SKILL.md ，说明安装到了旧的 root-level layout，请使用下面的更新命令刷新。 安装到所有检测到的 agent： 只查看仓库中可被检测到的 skill，不安装： 不安装，直接生成使用该 skill 的 prompt： 更新 推荐刷新 Codex 安装： 刷新所有检测到的 agent： 为什么这里使用 skills add 而不是 skills update ： npx skills update sub2api-4k-image-generator-ts -p -y 可能会出现 Failed to check for deleted skills 或 Failed to update 。遇到这种情况时，使用上面的 skills add ... -y --copy 命令覆盖刷新到仓库最新版本。 使用 安装后的示例提示词： 这个 skill 会： - 检查本地 .env 或 process environment 中的 SUB2API BASE URL 和 SUB2API API KEY - 为 3840x2160 或 2160x3840 生成明确的 4K payload - 默认使用 streaming request，降低慢速 4K 任务遇到 Cloudflare 524 的概率 - 从 SSE event 中捕获 final image 和 partial diagnostic image - 支持 /v1/images/generations 和 /v1/responses - 返回保存的图片路径和诊断信息，同时不会打印完整 API key CLI 设置 在运行 CLI 的目录创建或更新 .env ： 把 https://your-sub2api.example.com 替换成你自己的 sub2api 部署域名。也可以在命令里用 --base-url https://your-sub2api.example.com 覆盖。 开发时安装依赖： CLI 运行 优先使用已编译的 JavaScript： 也可以直接运行 TypeScript source： Dry run： Python 请求脚本 仓库还包含一个独立的 Python 请求脚本： 这个脚本适合在不想进入 Node/TypeScript 工具链时，直接发起 sub2api/OpenAI-compatible 图片生成请求。它会读取 .env 中的 SUB2API BASE URL 、 SUB2API API KEY ","default_branch":null,"files":null,"tree":[],"storefront":"/r/fengyunzaidushi","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/fengyunzaidushi/sub2api-4k-image-generator-ts/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}