Image API
Generate or edit images with OpenAI-compatible endpoints.
Image API
Generate an image
curl "https://api.apimodel.store/v1/images/generations" \
-H "Authorization: Bearer $MODELPORT_API_KEY" \
-H "Idempotency-Key: YOUR_UNIQUE_REQUEST_KEY" \
-H "Content-Type: application/json" \
--data '{"model":"nano-banana-2-1","prompt":"A ceramic cup in soft morning light","size":"1024x1024"}'Edit an image
curl "https://api.apimodel.store/v1/images/edits" \ -H "Authorization: Bearer $MODELPORT_API_KEY" \ -H "Idempotency-Key: YOUR_UNIQUE_EDIT_KEY" \ -F "model=nano-banana-2-1" \ -F "prompt=Change the background to warm stone" \ -F "image=@cup.png"
Use the same API key to download results. Check the model guide for supported reference inputs and output sizes.
Asynchronous job API