# Grok Imagine Image > Grok Imagine Image 2.0 on Zurelay: 1K and 2K images in 8 shapes, editing with up to 3 images, prices and prompting. Source: https://zurelay.com/docs/grok-imagine-image xAI’s Grok Imagine Image 2.0: new images at 1K or 2K in eight shapes, and edits that combine up to 3 images. ## Price 1K $0.045, 2K $0.06 an image, made at xAI’s medium quality. An edit costs the same as a new image; the images you send are included. ## 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="grok-imagine-image-2.0", prompt="A poster for a mountain trail race: a runner on a ridge at sunrise, the words 'SUMMIT 50K' in bold condensed letters across the top", size="2K", extra_body={ "aspect_ratio": "2:3" }, ) 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": "grok-imagine-image-2.0", "prompt": "A poster for a mountain trail race: a runner on a ridge at sunrise, the words 'SUMMIT 50K' in bold condensed letters across the top", "size": "2K", "aspect_ratio": "2:3" }); 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": "grok-imagine-image-2.0", "prompt": "A poster for a mountain trail race: a runner on a ridge at sunrise, the words '\''SUMMIT 50K'\'' in bold condensed letters across the top", "size": "2K", "aspect_ratio": "2:3" }' ``` ## Parameters - `size` (string): `1K` (the default) or `2K`. - `aspect_ratio` (string): `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `9:16`, `16:9` or `21:9`. Without it a new image is square; an edit keeps the shape of the image you send. - `images` (array): Up to 3 images to edit or combine, as links or data URLs (or files on `/v1/images/edits`). - `n` (integer): 1 to 4 images. Sizes are xAI’s own: about one megapixel at 1K (1024 × 1024 square, 1280 × 720 for 16:9) and about four at 2K. An image in another shape or resolution is retried, never delivered. ## Edit and combine **Python** (`main.py`): ```python import os import requests response = requests.post( "https://api.zurelay.com/v1/images/generations", headers={"Authorization": f"Bearer {os.environ['ZURELAY_API_KEY']}"}, json={ "model": "grok-imagine-image-2.0", "prompt": "Put the woman from the first image in front of the bakery from the third, holding the bottle from the second.", "images": [ "https://example.com/woman.jpg", "https://example.com/bottle.jpg", "https://example.com/bakery.jpg" ] }, ) response.raise_for_status() print(response.json()) ``` **Node.js** (`index.mjs`): ```javascript const response = await fetch("https://api.zurelay.com/v1/images/generations", { method: "POST", headers: { Authorization: `Bearer ${process.env.ZURELAY_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "model": "grok-imagine-image-2.0", "prompt": "Put the woman from the first image in front of the bakery from the third, holding the bottle from the second.", "images": [ "https://example.com/woman.jpg", "https://example.com/bottle.jpg", "https://example.com/bakery.jpg" ] }), }); console.log(await response.json()); ``` **cURL**: ```bash curl https://api.zurelay.com/v1/images/generations \ -H "Authorization: Bearer $ZURELAY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "grok-imagine-image-2.0", "prompt": "Put the woman from the first image in front of the bakery from the third, holding the bottle from the second.", "images": [ "https://example.com/woman.jpg", "https://example.com/bottle.jpg", "https://example.com/bakery.jpg" ] }' ``` ## Prompting - Describe the subject, the setting, the light and the medium in full sentences. - Put words that must appear in quotes and say where they go. - For edits, name what changes and what stays: “Change the sweater to deep blue. Keep everything else the same.” ## Good to know - Images take 15 to 75 seconds. - There’s no quality setting: every image is made at medium quality, the level priced above. - Prompts the model declines return `image_not_generated`, free of charge. - Links last 24 hours; the Library in your dashboard keeps images returned as links for 30 days. Model details and examples: [Grok Imagine Image 2.0](https://zurelay.com/models/grok-imagine-image-2.0). More on sending images: [Image editing and reference images](https://zurelay.com/docs/image-editing).