ImageRouter Image Generation
name: imagerouter
by dawe35 · published 2026-03-22
$ claw add gh:dawe35/dawe35-image-router---
name: imagerouter
description: Generate AI images with any model using ImageRouter API (requires API key).
homepage: https://imagerouter.io
metadata: {"clawdbot":{"emoji":"🎨","requires":{"bins":["curl"]}}}
---
# ImageRouter Image Generation
Generate images with any model available on ImageRouter using curl commands.
Available models
The `test/test` model is a free dummy model that is used for testing the API. It is not a real model, therefore you should use other models for image generation.
Get top 10 most popular models:
curl -X POST 'https://backend.imagerouter.io/operations/get-popular-models'Search available models by name:
curl "https://api.imagerouter.io/v1/models?type=image&sort=date&name=gemini"Get all available models:
curl "https://api.imagerouter.io/v1/models?type=image&sort=date&limit=1000"Quick Start - Text-to-Image
Basic generation with JSON endpoint:
curl 'https://api.imagerouter.io/v1/openai/images/generations' \
-H 'Authorization: Bearer YOUR_API_KEY' \
--json '{
"prompt": "a serene mountain landscape at sunset",
"model": "test/test",
"quality": "auto",
"size": "auto",
"response_format": "url",
"output_format": "webp"
}'Unified Endpoint (Text-to-Image & Image-to-Image)
Text-to-Image with multipart/form-data:
curl 'https://api.imagerouter.io/v1/openai/images/edits' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-F 'prompt=a cyberpunk city at night' \
-F 'model=test/test' \
-F 'quality=high' \
-F 'size=1024x1024' \
-F 'response_format=url' \
-F 'output_format=webp'Image-to-Image (with input images):
curl 'https://api.imagerouter.io/v1/openai/images/edits' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-F 'prompt=transform this into a watercolor painting' \
-F 'model=test/test' \
-F 'quality=auto' \
-F 'size=auto' \
-F 'response_format=url' \
-F 'output_format=webp' \
-F 'image[]=@/path/to/your/image.webp'Multiple images (up to 16):
curl 'https://api.imagerouter.io/v1/openai/images/edits' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-F 'prompt=combine these images' \
-F 'model=test/test' \
-F 'image[]=@image1.webp' \
-F 'image[]=@image2.webp' \
-F 'image[]=@image3.webp'With mask (some models require mask for inpainting):
curl 'https://api.imagerouter.io/v1/openai/images/edits' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-F 'prompt=fill the masked area with flowers' \
-F 'model=test/test' \
-F 'image[]=@original.webp' \
-F 'mask[]=@mask.webp'Parameters
- `url` (default) - Returns hosted URL
- `b64_json` - Returns base64-encoded image
- `b64_ephemeral` - Base64 without saving to logs
Response Format
{
"created": 1769286389027,
"data": [
{
"url": "https://storage.imagerouter.io/fffb4426-efbd-4bcc-87d5-47e6936bf0bb.webp"
}
],
"latency": 6942,
"cost": 0.004
}Endpoint Comparison
| Feature | Unified (/edits) | JSON (/generations) |
|---------|------------------|---------------------|
| Text-to-Image | ✅ | ✅ |
| Image-to-Image | ✅ | ❌ |
| Encoding | multipart/form-data | application/json |
Tips
Examples by Use Case
Quick test generation:
curl 'https://api.imagerouter.io/v1/openai/images/generations' \
-H 'Authorization: Bearer YOUR_API_KEY' \
--json '{"prompt":"test image","model":"test/test"}'Download image directly:
curl 'https://api.imagerouter.io/v1/openai/images/generations' \
-H 'Authorization: Bearer YOUR_API_KEY' \
--json '{"prompt":"abstract art","model":"test/test"}' \
| jq -r '.data[0].url' \
| xargs curl -o output.webpMore tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...