Generate and edit images
Use GPT Image 2, Nano Banana 2, and Nano Banana Pro through one request format.
Get started
text-to-image
Start a generation with a prompt and output settings.
image-to-image
Provide one or more image URLs within the selected model's limits.
resolution / format
Choose aspect ratio, resolution, file format, and output count.
Create endpoint
POST
https://api.mlmux.com/v1/images/generationsRequest example
curl https://api.mlmux.com/v1/images/generations \
-H "Authorization: Bearer $MLMUX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana-2",
"route_mode": "official-cheap",
"prompt": "Editorial product photography",
"resolution": "2K"
}'Route mode
Every model supports the same three route tiers: official, official-cheap, and mix. New requests default to official-cheap. A request stays within the selected tier and never silently crosses into another tier.
officialDirect official-provider routeofficial-cheapLower-cost official route · defaultmixMixed upstream pool for price and capacityPrediction response
idUnique task identifierstatusqueued, running, succeeded, or failedoutputCompleted media URLsusageCredits, units, and final charge