# Grok Imagine Image Edit > AI model for generating image content ## Overview - **Model ID**: `grok-imagine-image-i2i` - **Category**: image - **Provider**: xai - **Status**: model_ready - **Screenshot**: `https://assets.modelslab.com/generations/b94d1192-9d5b-4dd7-be5a-ddc9c10b8a0e.webp` ## API Information This model can be used via our HTTP API. See the API documentation and usage examples below. ### Endpoint - **URL**: `https://modelslab.com/api/v7/images/image-to-image` - **Method**: POST ### Parameters - **`prompt`** (required): Describe in text how the image that need to be generated should appear. - Type: textarea - **`model_id`** (optional): Model id - Type: text - **`init_image`** (required): You can edit upto 14 images in single generation - Type: array - **`aspect_ratio`** (required): Select the aspect ratio - Type: select (options: 1:1, 9:16, 3:4, 4:3, 16:9) - **`resolution`** (optional): Select the resolution 1k or 2k - Type: select (options: 1k, 2k) ## Usage Examples ### cURL ```bash curl --request POST \ --url https://modelslab.com/api/v7/images/image-to-image \ --header "Content-Type: application/json" \ --data '{ "key": "YOUR_API_KEY", "model_id": "grok-imagine-image-i2i", "prompt": "The girl in image 1 and the dog in image 2 together in same frame, in living room, sofa in the background", "aspect_ratio": "1:1", "resolution": "2k" }' ``` ### Python ```python import requests response = requests.post( "https://modelslab.com/api/v7/images/image-to-image", headers={ "Content-Type": "application/json" }, json={ "key": "YOUR_API_KEY", "model_id": "grok-imagine-image-i2i", "prompt": "The girl in image 1 and the dog in image 2 together in same frame, in living room, sofa in the background", "aspect_ratio": "1:1", "resolution": "2k" } ) print(response.json()) ``` ### JavaScript ```javascript fetch("https://modelslab.com/api/v7/images/image-to-image", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ "key": "YOUR_API_KEY", "model_id": "grok-imagine-image-i2i", "prompt": "The girl in image 1 and the dog in image 2 together in same frame, in living room, sofa in the background", "aspect_ratio": "1:1", "resolution": "2k" }) }) .then(response => response.json()) .then(data => console.log(data)); ``` ## Links - [Model Playground](https://modelslab.com/models/grok-imagine-image-edit/grok-imagine-image-i2i) - [API Documentation](https://docs.modelslab.com) - [ModelsLab Platform](https://modelslab.com)