GPT Image 2.5 is live — OpenAI's newest image model, targeted edits that leave the rest of the frame alone
rreAPI Docs

grok-imagine-image-2-0

Grok Imagine 2.0 on reAPI — two channels on one endpoint: text-to-image with 7 aspect ratios, or 14 ratios with 1k/2k output and image-to-image editing.

xAI's Grok Imagine 2.0 on reAPI, served by two channels with different parameter surfaces — pick one with the model field: grok-imagine-image-2-0 (text-to-image, 7 aspect ratios) or grok-imagine-image-2.0-official (14 aspect ratios, 1k/2k output, quality control, and image-to-image). Both return 1 to 12 images per request, billed per delivered image. Async-first: submit returns a task_id; poll until ready. See current pricing on the model page.

Quick example

curl https://reapi.ai/api/v1/images/generations \
  -H "Authorization: Bearer rk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-imagine-image-2-0",
    "prompt": "An editorial product poster for a ceramic pour-over kettle, bold headline type, soft studio light, generous negative space",
    "n": 4,
    "size": "3:2"
  }'
import requests

resp = requests.post(
    "https://reapi.ai/api/v1/images/generations",
    headers={
        "Authorization": "Bearer rk_live_xxx",
        "Content-Type": "application/json",
    },
    json={
        "model": "grok-imagine-image-2-0",
        "prompt": "An editorial product poster for a ceramic pour-over kettle, bold headline type, soft studio light, generous negative space",
        "n": 4,
        "size": "3:2",
    },
    timeout=30,
)
print(resp.json())
const r = await fetch("https://reapi.ai/api/v1/images/generations", {
  method: "POST",
  headers: {
    Authorization: "Bearer rk_live_xxx",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "grok-imagine-image-2-0",
    prompt:
      "An editorial product poster for a ceramic pour-over kettle, bold headline type, soft studio light, generous negative space",
    n: 4,
    size: "3:2",
  }),
});
console.log(await r.json());
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "io"
    "net/http"
)

func main() {
    body, _ := json.Marshal(map[string]any{
        "model":  "grok-imagine-image-2-0",
        "prompt": "An editorial product poster for a ceramic pour-over kettle, bold headline type, soft studio light, generous negative space",
        "n":      4,
        "size":   "3:2",
    })
    req, _ := http.NewRequest("POST", "https://reapi.ai/api/v1/images/generations", bytes.NewReader(body))
    req.Header.Set("Authorization", "Bearer rk_live_xxx")
    req.Header.Set("Content-Type", "application/json")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()
    out, _ := io.ReadAll(resp.Body)
    fmt.Println(string(out))
}

The response carries a task_id. Poll GET /api/v1/tasks/{task_id} until status is completed, then read result.images[].url.

Channels

This model is served by two independent channels with different parameter surfaces. Pick one with the model field:

model valueFramingImage-to-imageNotes
grok-imagine-image-2-0size, 7 ratios + 5 aliasesNoStandard channel, documented below.
grok-imagine-image-2.0-officialaspect_ratio, 14 ratiosYesOfficial channel.

They are not interchangeable: a size value is rejected by the official channel and an aspect_ratio value is rejected by the standard one. The resolution field exists on both but means different things.

Request body

Fields below apply to the standard channel (grok-imagine-image-2-0).

FieldTypeRequiredDefaultDescription
modelstringyesMust be grok-imagine-image-2-0.
promptstringyesImage description, used as written — there is no prompt-rewriting step. Up to 10000 characters.
nintegerno1Images to return, 112. Each delivered image is billed.
sizestringnovendorAspect ratio or pixel alias — see the table below. Values outside the list return a 400.
resolutionstringnovendorQuality mode. quality is the only accepted value, and it is already the default. This is not a pixel tier — framing is size.

size values

Seven aspect ratios:

ValueOrientationTypical use
1:1SquareProduct, avatar
2:3PortraitPoster, full-body
3:2LandscapePhoto, wide scene
3:4PortraitE-commerce, people
4:3LandscapeDisplay art
9:16VerticalStory / short-video cover
16:9WideBanner, video cover

Five pixel aliases are also accepted: 1024x1024 (1:1), 1024x1792 (2:3), 1792x1024 (3:2), 720x1280 (9:16), 1280x720 (16:9). Ratios not on this list — 1:2, 2:1, 4:5, auto — return 400 INVALID_REQUEST.

Actual output pixels are chosen by the model and may differ from the alias table — a 1:1 request commonly returns 1408x1408. Trust the returned image rather than assuming a fixed pixel size from the ratio you sent.

The standard channel is text-to-image only. It rejects image_urls, image, mask and every other reference field. For image-to-image on this model, use the official channel below, which accepts reference images. Region editing and background removal as demonstrated inside the Grok apps are still not part of either API surface.

Official channel

Send "model": "grok-imagine-image-2.0-official" to use the vendor's own parameter surface. It exposes wider framing control, a real pixel tier, a quality setting, and image-to-image.

