360 Secure SkillHub
360 安全技能中心

Crazyrouter Image Gen

该 Skill 通过 Crazyrouter 接口调用 DALL-E 3、GPT Image、Gemini、Imagen 等图像模型,根据文本提示词生成图像,支持选择模型、尺寸、数量和质量,并将结果保存为本地图片文件;使用前需配置 CRAZYROUTER_API_KEY。

xujfcn
xujfcn
热度 45.71
最近更新 2026-05-17 13:44:19
分类:创作依赖:代码执行 / 读写文件 / 第三方 API应用场景:图像生成 / 品牌素材

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add crazyrouter-image-gen
Metadata
name
crazyrouter-image-gen
description
AI image generation via Crazyrouter API. Supports DALL-E 3, GPT Image, Gemini, Imagen 4. Text-to-image with aspect ratio, size, and model selection. Use when user asks to generate, create, or draw an image. Requires environment variable CRAZYROUTER_API_KEY (get at https://crazyrouter.com).

Image Generation via Crazyrouter

Generate images using multiple AI models through Crazyrouter — one API key, all providers.

Supported Models

Model ID Best For
DALL-E 3 dall-e-3 General, creative
GPT Image 1 gpt-image-1 GPT native, high quality
GPT-4o Image gpt-4o-image Fast, versatile
Gemini 2.5 Flash Image gemini-2.5-flash-image Fast, free tier
Gemini 3.1 Flash Image gemini-3.1-flash-image-preview Latest Gemini
Gemini 3 Pro Image gemini-3-pro-image-preview Pro quality
Imagen 3.0 imagen-3.0-generate-002 Google Imagen
Imagen 4.0 imagen-4.0-generate-001 Google's latest
Imagen 4.0 Ultra imagen-4.0-ultra-generate-001 Highest quality
Sora Image sora_image OpenAI Sora static

Script Directory

Agent Execution:

  1. SKILL_DIR = this SKILL.md file's directory
  2. Script path = ${SKILL_DIR}/scripts/main.mjs

Step 0: Check API Key ⛔ BLOCKING

[ -n "${CRAZYROUTER_API_KEY}" ] && echo "key_present" || echo "not_set"
Result Action
key_present Continue to Step 1
not_set Ask user to set CRAZYROUTER_API_KEY. Get key at https://crazyrouter.com

Step 1: Generate Image

node ${SKILL_DIR}/scripts/main.mjs --prompt "your prompt" --image output.png

Options

Option Description Default
--prompt <text> Image description (required) —
--image <path> Output file path (required) —
--model <id> Model to use dall-e-3
--size <WxH> Image size 1024x1024
--n <count> Number of images (1-4) 1
--quality <level> Quality: standard/hd standard

Examples

# Basic generation
node ${SKILL_DIR}/scripts/main.mjs --prompt "A sunset over mountains" --image sunset.png

# With GPT Image 1
node ${SKILL_DIR}/scripts/main.mjs --prompt "Cyberpunk city" --image city.png --model gpt-image-1

# With Imagen 4.0 Ultra (highest quality)
node ${SKILL_DIR}/scripts/main.mjs --prompt "Professional headshot" --image photo.png --model imagen-4.0-ultra-generate-001

# With Gemini 3 Pro
node ${SKILL_DIR}/scripts/main.mjs --prompt "Landscape" --image wide.png --model gemini-3-pro-image-preview

# Multiple images
node ${SKILL_DIR}/scripts/main.mjs --prompt "Logo concepts" --image logo.png --n 4

Step 2: Verify Output

After generation, confirm the image was saved:

ls -la <output_path>

Show the image to the user or report the file path.