Developers / OpenRouter cookbook

Does MAI-Image-2.7 cost a fifth as much per edit?

Across 12 edits, MAI-Image-2.7 averaged 79% of what OpenAI’s GPT Image cost on OpenRouter. On the 7 featured edits, it cost about 8% more. FLUX 3 averaged $0.048 per image across all 12, less than MAI-Image-2.7.

How much does an image edit cost on OpenRouter?

Mean cost per image in USD. Mean time covers all edits that returned an image.
ModelFeatured 7All 12Mean time
microsoft/mai-image-2.7$0.064$0.05620 s
microsoft/mai-image-2.7-flash$0.019$0.01712 s
black-forest-labs/flux-3-image$0.048$0.04833 s
openai/gpt-image-2.6-flare$0.060$0.07111 s
google/gemini-3.1-flash-image$0.068 6 of 7 images$0.068 11 of 12 images9.5 s
Recipe subtotals (rounded)
$4.2305
Notebook test runs
$1.055
Rounding difference
$0.0001
Whole cookbook run
$5.2856

Both MAI models kept the speaker’s face when they moved the headshot to eye level. MAI-Image-2.7 also put the rover on the crater rim and placed every diagram label correctly. GPT Image and FLUX 3 got the thumbnail shape from the prompt alone and followed the stage photo instructions.

Listed on OpenRouter · Tested

What does Uoink do here?

Uoink saved the launch demo on this computer. The recipes can use its transcript, frames and links to the original moments.

  1. The claim to test. The line “the world's number one image editing model at a fifth of the cost of the competition” comes from the keynote captions at 1:38:39.
  2. The quote on the card. The card uses the clause “Where it really stands out is for image editing.” The full line Uoink saved was “But where it really stands out is for image editing, which we'll be taking a look at.”
  3. The spoken recap. A chat model wrote 10 sentences from the transcript. Each line starts with its timestamp. The script drops lines with unknown timestamps before reading them aloud.

Recap and pin links start up to two seconds early so you hear the whole line.

7 featured edits

Compare each original with the results from 5 models. Open a photo to see the full image. Swipe across each set to see the other models.

A YouTube thumbnail from a selfie

Requested edit Make a 16:9 YouTube thumbnail from this photo. Keep the man's face, glasses and beard exactly as they are and place him on the right. Replace the room with a bold yellow background. On the left add the headline A FIFTH OF THE COST? in huge black capital letters on two lines, and below it a smaller line: I TESTED 5 IMAGE MODELS. No other text.

We sent aspect_ratio="16:9" to microsoft/mai-image-2.7 and microsoft/mai-image-2.7-flash. The other models followed the prompt alone.

What we saw. FLUX 3, GPT Image and Gemini made a 16:9 thumbnail from the prompt alone. Gemini ran the headline into the face. The two MAI models needed the aspect_ratio parameter. With it, both made clean thumbnails. MAI flash cost $0.015 and MAI-Image-2.7 cost $0.051, against $0.042 for GPT Image.

A quote card from a saved video

Requested edit Make a square 1:1 social quote card from this photo. Keep the man's face, glasses and beard exactly the same and place him in the lower right. Use a dark charcoal background. At the top left, in large white type, put this exact quote in quotation marks: "Where it really stands out is for image editing." Under it in small yellow type: fal demo of MAI-Image-2.7, 0:19. At the bottom left in small white capital letters: SO I TESTED IT. No other text.

We sent aspect_ratio="1:1" to microsoft/mai-image-2.7, microsoft/mai-image-2.7-flash, black-forest-labs/flux-3-image, openai/gpt-image-2.6-flare, and google/gemini-3.1-flash-image.

Quote from fal demo of MAI-Image-2.7, 0:19, saved with Uoink.

What we saw. All five spelled the quote and the timestamp correctly, kept the face and returned a square. On a first attempt with the shape only in the prompt, the two MAI models returned a portrait.

A speaker headshot from the same selfie

Requested edit Turn this selfie into a professional headshot for a conference speaker page. Keep the face, glasses, beard and expression exactly the same. Bring the camera to eye level, dress him in a dark blazer over the same shirt, and use a plain light gray studio background.

What we saw. The two MAI models did best. They moved the camera to eye level and kept the same person. FLUX 3 and GPT Image kept the selfie tilt. Gemini returned a different man.

On a conference stage

Requested edit Keep the man and his pose exactly the same. Move him onto a conference stage with a large screen behind him that reads DEMO DAY, and an audience in soft focus in the foreground.

