| Model | Notes |
|---|---|
grok-imagine-image-2.0 | Supports quality; priced by quality and resolution tier |
grok-imagine-image | Fixed price per image; 2k costs the same |
| Use | Endpoint |
|---|---|
| Text to image | POST https://studio.dataeyes.ai/v1/images/generations |
| Image editing (with a reference image) | POST https://studio.dataeyes.ai/v1/images/edits (JSON) |
{
"data": [
{ "b64_json": "/9j/4AAQSkZJRgABAQAAAQAB…", "mime_type": "image/jpeg" }
]
}response_format, an image link is returned in data[].url. In our tests the link returned 403 from some networks, so b64_json is recommended.| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | grok-imagine-image-2.0 or grok-imagine-image |
prompt | string | Yes | Image description |
aspect_ratio | string | No | Aspect ratio, such as 1:1, 16:9, 9:16 |
resolution | string | No | 1k (default) or 2k |
quality | string | No | grok-imagine-image-2.0 only: low, medium, auto. Defaults to low for generation and medium for editing. high is not supported |
n | integer | No | Number of images, default 1; billed per image |
response_format | string | No | url (default) or b64_json |
size is not supported; use aspect_ratio and resolution instead. Sizes from our tests:| Setting | grok-imagine-image-2.0 | grok-imagine-image |
|---|---|---|
| Default | 1024×1024 | 1248×832 |
resolution: "2k" | 2048×2048 | 2496×1664 |
aspect_ratio: "16:9", 1k | 1280×720 | |
aspect_ratio: "9:16", 2k | 1584×2816 |
POST https://studio.dataeyes.ai/v1/images/edits with a JSON body. Put the reference image in the image object; url can be a public image URL or data:image/png;base64,.... Both models support editing.multipart/form-data file uploads are not supported (the OpenAI SDK's images.edit does not work).image to /v1/images/generations: the reference image has no effect there.grok-imagine-image has a fixed price per image; grok-imagine-image-2.0 is tiered by quality and resolution. For editing, the reference image is billed as input in addition. See prices in the Model Hub and charges in Usage logs. Failed requests are not billed.