> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mint.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Images

> Generate, edit, retrieve, and upload reusable reference images.

The Images API creates finished images, non-destructive edits, and reusable visual inputs for other Mint services.

## Generate an Image

Call `POST /v1/images:generate` with `prompt` and optional `name` or `generationPreset`. Mint derives a title when `name` is omitted; choose a [preset](/developers/api-overview#presets) for the desired speed, quality, and cost.

```json theme={null}
{
  "prompt": "A cinematic product image of a glass terrarium",
  "name": "Glass terrarium"
}
```

Image generation returns a finished resource and does not use `generationMode`.

## Edit an Image

Call `POST /v1/images/{imageId}:edit` with `editInstruction`. The edit is non-destructive and creates a new Image.

## Upload a reference image

Call `POST /v1/reference-images` with exactly one source form:

* `sourceUrl`: a public HTTPS image URL.
* `base64Data` with `fileName` and `contentType`.

Add `name` for an optional title shown in Mint. Do not use private-network, localhost, short-lived authenticated, or untrusted redirect URLs.

## Retrieve Images and files

Use `GET /v1/images/{imageId}` or `GET /v1/reference-images/{referenceImageId}`. Use the [Assets](/developers/assets) routes when you need a complete file manifest or download URL.
