Multi-provider image generation and editing. Default provider: Tuzi (兔子API, api.tu-zi.com).
Agent Execution:
SKILL_DIR = this SKILL.md file's directory
${SKILL_DIR}/scripts/main.ts
Run the script using absolute path (do NOT cd to skill directory first):
Generate new image:
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "your image description" --filename "output.png" [--resolution 1K|2K|4K] [--provider tuzi|google|openai|dashscope|replicate] [--model MODEL_ID]
Edit existing image:
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "editing instructions" --filename "output.png" --input-image "path/to/input.png" [--resolution 1K|2K|4K]
Important: Always run from the user's current working directory so images are saved where the user is working.
Goal: fast iteration without burning time on 4K until the prompt is correct.
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "" --filename "yyyy-mm-dd-hh-mm-ss-draft.png" --resolution 1K
--input-image for every iteration until you're happy.
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "" --filename "yyyy-mm-dd-hh-mm-ss-final.png" --resolution 4K
| Option | Description |
|--------|-------------|
| --prompt , -p | Prompt text (required) |
| --filename , -f | Output filename (required) |
| --input-image , -i | Input image for editing |
| --resolution 1K\|2K\|4K, -r | Output resolution (default: 1K) |
| --provider tuzi\|google\|openai\|dashscope\|replicate | Force provider (default: auto-detect, Tuzi first) |
| --model , -m | Model ID |
| --api-key , -k | API key (overrides env var) |
Map user requests:
1K
1K
2K
4K
--provider specified → use it
--api-key provided (no --provider) → Google (direct Gemini API)
| Model ID | Quality | Notes |
|----------|---------|-------|
| gemini-3-pro-image-preview | 1k/2k/4k | Default. High quality |
| gemini-3.1-flash-image-preview | 1k/2k/4k | Fast, extended aspect ratios |
| gemini-3-pro-image-preview-vip | 1k built-in | VIP |
| gemini-3-pro-image-preview-2k-vip | 2k built-in | VIP |
| gemini-3-pro-image-preview-4k-vip | 4k built-in | VIP |
| Variable | Description |
|----------|-------------|
| TUZI_API_KEY | Tuzi API key (https://api.tu-zi.com) |
| TUZI_IMAGE_MODEL | Tuzi default model |
| TUZI_BASE_URL | Custom Tuzi endpoint |
| GEMINI_API_KEY | Google Gemini API key |
| GOOGLE_API_KEY | Google API key (alias) |
| OPENAI_API_KEY | OpenAI API key |
| DASHSCOPE_API_KEY | DashScope API key |
| REPLICATE_API_TOKEN | Replicate API token |
Load Priority: CLI --api-key > env vars > > ~/.tuzi-skills/.env
When the user wants to modify an existing image:
--input-image parameter with the path to the image
For generation: Pass user's image description as-is to --prompt. Only rework if clearly insufficient.
For editing: Pass editing instructions in --prompt (e.g., "add a rainbow in the sky")