# Image Router MCP

> Image Router lets your AI agent automatically select the best image model for any prompt. It handles everything from basic text-to-image generation to advanced editing and upscaling. You can list models by category, apply styles, and manage the entire workflow from one place. It routes requests to the optimal backend, saving you time and ensuring high-quality results every time.

## Overview
- **Category:** industry-titans
- **Price:** Free
- **Tags:** generative-ai, image-generation, model-aggregation, prompt-engineering, stable-diffusion, dall-e

## Description

Image Router handles all your AI image needs, making sure your agent uses the best model for every prompt. You'll use `check_imagerouter_status` to confirm the API connection is live. To start generating, your agent uses `generate_image` to create a new picture just from a text prompt. If you need more control, `generate_image_advanced` lets your agent specify size, seed, steps, and negative prompts. Need to tweak an existing photo? Use `edit_image` to modify it with a descriptive text prompt. You can also create a visually similar but different version using `generate_variation`. When you want to beef up the resolution, `upscale_image` increases the pixel count and detail of an existing image. For model management, your agent can use `list_models` for a full rundown of supported models, or `list_models_by_category` to filter by specific styles or technical types. To see what styles are available, use `list_styles`. To learn about a specific model, your agent runs `get_model`. You'll use `get_generation_status` to check on any long-running image generation jobs. Finally, you'll use `get_generation_status` to check on any long-running image generation jobs.

## Tools

### check_imagerouter_status
Verifies the API connection and operational status of the Image Router server.

### edit_image
Modifies an existing image using a descriptive text prompt.

### generate_image
Creates a new image solely from a text prompt.

### generate_image_advanced
Generates an image using full control over parameters like size, seed, steps, and negative prompts.

### generate_variation
Creates a visually similar but distinct version of an existing image.

### get_generation_status
Checks the current status of an asynchronous image generation job.

### get_model
Retrieves specific details about a single available image generation model.

### list_models
Provides a complete list of all image models supported by the router.

### list_models_by_category
Lists available image models, filtered by predefined artistic or technical categories.

### list_styles
Retrieves a catalog of available artistic styles that can be applied to generations.

### upscale_image
Increases the resolution and detail of an existing image.

## Prompt Examples

**Prompt:** 
```
Generate an image of a futuristic city at sunset.
```

**Response:** 
```
Image generated! 1024x1024 using Stable Diffusion XL. The scene shows towering glass buildings with warm golden light reflecting off surfaces.
```

**Prompt:** 
```
List all available image models.
```

**Response:** 
```
18 models available: Stable Diffusion XL, DALL-E 3, Playground v2.5, DreamShaper XL, and 14 more. Filter by category for specific styles.
```

**Prompt:** 
```
Upscale this image to 2x resolution.
```

**Response:** 
```
Image upscaled from 512x512 to 1024x1024. Details enhanced with AI super-resolution.
```

## Capabilities

### Generate images from text
The agent creates a new image using a text prompt and the best available model.

### Refine or modify existing images
The agent edits a specific image by applying descriptive changes or adjusting parameters.

### Control generation parameters
The agent uses advanced options to define size, seed, steps, and negative prompts for maximum control.

### Manage and select models
The agent lists and filters available image models by category or specific criteria.

### Adjust image resolution
The agent increases the pixel count of a generated image using an upscaling tool.

## Use Cases

### Creating a full campaign set of ad visuals
A marketing manager needs 10 variations of a product shot in 5 different styles. Instead of manually running 50 API calls, they ask their agent: 'Generate 10 variations of the watch, applying the 'cinematic' style.' The agent uses `list_models_by_category` to select a suitable model, then runs `generate_variation` repeatedly, saving the entire set of assets.

### High-res assets for a magazine spread
A concept artist needs a base image of a futuristic city, but the final print needs 4K resolution. They use the agent to run `generate_image` first, then immediately pipe the result into `upscale_image` to ensure the final output meets the required print quality.

### Iterative design of character concept art
A game developer needs to iterate on a character's appearance. They start with a prompt using `generate_image_advanced`. They then use `generate_variation` to test different poses and finally use `edit_image` to change the character's outfit color without starting over.

### Building a style guide for a brand
A brand strategist wants to test which visual style works best. They ask the agent to 'Generate three images of a coffee cup, one in the 'minimalist' style, one in the 'pop art' style, and one in the 'oil painting' style.' The agent uses `list_styles` and then executes the necessary generations to build the comparison set.

## Benefits

- You don't have to guess which model works best. The Image Router automatically selects the optimal backend for your prompt, whether you need a hyper-realistic photo or a watercolor painting.
- Complex workflows are simple. You can generate a base image using `generate_image`, then run `generate_variation` on it, and finally use `upscale_image` to get print-ready output—all in one agent flow.
- Full control without the overhead. Need to set the negative prompt or define the exact seed? Use `generate_image_advanced` to lock down every parameter without needing separate tools.
- Manage models like a library. Use `list_models` or `list_models_by_category` to see what's available, letting your agent choose the best option for the job.
- Handle slow tasks gracefully. If a generation takes minutes, use `get_generation_status` to check progress instead of waiting for a timeout error.
- Refine your output iteratively. If the first image is close but not perfect, use `edit_image` to make targeted changes before running a final pass.

## How It Works

The bottom line is, you stop worrying about which AI model works best for your prompt; the router handles the selection and execution for you.

1. Tell your agent what you need: a new image, an edit, or an upscale. Specify the prompt, style, or existing image.
2. The Image Router agent analyzes the request, determines the best model (e.g., DALL-E 3 for realism, Stable Diffusion for art), and executes the necessary tool call.
3. The agent returns the resulting image data and metadata, ready for your next step or final output.

## Frequently Asked Questions

**How do I use generate_image_advanced with Image Router?**
You specify the desired parameters (size, seed, steps) directly in the prompt. `generate_image_advanced` allows you to override the default settings, giving you total control over the generation process.

**Does Image Router handle editing existing images?**
Yes, you use the `edit_image` tool. You simply provide the image and a text prompt detailing the change, and the router handles the modification process.

**What's the difference between generate_image and generate_variation?**
Use `generate_image` for a completely new concept from scratch. Use `generate_variation` when you like the original image but want to explore slight, related changes to it.

**How do I know when an image job is finished with get_generation_status?**
After starting a generation, you use `get_generation_status` with the job ID. This tool provides a real-time check, telling you when the image is ready or if there was an error.

**How do I use list_models_by_category to find the right image generator?**
It lists models by category. This helps you narrow down choices like 'anime' or 'photorealistic' before generating. You can filter your results to match the specific look you're going for.

**What should I use to check the connection status with check_imagerouter_status?**
The tool verifies your API connectivity. If it returns a success code, your agent knows the connection works. If it fails, you'll get an error message telling you exactly what's wrong with your credentials.

**Can generate_image_advanced handle complex parameters like seeds and negative prompts?**
Yes, it handles all advanced options. You can set specific seeds, define negative prompts to exclude unwanted elements, and control the steps for granular control over the output.

**How do I handle image generation jobs using get_generation_status?**
You poll the status endpoint. Your agent sends the job ID, and the tool reports the progress. It tells you when the image is ready or if the job failed, letting you build proper waiting logic.

**Can my AI generate images from text?**
Yes. `generate_image` creates images from any text prompt using AI models like Stable Diffusion.

**Can I upscale or create variations?**
Yes. `upscale_image` increases resolution and `generate_variation` creates visual alternatives of an existing image.

**How do I browse available models?**
Use `list_models` for all models or `list_models_by_category` to filter by style category.