What we saw. FLUX 3 and GPT Image did what was asked. MAI-Image-2.7 added a tagline that was not requested. Gemini hid part of the screen text behind his head and seated the audience at laptops.

A merch mockup

Requested edit Change his jacket to a bright yellow hoodie with the word UOINK across the chest in bold black capital letters. Keep his face, hat and pose exactly the same. Replace the logo wall behind him with a plain white wall.

What we saw. All five got the hoodie and the word right. Gemini changed the face and added a chain. GPT Image chose a varsity typeface.

Two photos into one

Requested edit Place the large rover from the second image on the near rim of the crater in the first image. Match the harsh lunar light and shadows of the first image. Do not include the two smaller rovers.

What we saw. The models split here. MAI-Image-2.7 put the rover on the rim and kept the scene. MAI flash kept the scene, but the rover floats above the ground. FLUX 3 shrank the rover and placed it inside the crater. GPT Image redrew the whole surface. Gemini made two rovers.

A labeled diagram

Requested edit Turn this photo into a labeled diagram. Add four white callout labels with thin leader lines: MAST CAMERA pointing to the camera head on top of the large rover's mast, ROBOTIC ARM pointing to the large rover's arm, SOJOURNER 1997 pointing to the smallest rover, and SPIRIT AND OPPORTUNITY 2004 pointing to the mid-size rover. Change nothing else.

What we saw. MAI-Image-2.7 put all four labels on target. MAI flash pointed ROBOTIC ARM at the chassis. GPT Image pointed SPIRIT AND OPPORTUNITY at bare ground. FLUX 3 left out the label boxes. Gemini returned an error and no image.

5 more edits

A poster with exact text

Requested edit Turn this into a travel poster. Add exactly this text and no other text: at the top in large capitals VISIT TYCHO CRATER, and at the bottom in smaller capitals 85 KILOMETERS WIDE. 108 MILLION YEARS OLD. NO ATMOSPHERE, NO CROWDS. Keep the crater photo recognizable.

What we saw. All five spelled the text correctly. FLUX 3 changed the picture to portrait. MAI-Image-2.7 added a planet and a sun that were not asked for.

Repaint one object

Requested edit Repaint the white body panels of the large rover on the right in bright red. Keep the two smaller rovers, the ground and the lighting the same.

What we saw. All five repainted the body. MAI-Image-2.7 and FLUX 3 also painted the white arm red. Gemini turned the arm dark.

Swap a material

Requested edit Change the wire mesh wheel into a black rubber off-road tire. Keep the fender, the vehicle and the ground the same.

What we saw. All five made the tire. Gemini replaced the hub as well.

Add a small caption

Requested edit Add the caption TYCHO CRATER in small white capital letters in the bottom left corner.

What we saw. All five spelled the caption correctly. Size and position varied.

Remove two objects

Requested edit Remove the two smaller rovers on the left and fill in the ground where they stood. Keep the large rover and everything else exactly the same.

What we saw. All five removed both rovers and filled the ground cleanly.

Edit receipt

Benchmark subtotal (rounded) · 60 calls, 59 images
$3.0543
9 calls excluded from the means (the prompt-only MAI thumbnails and quote cards, plus the last set of quote cards before the timestamp fix)
$0.462404
Total from these subtotals
$3.516704
Why we ran the edits again

Earlier attempts that are not in the means. The two MAI models were run again on the thumbnail and the quote card with aspect_ratio set, after their prompt-only attempts came back portrait. All five quote cards were then remade with aspect_ratio set and a corrected timestamp.

Where does the claim come from?

Hear the price claim in the keynote, then watch fal change the metal on a helmet in the editing demo.

Run it yourself

Clone the cookbook and set your OpenRouter key in Bash. The edit script uses Python’s standard library and comes with the NASA sample photos.

git clone https://github.com/ryanbiddy/uoink
cd uoink/cookbook/openrouter
read -rsp 'OpenRouter key: ' OPENROUTER_API_KEY
echo
export OPENROUTER_API_KEY

The dry run is free. It prints the number of calls planned and looks up prices for the selected models.

python 06_edit_bench.py --dry-run

Run the edits with the same script. It skips pairs with saved results.

python 06_edit_bench.py

Each model gets the instruction and the reference photos. The script checks which options the model accepts before asking for PNG output.

PREFIX = ("Edit the reference image. Change only what is asked "
          "and keep everything else the same. ")
