본문으로 건너뛰기
cccskills
무료GitHub에 공개

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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구CloudflareOpenAI
설치 방법 보기

포함된 파일(28)

  • SKILL.md2.2 KB
  • .env.example131 B
  • agents/openai.yaml224 B
  • dist/args.js6.2 KB
  • dist/cli.js2.6 KB
  • dist/env.js1.0 KB
  • dist/errors.js123 B
  • dist/openai_4k_image_generator.js398 B
  • dist/payload.js2.2 KB
  • dist/request.js2.7 KB
  • dist/save.js1.9 KB
  • dist/sse.js4.0 KB
  • dist/types.js11 B
  • openai_4k_image_request.py13.3 KB
  • package-lock.json16.4 KB
  • package.json783 B
  • scripts/args.ts5.8 KB
  • scripts/cli.ts2.6 KB
  • scripts/env.ts995 B
  • scripts/errors.ts120 B
  • scripts/openai_4k_image_generator.ts394 B
  • scripts/payload.ts2.2 KB
  • scripts/request.ts2.6 KB
  • scripts/save.ts2.1 KB
  • scripts/sse.ts3.9 KB
  • scripts/test.ts4.3 KB
  • scripts/types.ts1.1 KB
  • tsconfig.json304 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

이 스킬의 문제 신고