🚀 Z-Image Turbo Image-to-Image is Live — Unlimited Generations for Premium Users

Try Now
Skip to main content

xAI/Grok Imagine Image Edit

grok-imagine-image-i2i
Grok Imagine Image EditLLMs.txt
API PlaygroundAPI Documentation

API Endpoint URL

Base URL for all API requests to this endpoint.

https://modelslab.com/api/v7/images/image-to-image

API Authentication

Authentication requires a valid API key included in the request. Generate and manage your API keys from your developer dashboard. Include the key in the key parameter for all API requests.

Integration Examples

Production-ready code samples for API integration

{
"prompt": "The girl in image 1 and the dog in image 2 together in same frame, in living room, sofa in the background",
"model_id": "grok-imagine-image-i2i",
"init_image": [
"https://assets.modelslab.com/generations/6670daf5-6550-445c-8972-e44a8a6b936c.webp",
"https://assets.modelslab.com/generations/a22193c5-ff9d-4cb0-a820-169af64bb8ba.png"
],
"aspect_ratio": "1:1",
"resolution": "2k",
"key": "YOUR_API_KEY"
}

SDKs

Official SDKs

Production-ready SDKs and client libraries for all major programming languages

API Parameters

Technical specifications for API request parameters.

Field NameParameterTechnical Description
PromptpromptDescribe in text how the image that need to be generated should appear.
Modelmodel_idModel id
Imagesinit_imageYou can edit upto 14 images in single generation
Aspect ratioaspect_ratioSelect the aspect ratio
ResolutionresolutionSelect the resolution 1k or 2k