Loading...
Loading...
Generate images from text prompts and edit existing images using OpenRouter's image generation models. Use when the user asks to create, generate, or make an image, picture, or illustration from a description, or wants to edit, modify, transform, or alter an existing image with a text prompt.
npx skill4agent add openrouterteam/skills openrouter-imagesOPENROUTER_API_KEYcd <skill-path>/scripts && npm install| User wants to... | Script | Example |
|---|---|---|
| Generate an image from a text description | | "Create an image of a sunset over mountains" |
| Generate with specific aspect ratio | | "Make a wide landscape image of a forest" |
| Generate with a different model | | "Generate using gemini-2.5-flash-image" |
| Edit or modify an existing image | | "Make the sky purple in photo.png" |
| Transform an image with instructions | | "Add a party hat to the animal in this image" |
cd <skill-path>/scripts && npx tsx generate.ts "a red panda wearing sunglasses"
cd <skill-path>/scripts && npx tsx generate.ts "a futuristic cityscape at night" --aspect-ratio 16:9
cd <skill-path>/scripts && npx tsx generate.ts "pixel art of a dragon" --output dragon.png
cd <skill-path>/scripts && npx tsx generate.ts "a watercolor painting" --model google/gemini-2.5-flash-image| Flag | Description | Default |
|---|---|---|
| OpenRouter model ID | |
| Output file path | |
| Aspect ratio (e.g. | Model default |
| Image size (e.g. | Model default |
cd <skill-path>/scripts && npx tsx edit.ts photo.png "make the sky purple"
cd <skill-path>/scripts && npx tsx edit.ts avatar.jpg "add a party hat" --output avatar-hat.png
cd <skill-path>/scripts && npx tsx edit.ts scene.png "convert to watercolor style" --model google/gemini-2.5-flash-image| Flag | Description | Default |
|---|---|---|
| OpenRouter model ID | |
| Output file path | |
| Aspect ratio (e.g. | Model default |
| Image size (e.g. | Model default |
.png.jpg.jpeg.webp.gif{
"model": "google/gemini-3.1-flash-image-preview",
"prompt": "a red panda wearing sunglasses",
"images_saved": ["/absolute/path/to/image-20260305-143022.png"],
"count": 1
}{
"model": "google/gemini-3.1-flash-image-preview",
"source_image": "photo.png",
"prompt": "make the sky purple",
"images_saved": ["/absolute/path/to/image-20260305-143055.png"],
"count": 1
}POST /api/v1/responsesmodalities: ["image", "text"]image_generation_call{
"type": "image_generation_call",
"id": "imagegen-abc123",
"status": "completed",
"result": "<base64-encoded image data>"
}messageoutputgoogle/gemini-3.1-flash-image-preview--model <id>openrouter-modelscd <openrouter-models-skill-path>/scripts && npx tsx search-models.ts --modality image