FieldTypeRequiredDefaultDescription
modelstringyesMust be grok-imagine-image-2.0-official.
promptstringyesImage description. Up to 10000 characters.
nintegerno1Images to return, 112. Each delivered image is billed.
aspect_ratiostringnovendorOutput framing — 14 values, listed below. Does not change the rate.
resolutionstringno1kPixel tier: 1k or 2k. A billing dimension. Note this is a real tier here, unlike the standard channel.
qualitystringnomediumlow or medium. Also a billing dimension.
image_urlsstring[]noPublic http(s) URLs of reference images, 1–10. Present ⇒ image-to-image.

aspect_ratio values

1:1, 3:4, 4:3, 9:16, 16:9, 2:3, 3:2, 9:19.5, 19.5:9, 9:20, 20:9, 1:2, 2:1, auto.

auto lets the model pick the framing that suits the prompt. Values outside this list return 400 INVALID_REQUEST. Note the standard channel's size values are not accepted here, and these values are not accepted there.

resolution and quality stack: each step up raises the rate by the same increment, so 2k + medium is the most expensive combination and 1k + low the cheapest. aspect_ratio and framing are free. See the model page for the live rate of each combination.

Text-to-image on the official channel

curl https://reapi.ai/api/v1/images/generations \
  -H "Authorization: Bearer rk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-imagine-image-2.0-official",
    "prompt": "An editorial product poster for a ceramic pour-over kettle, bold headline type, soft studio light, generous negative space",
    "n": 1,
    "aspect_ratio": "16:9",
    "resolution": "2k",
    "quality": "medium"
  }'

The response is the same task_id envelope as the standard channel — poll GET /api/v1/tasks/{task_id} and read result.images[].url.

Image-to-image

Supplying image_urls switches the request to editing. Describe the change in prompt; with several references, refer to them in order as <IMAGE_0>, <IMAGE_1>, and so on.

curl https://reapi.ai/api/v1/images/generations \
  -H "Authorization: Bearer rk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-imagine-image-2.0-official",
    "prompt": "Place the product from <IMAGE_0> on the marble surface in <IMAGE_1>, matching the window light",
    "image_urls": [
      "https://example.com/product.png",
      "https://example.com/scene.jpg"
    ],
    "aspect_ratio": "1:1",
    "resolution": "2k"
  }'

Reference images must be public http(s) URLs — base64 and data: URIs are rejected platform-wide. Each reference image is billed on top of the generated image.

Response

Submission returns the standard async envelope:

{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01K8AYYM6R03TGZ3Q2P0TZVNPX"
    }
  ]
}

Polled completion (GET /api/v1/tasks/{task_id}):

{
  "code": 200,
  "data": {
    "status": "completed",
    "result": {
      "images": [
        { "url": "https://cdn.reapi.ai/..." },
        { "url": "https://cdn.reapi.ai/..." }
      ]
    }
  }
}

result.images carries one entry per delivered image, so a request with n: 4 returns four entries. Image URLs are valid for 24 hours from completion — re-host the asset to your own storage if you need durable access.

Pricing

Both channels bill per delivered image, multiplied by n, but they dimension the rate differently:

  • Standard — flat. Neither size nor resolution changes it, so a 16:9 image costs the same as a square one.
  • Officialresolution and quality each move the rate and stack, for four combinations across three price points (1k+medium and 2k+low settle at the same rate). aspect_ratio and n do not change the per-image rate. Reference images are billed on top.

A request with n: 12 costs twelve times a single image on either channel.

credits = ceil(per_image_usd × n × 1000)

1 credit = $0.001. The rounding happens once on the aggregate, not per image. See the model page for the live rate.

Failed generations are refunded automatically — the reserved credits return to your balance when a task ends in failure.

Errors

grok-imagine-image-2-0 shares the platform-wide error envelope. The validation surface is small:

  • prompt missing, empty, or whitespace-only → 400 INVALID_REQUEST.
  • prompt longer than 10000 characters → 400 INVALID_REQUEST.
  • n outside 112400 INVALID_REQUEST.
  • size outside the seven ratios and five pixel aliases → 400 INVALID_REQUEST.
  • resolution set to anything other than quality400 INVALID_REQUEST.
  • Any reference media (image_urls, image, mask) supplied → 400 INVALID_REQUEST with a text-to-image-only message.

On the official channel:

  • aspect_ratio outside its 14 values → 400 INVALID_REQUEST. The standard channel's pixel aliases (1024x1024 etc.) are not valid here.
  • resolution set to anything other than 1k / 2k400 INVALID_REQUEST. The standard channel's quality value is rejected.
  • quality set to anything other than low / medium400 INVALID_REQUEST.
  • More than 10 entries in image_urls, or a non-http(s) URL → 400 INVALID_REQUEST.

Tips

  • The prompt is rendered as written, so lens, lighting and material language survives to the render. A thin prompt stays thin — there is no rewriting layer filling in composition for you.
  • Ask for the shape you will ship. Generating 16:9 directly beats generating a square and cropping it, because the model composes for the frame.
  • Batch exploration in one call. Twelve variations of one brief cost the same as twelve separate single-image requests but take one round trip.

Table of Contents