payload = {
    "model": model, "prompt": PREFIX + task["instruction"],
    "input_references": [orkit.image_ref(i) for i in image],
    "response_format": "b64_json", **(extra or {}),
}
body, _, seconds = orkit.api("POST", "/images", payload, recipe="06",
                             output=path.parents[1] / "results.json", response_path=response)
row["cost"] = (body.get("usage") or {}).get("cost")
06_edit_bench.py
Run one edit with curl
bash curl/06_edit_bench.sh
if [[ $force == 1 || ! -s $reply ]]
then
  call --fail "$API/images" -H "Content-Type: application/json" \
    --data-binary "@$out/edit.request.json" -o "$reply.tmp"
  mv "$reply.tmp" "$reply"
fi

The script’s call helper passes the key to curl on standard input.

curl/06_edit_bench.sh

Open it as a notebook

Pick a line Uoink saved. Choose a quote card, thumbnail or story card and add your photo. The marimo notebook shows each model’s image and cost side by side.

Run these commands from the cookbook folder.

pip install marimo
marimo run launch_kit.py
A Moon tour transcript line selected above the model outputs and prices
Quote cards made from the same line in NASA’s Moon tour.

Test a new model the day it lands

List the newest image models, then pass an ID to the script. MAI-Image-2.7 drew a rover from a text prompt and turned the crater photo into a pencil drawing.

python 07_new_model.py --newest image
python 07_new_model.py microsoft/mai-image-2.7

We ran this test 14 days after OpenRouter listed the model.

Model
microsoft/mai-image-2.7
Listed on OpenRouter
2026-11-17
Tested
2026-12-01
image.png
30 s · $0.035
reference.png
18 s · $0.037
Cost
$0.072
Live prices returned on 2026-12-01
Billable input or outputUnitPrice
input_texttoken$0.000005
input_imagetoken$0.000008
output_imagetoken$0.000034
A lunar rover in low sunlight beside a crater, generated by microsoft/mai-image-2.7.
From textDraw a lunar rover beside a small crater in low sunlight. Leave out lettering.
A pencil drawing of Tycho crater and the shadows across its floor, made by microsoft/mai-image-2.7.
From the reference frameTurn the reference frame into a pencil drawing. Keep the framing and shadows.
Read the new-model script

One video from the pieces

ffmpeg joined the edited images and narration into a 69-second video. The narration cost $0.0046. Joining the files took 0 API calls.

