▥ Seedance 2.5 is here! ›
IMAGE TO IMAGE

Image editing API

Edit an image, restyle it, or combine several references with a text prompt. 6 models support reference images through POST /v1/images/edits.

Models

Every model below accepts reference images. Send their URLs in image_urls; the table shows how many each model takes.

Model and API model IDOptionsPrice on official-cheap (default)
GPT Image 2openai/gpt-image-2Sizes: 1K, 2K, 4KUp to 16 reference images$0.032 per 1K imageofficial: $0.053
Nano Banana 2google/nano-banana-2Sizes: 1K, 2K, 4KUp to 14 reference images$0.034 per 1K imageofficial: $0.067
Nano Banana 2.1google/nano-banana-2.1Sizes: 1K, 2K, 4KUp to 14 reference images$0.017 per 1K imageofficial: $0.034
Nano Banana Progoogle/nano-banana-proSizes: 1K, 2K, 4KUp to 14 reference images$0.067 per 1K imageofficial: $0.134
Qwen Image 2.1 Proqwen/qwen-image-2.1-proSizes: 1K, 2KUp to 3 reference images$0.035 per imageofficial: $0.038
Qwen Image 2.1 Turboqwen/qwen-image-2.1-turboSizes: 1K, 2KUp to 3 reference images$0.014 per imageofficial: $0.015

Quick start

  1. Create an API key

    Create a key in the console and save it as the MLMUX_API_KEY environment variable.

    Create an API key
  2. Send a request

    The example sends Nano Banana Pro (google/nano-banana-pro) to https://api.mlmux.com/v1/images/edits. Change the model ID to any model in the table above.

  3. Read the result

    The response lists the image URLs in data. Add "async": true to get a task to poll instead.

    Image API reference
curl https://api.mlmux.com/v1/images/edits \
  -H "Authorization: Bearer $MLMUX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "google/nano-banana-pro",
  "route_mode": "official-cheap",
  "prompt": "Place the product on a sunlit marble counter and keep the label unchanged",
  "image_urls": [
    "https://your-cdn.example/product.jpg"
  ],
  "resolution": "2K",
  "aspect_ratio": "match_input_image",
  "output_format": "png"
}'

Frequently asked questions

Which model should I use for image editing?

Nano Banana Pro handles complex multi-reference edits well. Nano Banana 2 and 2.1 cost less for everyday edits, and GPT Image 2 takes up to 16 reference images. Qwen Image 2.1 Turbo is the lowest-cost option.

How much does an image edit cost?

An edit is priced like a generated image of the same size, from about $0.014 per image (Qwen Image 2.1 Turbo) on the default route.

How do I send the images to edit?

Pass public URLs in image_urls, or upload files with POST /v1/uploads and use the returned URLs. The response lists the edited image URLs.

Am I charged for failed requests, and is there a limit?

Failed requests are not charged, and the credits held for them return to your balance. Each account can run up to 60 tasks at the same time; email support@mlmux.com if you need more.