Sub2api 4K Image Generator TS
CLI de imágenes 4K en streaming para endpoints sub2api que evita los timeouts 524 de Cloudflare
Probado · Funciona
Qué hace
Una TypeScript CLI plus skill instructions para generating high-resolution images through a sub2api OpenAI-compatible endpoint, using SSE streaming so slow 4K renders do not hit a Cloudflare 524, y saving partial-image frames as diagnostics. Se activa on sub2api image generation, SUB2API_BASE_URL/SUB2API_API_KEY workflows, /v1/images/generations o /v1/responses calls, y 524 timeout debugging. You supply your own sub2api deployment y key.
Informe de la prueba
Se ejecutó it against a local mock de an OpenAI-compatible endpoint sitting behind a Cloudflare-style edge that returns 524 cuando no bytes flow for two seconds while generation takes five. El no-skill script I wrote first — a plain non-streaming POST a /v1/images/generations followed by res.json() — got HTTP 524 y saved nothing; el skill's bundled dist entrypoint defaulted a stream=true, logged the partial-image event at 1.5 s y wrote the decoded PNG. El shipped dist/ runs on bare Node con zero npm install, npm test passes 9/9, el Python fallback's --dry-run prints the identical payload, y la API key es masked a *** in stdout as promised. What it cannot do for you es la actual image: there is no public endpoint, so a SUB2API_BASE_URL y key for your own deployment son mandatory, y no real 4K render fue produced in this test.
Probado el: 2026-08-10 · Claude Code 2.x (agent harness)
Instalación
git clone https://github.com/fengyunzaidushi/sub2api-4k-image-generator-ts.git mkdir -p ~/.claude/skills cd sub2api-4k-image-generator-ts && cp -r sub2api-4k-image-generator-ts ~/.claude/skills/sub2api-4k-image-generator-ts
Comandos y prompts de ejemplo
/sub2api-4k-image-generator-tsCLI de imágenes 4K en streaming para endpoints sub2api que evita los timeouts 524 de Cloudflare
Los skills se activan con peticiones en lenguaje natural, sin comandos que memorizar. Tras instalarlo, prompts como estos lo activan (en inglés):
Generate a 3840x2160 image through the sub2api SSE streaming CLIRender a 4K image via sub2api without hitting a Cloudflare 524Set SUB2API_BASE_URL and generate a high-res image with the CLI