Images
Create and edit images with OpenAI's image API format.
POST /v1/images/generations in OpenAI's format, for every image model on the Models page.
curl https://pinerouter.ai/v1/images/generations \
-H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" \
-d '{"model": "nano-banana-pro", "prompt": "A matte ceramic mug on a beige backdrop, studio light", "size": "1024x1024"}'The answer has data[].url. Image models can take a while; the call waits for the result.
| Field | Meaning |
|---|---|
model | Model id from the Models page |
prompt | What to create |
size | WIDTHxHEIGHT; mapped to the nearest aspect ratio and resolution the model offers |
quality | Passed on where the model has it |
n | Number of images, where the model supports it |
image or images | Links to reference images, for edit and image-to-image models |
Need a model's own settings (resolution, style, seed, output format)? Use Jobs, which takes every field listed on the model's page.
Outputs are AI-generated and keep the labels the model adds (C2PA metadata, watermarks). See AI-generated content.
