# Image generation > POST /v1/images/generations: prompts, resolutions, aspect ratios, pixel sizes, response formats and prices. Source: https://zurelay.com/docs/images Make pictures from a prompt with OpenAI’s Images API: Nano Banana and GPT Image, one call each. `POST /v1/images/generations` | Model | ID | Sizes and prices | Reference images | | --- | --- | --- | --- | | [Nano Banana Pro](https://zurelay.com/models/nano-banana-pro) | `nano-banana-pro` | 1K and 2K $0.035 · 4K $0.065 | up to 14 | | [Nano Banana 2](https://zurelay.com/models/nano-banana-2) | `nano-banana-2` | 1K $0.025 · 2K $0.034 · 4K $0.058 | up to 14 | | [GPT Image 2.5 Flare](https://zurelay.com/models/gpt-image-2.5-flare) | `gpt-image-2.5-flare` | $0.02 an image | up to 16 | | [GPT Image 2.5 Sunburst](https://zurelay.com/models/gpt-image-2.5-sunburst) | `gpt-image-2.5-sunburst` | $0.02 an image | up to 16 | | [GPT Image 2](https://zurelay.com/models/gpt-image-2) | `gpt-image-2` | $0.02 an image | up to 16 | ## Make an image **Python** (`main.py`): ```python import os from openai import OpenAI client = OpenAI(base_url="https://api.zurelay.com/v1", api_key=os.environ["ZURELAY_API_KEY"]) result = client.images.generate( model="nano-banana-pro", prompt="A red fox curled up asleep in fresh snow at dawn, soft golden light, 85mm photo", size="2K", extra_body={ "aspect_ratio": "3:2" }, ) print(result.data[0].url) ``` **Node.js** (`index.mjs`): ```javascript import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://api.zurelay.com/v1", apiKey: process.env.ZURELAY_API_KEY }); const result = await client.images.generate({ "model": "nano-banana-pro", "prompt": "A red fox curled up asleep in fresh snow at dawn, soft golden light, 85mm photo", "size": "2K", "aspect_ratio": "3:2" }); console.log(result.data[0].url); ``` **cURL**: ```bash curl https://api.zurelay.com/v1/images/generations \ -H "Authorization: Bearer $ZURELAY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "nano-banana-pro", "prompt": "A red fox curled up asleep in fresh snow at dawn, soft golden light, 85mm photo", "size": "2K", "aspect_ratio": "3:2" }' ``` Response: ```json { "created": 1790870400, "data": [ { "url": "https://...signed link, valid for 24 hours..." } ] } ``` ## Parameters - `model` (string, required): An image model ID. - `prompt` (string, required): What to make, up to 32,000 characters. - `n` (integer): How many images, 1 to 4. They’re made at once; you pay for the ones delivered. - `size` (string): Nano Banana: `1K`, `2K` or `4K` (or pixels like `2048x1152`, read as the nearest resolution and shape). GPT Image: pixels, such as `1024x1024` or `3840x2160`. Leave it out for the default. - `aspect_ratio` (string): Nano Banana: `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9` or `21:9`. - `response_format` (string): `url` (default): a link valid for 24 hours. `b64_json`: the image itself, base64-encoded. - `images` (array): Reference images to edit or work from. See [Image editing](https://zurelay.com/docs/image-editing). - `quality, background, output_format` (string): GPT Image only: see the [GPT Image guide](https://zurelay.com/docs/gpt-image). ## Sizes Nano Banana is priced by resolution and makes exactly the size asked for: an image that comes back smaller is retried, never delivered. At 1K: | Aspect ratio | 1K | 2K | 4K | | --- | --- | --- | --- | | 1:1 | 1024 × 1024 | 2048 × 2048 | 4096 × 4096 | | 2:3 | 848 × 1264 | 1696 × 2528 | 3392 × 5056 | | 3:2 | 1264 × 848 | 2528 × 1696 | 5056 × 3392 | | 3:4 | 896 × 1200 | 1792 × 2400 | 3584 × 4800 | | 4:3 | 1200 × 896 | 2400 × 1792 | 4800 × 3584 | | 4:5 | 928 × 1152 | 1856 × 2304 | 3712 × 4608 | | 5:4 | 1152 × 928 | 2304 × 1856 | 4608 × 3712 | | 9:16 | 768 × 1376 | 1536 × 2752 | 3072 × 5504 | | 16:9 | 1376 × 768 | 2752 × 1536 | 5504 × 3072 | | 21:9 | 1584 × 672 | 3168 × 1344 | 6336 × 2688 | GPT Image costs the same at every size: `1024x1024`, `1536x1024`, `1024x1536`, `2048x2048`, `3840x2160`, `2160x3840`. ## Links and history - Links in `url` are signed and work for 24 hours. Download what you want to keep. - Images returned as `url` are also kept for 30 days in your dashboard’s [Library](https://zurelay.com/app/library), where you can download them, delete them, or use them as reference images. Images returned as `b64_json` aren’t stored. - Prompts sent through the API aren’t stored with the images. ## Timing Most images arrive in 10 to 60 seconds, longer at 4K. If an attempt stalls, the request is retried on another path automatically, so give your client a timeout of 10 minutes. ## When an image isn’t made If the model declines a prompt (say, for its content policy), you get `400 image_not_generated` with the model’s reason, and you’re not charged. With `n` above 1, you get the images that were made and pay only for those. - [Edit and combine images](https://zurelay.com/docs/image-editing): Reference images, up to 14 or 16 a request. - [Nano Banana guide](https://zurelay.com/docs/nano-banana): Prompting, text in images, references.