python 08_explainer.py --no-clip --audio narration.mp3 --captions script.txt --images out/06/thumb/*.png
Read the ffmpeg recipe

The other recipes

What did the cloud transcript change?

Uoink supplied the local transcript. We sent the same audio to openai/whisper-large-v3-turbo and compared the words.

Differences in the sample
Uoink transcriptCloud transcript
reedreid
inand
reed weismannreid wiseman
cookkoch
faveloffvavilov
Cloud transcription receipts
AudioWERTimeCost
Sample
142 s
14.72%2.5 s$0.000473
Episode
30 min
7.93%13 s$0.006026

Word error rate (WER) counts the word edits between transcripts using the local version as the reference. Either transcript can be wrong.

The cloud model fixed names the local model got wrong (Reid Wiseman, Koch, Vavilov) and left out about 30 words where people talked over each other.

Run this recipe
python 01_transcript_check.py
payload = {"model": args.model, "response_format": "json", "input_audio": {
    "format": audio.suffix[1:].lower(),
    "data": base64.b64encode(audio.read_bytes()).decode("ascii"),
}}
cloud, _, seconds = orkit.api("POST", "/audio/transcriptions", payload,
                              recipe="01", model=args.model, output=out / "cloud.json")
01_transcript_check.py
See the curl request
bash curl/01_transcript_check.sh
call --fail-with-body "$API/audio/transcriptions" \
  -F "file=@\"$audio\"" \
  --form-string "model=$model" --form-string "response_format=json" \
  -o "$out/cloud.curl.json"

The script’s call helper passes the key to curl on standard input.

curl/01_transcript_check.sh

Can you trace a spoken recap to the source?

google/gemini-4-hydrogen wrote these lines from Uoink’s transcript of fal's demo of MAI-Image-2.7. The script checked the timestamps, then sent the lines to hexgrad/kokoro-82m to read aloud.

  1. 00:00Today we're looking at Microsoft's new MAI Image 2.7 model.
  2. 00:14It ranks fourth in text-to-image, but really stands out for image editing.
  3. 00:41To test it, I generated a story about a man commuting through a flooded San Francisco in a scuba helmet.
  4. 04:34The model is fast and affordable, though it is certainly prone to hallucinations with humans.
  5. 08:38In editing tests, it successfully changed a brass helmet ring to stainless steel.
  6. 09:28It also swapped a humpback whale for an orca while keeping most of the framing intact.
  7. 10:04The flagship test cost only four dollars total, averaging about 44 seconds per image.
  8. 10:43The flash version is even more affordable and runs faster at around 25 seconds.
  9. 13:04While the flagship model captures more fine detail, the flash version is a great option for speed.
  10. 15:13Overall, MAI Image 2.7 is a solid, fast, and affordable model available today on Fall.
Writing
$0.023
Speech · af_alloy
$0.00084645
Lines dropped
0
Cost
$0.024

The same recipe kept 7 cited lines from NASA's Curious Universe. Writing cost $0.025 and speech cost $0.00076725.

Run this recipe
python 02_cited_recap.py
BUDGET = {"max_tokens": 8000, "reasoning": {"effort": "low"}}

chat, _, _ = orkit.api("POST", "/chat/completions",
                       {"model": args.model, "messages": messages, **BUDGET},
                       recipe="02", model=args.model, output=out / "recap.md")

# After checking the citations and saving the script:
audio = out / ("recap." + orkit.audio_format(args.tts_model))
_, cost = orkit.speech(args.tts_model, args.voice, script, audio, "02")
02_cited_recap.py
See the curl request
bash curl/02_cited_recap.sh
call --fail-with-body "$API/chat/completions" \
  -H "Content-Type: application/json" --data-binary "@$out/chat.request.json" -o "$out/chat.curl.json"

The script’s call helper passes the key to curl on standard input.

curl/02_cited_recap.sh

Cover art from a pinned frame

Uoink saved the frame and the words spoken over it. The image model received both.

“This is Tycho crater. It is around 100 million years old.” Pinned at 2:12
NASA frame showing the central peak and shadowed floor of Tycho crater.
Saved frame
A view across Tycho crater toward the Moon’s curved horizon, made by google/gemini-3.1-flash-image.
Generated cover
Model
google/gemini-3.1-flash-image
Time
11 s
Cost
$0.068
Run this recipe
python 03_cover_art.py
body = {"model": args.model, **cover_request(args)}
image, _, _ = orkit.api("POST", "/images", body, recipe="03",
                        model=args.model, output=out / "cover.png")
orkit.save(out / "cover.png", orkit.image_bytes(image))
03_cover_art.py
See the curl request
bash curl/03_cover_art.sh
call --fail-with-body "$API/images" \
  -H "Content-Type: application/json" --data-binary "@$out/image.request.json" -o "$out/image.curl.json"

The script’s call helper passes the key to curl on standard input.

curl/03_cover_art.sh

What happens when you animate the frame?

google/veo-3.1-lite turned the lunar landscape into a silent 6-second clip.

Resolution
720p
Submit to completion
58 s
Cost
$0.180
Read the poll log
  1. 0.0spending
  2. 0.2spendingqueued_at_provider
  3. 6.1spendingqueued_at_provider
  4. 11.3sin_progressgenerating
  5. 16.5sin_progressgenerating
  6. 21.8sin_progressgenerating
  7. 27.0sin_progressgenerating
  8. 32.2sin_progressgenerating
  9. 37.3sin_progressgenerating
  10. 42.6sin_progressgenerating
  11. 47.7sin_progressgenerating
  12. 52.9sin_progressgenerating
  13. 58.2scompleted

The first try

The starting frame had a small scale label on it. The model invented a second, larger label. That run took 48 s.

Both video runs together cost $0.360.

Run this recipe
python 04_teaser_clip.py
body["frame_images"] = [{**orkit.image_ref(frame), "frame_type": "first_frame"}]
out = orkit.OUT / "04" / "job.json"
with video.submission_slot(args.yes_more_video):
    first, _, _ = orkit.api("POST", "/videos", body, model=args.model, recipe="04", output=out)
04_teaser_clip.py
See the curl request
bash curl/04_teaser_clip.sh
call --fail-with-body "$API/videos" \
  -H "Content-Type: application/json" --data-binary "@$out/video.request.json" -o "$out/submit.curl.json"

The script’s call helper passes the key to curl on standard input.

curl/04_teaser_clip.sh

Three models for the same task

The image models got the same frame and cover prompt. Compare the crater’s central peak in each cover.

Sunlit central peaks rising from the crater floor by google/gemini-3.1-flash-image.
google/gemini-3.1-flash-image$0.068 · 9.8 s
A sharp central peak casting a shadow inside a round crater by openai/gpt-image-2.6-flare.
openai/gpt-image-2.6-flare$0.035 · 9.8 s
An overhead view of Tycho crater surrounded by smaller craters by black-forest-labs/flux-3-image-klein.
black-forest-labs/flux-3-image-klein$0.009 · 7.1 s

Each speech model read the same words from the pin. The caption above each player lists the audio format the model returned.

hexgrad/kokoro-82maf_alloy · mp3 from the API · $0.00030294 · 2.3 s
elevenlabs/eleven-flash-v2.5george · mp3 from the API · $0.012 · 1.7 s
google/gemini-3.8-flash-ttsKore · wav from the API · $0.004439 · 6.8 s
All 6 outputs
$0.129
Run this recipe
python 05_three_models.py
if kind == "image":
    payload = {"model": model, "prompt": prompt, "input_references": [ref],
               "response_format": "b64_json"}
    body, _, seconds = orkit.api("POST", "/images", payload, recipe="05",
                                 model=model, output=path)
    row["cost"] = (body.get("usage") or {}).get("cost")
    orkit.save(path, orkit.image_bytes(body))
else:
    seconds, row["cost"] = orkit.speech(model, voice, line, path, "05")
05_three_models.py
See the curl request
bash curl/05_three_models.sh
call "$API/audio/speech" -H "Content-Type: application/json" \
  --data-binary "@$out/speech.request.json" -o "$file" \
  -w "$model  HTTP %{http_code}  %{time_total}s  %{size_download} bytes\n"

The script’s call helper passes the key to curl on standard input.

curl/05_three_models.sh

Hand it to an agent

Connect Uoink over MCP and open a shell in the checkout. The agent can find the latest saved podcast and check its recap against the original cues.

Prompt

Make a spoken recap of my last saved podcast. Find the newest item in my Uoink
library with platform podcast, read its cues with uoink cues ITEM_ID, then run
python cookbook/openrouter/02_cited_recap.py --item ITEM_ID. Check recap.md against
the original cues and flag any line you cannot support. Report the files and the
chat and speech costs for this run.

MCP config

{"mcpServers": {"uoink": {"command": "uoink", "args": ["mcp"]}}}

Rough edges we hit

  • Some models only follow a shape sent as a parameter

    Asked in the prompt for a 16:9 thumbnail, both MAI models returned a 1200 by 1600 portrait. With aspect_ratio set to 16:9 they returned 1365 by 768, and the charge for MAI-Image-2.7 fell from $0.079 to $0.051. The other three models followed the prompt alone.

    MAI-Image-2.7 put the thumbnail headline and selfie in a portrait frame.
    Prompt onlyAsked for 16:9, returned portrait
  • A thinking model can spend the whole token cap before it writes a word

    The first recap call came back with empty text and finish_reason length. It still cost $0.0248. The recipe now leaves room, asks for low reasoning effort and stops with a clear message on an empty reply.

  • Image parameters differ by model, and an unsupported one fails the whole request

    black-forest-labs/flux-3-image answered HTTP 400 to output_format. The recipes now read supported_parameters from the live model record before sending it.

  • Speech formats differ by model

    google/gemini-3.8-flash-tts returns only wav or pcm. Asking for mp3 is HTTP 400. The default with no format is raw PCM, which most players will not open.

  • Speech cost needs a second call

    Speech returns bytes, so the price comes from the generation record. That record answered 404 for the first couple of seconds on every run.

  • A key with no credits can list every model, then fails on the first paid call

    Model lists are free. The first transcription returned HTTP 402.

  • Text in the first frame of a video comes back wrong

    Our first clip started from a frame with a scale label, and the model added a second label that does not exist. A frame without lettering gave a clean clip.

Method and limits

The keynote didn’t name a competitor or price tier for “the competition.” We compared MAI-Image-2.7 with OpenAI’s openai/gpt-image-2.6-flare at the prices OpenRouter charged on 2026-12-01.

Each model got the same photos and instructions. The means use only the images shown in the galleries. These include the MAI thumbnails with the shape set and the quote cards with the corrected timestamp. Gemini’s mean covers 11 images because its labeled diagram call failed.

When we left the size open, the models chose different output sizes. Models that bill by output tokens charge more for bigger images. Size accounts for part of the price gap.

Every portrait edit started from the author’s own photos. We never made a face from text alone or edited anyone else’s likeness. The space photos are public-domain NASA images. We judged the results by eye.

How to read a runs.jsonl receipt

Run these on your own library

Save a podcast or video in Uoink, then pass its item ID to the recap or cover recipe.