agentsclimarketplace

Sub2api 4k image generator ts

Skill fengyunzaidushi/sub2api-4k-image-generator-ts/sub2api-4k-image-generator-ts

TypeScript-only skill for generating and debugging high-resolution AI images through sub2api OpenAI-compatible APIs. Use this whenever the user wants a TS/Node sub2api image generator, 4K image generation, stream=true /v1/images/generations or /v1/responses image generation, Cloudflare 524 timeout avoidance, partial image capture, or SUB2API_BASE_URL/SUB2API_API_KEY based image generation.From its SKILL.md

Install
npx -y skills add fengyunzaidushi/sub2api-4k-image-generator-ts --skill sub2api-4k-image-generator-ts

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

3 things to look at

  • reads credentialsReads from 3 credential sources: `.env` and 2 more.
  • 11 stars11 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
  • runs commandsInstructs the agent to run 4 commands, including `node .\dist\openai_4k_image_generator.js` and 3 more.

SKILL.md

2.2 KB, 475 tokens by cl100k_base, as published. Nobody here has run it

sub2api 4K Image Generator TS

Use this skill when the user wants TypeScript/Node image generation through sub2api rather than Codex's built-in image tool.

Workflow

  1. Work from the skill root that contains this SKILL.md.
  2. Ensure .env or the process environment provides:
SUB2API_BASE_URL=https://your-sub2api.example.com
SUB2API_API_KEY=sk-...
  1. Prefer the compiled JS entrypoint for normal use:
node .\dist\openai_4k_image_generator.js `
  "剑仙,云海,发光长剑,无文字无水印" `
  --size 3840x2160 `
  --quality high `
  --output-dir output
  1. For development, run the TypeScript source:
npx tsx .\scripts\openai_4k_image_generator.ts "test prompt" --dry-run
  1. If Node/TypeScript is inconvenient, use the bundled Python request script:
python .\openai_4k_image_request.py "test prompt" --dry-run

Install python-dotenv first if Python reports that dotenv is missing.

  1. Report final image paths, partial image paths, and any Cloudflare/SSE diagnostic in plain language. Never print full API keys.

Notes

  • Replace SUB2API_BASE_URL with the user's own deployed sub2api domain.
  • Treat 4K as explicit pixel sizes: 3840x2160 or 2160x3840.
  • Streaming is enabled by default to avoid Cloudflare 524 during slow 4K generation.
  • *-partial-XX.png files are diagnostics only; final images are saved as <prefix>-XX.png.
  • openai_4k_image_request.py is a standalone Python fallback that supports /v1/images/generations, /v1/responses, --input-image, streaming SSE, and --dry-run.
  • Run npm test after editing the skill.
  • The bundled dist/ directory is enough for normal use; use scripts/ only for development or debugging.

What ships with it: 16 files

40.8 KB alongside SKILL.md, 12 of them executable

agents/

scripts/

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.