## Basic model info

Model name: ideogram-ai/ideogram-4-5
Model description: Generate and edit images with Ideogram 4.5, the latest for precise image generation.


## Model inputs

- prompt (required): Text prompt. Describe the image to generate, or the edit to apply to the source images. (string)
- images (optional): Up to 5 source images to edit. Omit for text-to-image generation. When a mask is provided, the first image is edited and the rest are used as references. (array)
- mask (optional): Optional black and white mask for editing. Black pixels are edited, white pixels are preserved. Only used when at least one source image is provided. When a mask is used, the output matches the source size and the size input is ignored. (string)
- size (optional): Output size. 'source' preserves the source image proportions, or lets Ideogram pick the size when no source images are given. Without source images, only 'source' and 1024x1024 are supported. Ignored when a mask is provided. (string)
- quality (optional): Edit quality. Higher quality is slower and more expensive. (string)
- num_images (optional): Number of images to generate. (integer)
- seed (optional): Random seed. Set for reproducible generation. (integer)


## Model output schema

{
  "type": "array",
  "items": {
    "type": "string",
    "format": "uri"
  },
  "title": "Output"
}

If the input or output schema includes a format of URI, it is referring to a file.


## Example inputs and outputs

Use these example outputs to better understand the types of inputs the model accepts, and the types of outputs the model returns:

### Example (https://replicate.com/p/ns98f5e5dhrmr0d0yeza3rmj5g)

#### Input

```json
{
  "size": "source",
  "prompt": "an elephant swimming",
  "quality": "medium",
  "num_images": 1
}
```

#### Output

```json
[
  "https://replicate.delivery/xezq/JdKEoNB9btp1AZbUurtT8XbenPfH2MS6hFFT3eUTbVJffIW6C/tmph0nppko8.png"
]
```


## Model readme

> # Ideogram 4.5
> 
> Ideogram 4.5 generates images from text prompts and edits source images using natural language instructions.
> 
> You can run it as a text-to-image model by providing only a prompt, or edit up to five source images by passing them in `images`. Use `size="source"` to preserve source proportions. If you provide a mask, black pixels are edited and white pixels are preserved.
> 
> Billing is per generated image. Source-image edits have separate rates for some quality levels.

