Endpoints

Images

OpenAI-compatible endpoints for generating and editing images.

Generate images from a prompt, or edit existing ones. Both endpoints are OpenAI-compatible.

POSThttps://api.roteo.ai/v1/images/generations
POSThttps://api.roteo.ai/v1/images/edits

Generate

modelstringrequired

Any image model, e.g. nano-banana-2.1. See Models.

promptstringrequired

What to generate. Up to 8,000 characters.

sizestringdefault: 1K

1K, 2K, or 4K. gpt-image-2.5 and seedream-flash offer 1K and 2K only.

aspect_ratiostringdefault: 1:1

One of 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9.

response_formatstringdefault: b64_json

b64_json for inline base64, or url for a hosted link.

curl https://api.roteo.ai/v1/images/generations \
-H "x-api-key: $ROTEO_API_KEY" \
-H "content-type: application/json" \
-d '{
  "model": "nano-banana-2.1",
  "prompt": "a neon koi drifting through violet storm clouds",
  "size": "1K",
  "aspect_ratio": "1:1"
}'
bash · 9 lines

Edit

/v1/images/edits accepts multipart/form-data with the same scalar fields plus reference images (field name image, repeat it to send several). Use it for edits, style transfer, and multi-image blends. The limit is per model (nano-banana-2.1 takes up to fourteen; gpt-image-2.5, seedream-pro and seedream-flash take ten); exceeding it returns 400. When you send more than one, cite each in the prompt as @image1, @image2, in upload order.

Every current image model in Models accepts reference images. n must be 1, and because a form field is always text, send it as -F n=1.

When you omit aspect_ratio, an edit keeps the shape of the image you upload rather than falling back to the square default.

You only pay for images that are successfully delivered.

Images | Roteo