Image model

Grok Imagine Image

Grok Imagine Image is xAI’s faster, lower-cost image model for text-to-image and multi-image editing with flexible aspect ratios.

Model IDxai/grok-imagine-image

API

Call Grok Imagine Image

Every model takes the same request, so switching to Grok Imagine Image is a change to the model field. These samples are written for its own contract and send as they are.

import Mynth from "@mynthio/sdk";

const mynth = new Mynth();

const task = await mynth.image.generate({
  model: "xai/grok-imagine-image",
  prompt: "A lighthouse at dusk, 35mm film",
  size: "16:9",
});

console.log(task.urls[0]);

Specifications

What Grok Imagine Image accepts

Read from the same registry the API validates against. A request outside it is refused when the task is created, before anything is charged.

Modes and inputs

Text → Image
Prompt only
Image → Image
  • Up to 3 images
  • The model picks its own output size

Output

Aspect ratios
  • 1:1
  • 16:9
  • 9:16
  • 4:3
  • 3:4
  • 3:2
  • 2:3
  • 2:1
  • 1:2
  • 20:9
  • 9:20
  • 19.5:9
  • 9:19.5

Leave out size, or send auto, and Mynth picks one for the prompt. Any other ratio snaps to the closest of these. Sizes

4K
No. A 4k size fails the task

Prompt

Negative prompt
Not supported. Dropped before the provider call, no error
The contract as GET /models returns it
{
  "modes": {
    "txt->img": {},
    "img->img": {
      "inputs": {
        "rules": [
          {
            "type": "image",
            "max": 3
          }
        ]
      }
    }
  }
}

Pricing

What it costs

Pay per result, in USD, with no subscription. A failed image or video costs nothing. How pricing works

Rates

Image
$0.02 / image
Input image
Free

Estimate a request

Images
1

$0.021 × $0.02

Held when the task is created. Only images that succeed are charged.