# Create Image generation

If you want to generate images, you need to [create a generation](https://developer.all-images.ai/all-images.ai-api/api-reference/images-generation#create-image-generation).&#x20;

Two generation modes are available: simple and advanced mode.&#x20;

### Simple mode

Generate images with a simple description that we can optimize for you with `optimizePrompt` property. Optional options are also available.

```json
{
    "name": "Image generation in Simple mode",
    "prompt": "a dog playing in a park",
    "mode": "simple",
    "optimizePrompt"?: true | false,
    "params"?: [{ name: "param1", value: "value1" }, { name: "param2", value: "value2" }, ...],
    "tags"?: ["tag1", "tag2"],
    "metaData"?: { "name": "value" }
}
```

{% hint style="warning" %}
**The prompt must not contain a Midjourney parameter, only a text description. Use the various parameters or the "**[**advanced mode**](#advanced-mode)**"**
{% endhint %}

With the `optimizePrompt` parameter, the description will be optimised for generation. \
Example : "a dog" --> "A small brown dog sits on freshly fallen leaves looking into the distance, shot from a low angle."

In simple mode, you can add `params` to customize generation:&#x20;

* **Photo type** : "High quality realistic photo (realisticQuality, default)" or "Realistic photo taken on a smartphone (realisticManuel)".\
  `{ name: "templatePrompt", value: "realisticQuality" | "realisticManuel" }`
* **Format**: select image resolution.\
  `{ name: "format", value: "1:1" | "3:2" | "2:3" | "4:7" | "7:4" | "5:4" | "4:5" | "16:9" | "9:16" }`
* **Weather**: choose the weather for your image.\
  `{ name: "weather", value: "sunny" | "cloudy" | "foggy" | "rainy" | "thunderstorm" | "snowy" }`
* **Time**: this will change the image colors according to the time of day.\
  `{ name: "Time", value: "sunrise" | "morning" | "afternoon" | "sunset" | "evening" | "golden hour" | "night" | "midnight" }`
* **Camera**: enter a specific camera. Ex: GoPro or Cannon.\
  `{ name: "camera", value: "camera name" }`
* **Chaos**: value between 0 and 100 - This parameter influences how varied the initial image grids are. High chaos values will produce more unusual and unexpected results and compositions. Lower chaos values have more reliable, repeatable results.\
  `{ name: "chaos", value: 0-100 }`
* **Stylize**: value between 0 and 100 - Low stylization values produce images that closely match the prompt but are less artistic. High stylization values create images that are very artistic but less connected to the prompt.\
  `{ name: "stylize", value: 0-1000 }`
* **Interdiction**: separating what you don't want in the image (word, hands, human, ...) with a comma.\
  `{ name: "interdiction", value: "value1, value2, ..." }`

### Advanced mode

Our images are generated using Midjourney AI. In this mode, you just enter your ["Imagine" prompt](https://docs.midjourney.com/docs/image-prompts) as if you were on Discord.

```json
{
    "name": "Image generation in Advanced mode",
    "prompt": "a dog playing in a park --aspect 3:2",
    "mode": "advanced",
    "tags"?: ["tag1", "tag2"],
    "metaData"?: { "name": "value" }
}
```

***

{% hint style="info" %}
**User with "Dedicated" offer**\
The "processMode" parameter lets you choose the image generation mode: fast or relax. Remember to check your fast generation quota.
{% endhint %}

```
{
    "name": "Image generation",
    "processMode": "fast" | "relax"
}
```
