API Free WeekHundreds of APIs are free to call this week.Browse free APIs

Grok Imagine Image 2.0 Edit

xai/grok-imagine-image/2.0/edit

Grok Imagine Image 2.0 Edit is xAI's intelligent image editing model. Transform, retouch, and reimagine existing images using text prompts - from background replacement to artistic style conversion.

Base price
$0.06USD / run
Execution
async
Model type
image
Input fields
6
Production route

Try the model

Playground

Open playground
Input
Text description of the desired image.

PNG, JPEG, WebP, or GIF · 20 MiB maximum each

List of URLs of the images to edit. A maximum of 3 images are supported.
Resolution of the generated image. `1k` for standard resolution, `2k` for high resolution. Allowed values: 1k, 2k.
The format of the generated image. Allowed values: jpeg, png.
Quality level of the edited image. Allowed values: low, medium.
The aspect ratio of the generated image. Allowed values: 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16.
OutputExample

Examples

Select an example to load its inputs and result into the playground.

Model card

Specifications

Pricing

Base price
$0.06 / run

Context & modalities

Input
Schema-defined
Output
image

Capabilities

Chat
Not supported
Vision
Not supported
Reasoning
Not supported
Structured output
Not supported
Function calling
Not supported
Audio input
Not supported

Access

Provider
xAI
Model ID
xai/grok-imagine-image/2.0/edit
Execution
async
Base URL
https://api.sandbase.ai
API
Unified Run API
Endpoint
/v1/run

Human preference

Arena

Elo ratings from blind side-by-side votes, compared with other image and video models.

Rankings sourced from Artificial Analysis Arena

Leaderboard
Image Editing
Rank
#9 of 80
Elo
1107 ±9
Gap to #1
−75

Image-editing arena: people pick the better of two edits of the same image and instruction, without seeing the model names.

  1. #4MAI-Image-2.6-FlashMicrosoft AI1126±8
  2. #5GPT Image 2 (high)OpenAIOn SandBase1122±8
  3. #6Muse ImageMeta1118±8
  4. #7MAI-Image-2.5Microsoft AIOn SandBase1112±8
  5. #8Nano Banana 2 (Gemini 3.1 Flash Image)GoogleOn SandBase1108±8
  6. #9Grok Imagine Image 2.0SpaceXAIThis model1107±9
  7. #10MAI-Image-2.5-ProMicrosoft AIOn SandBase1107±8
  8. #11Seedream 5.0 ProByteDance SeedOn SandBase1107±8
  9. #12GPT Image 1.5 (high)OpenAIOn SandBase1102±8
  10. #13Nano Banana Pro (Gemini 3 Pro Image)GoogleOn SandBase1099±8

API README

Grok Imagine Image 2.0 Edit

Grok Imagine Image 2.0 edit: change or combine images at two quality levels.

Fields

FieldTypeDefaultNotes
promptstring, required—Up to 8,000 characters.
imagesimage URL[]—Images to edit or combine, Image 1, Image 2, …
resolution1k / 2k1kSets the per-image rate.
output_formatjpeg / pngjpegOutput file format.
qualitylow / mediummediumSets the per-image rate.
aspect_ratio21:9 / 16:9 / 3:2 / 4:3 / 5:4 / 1:1 / 4:5 / 3:4 / 2:3 / 9:16—Output shape.

Billing

Per output image: $0.04 (low) or $0.06 (medium) at 1K; $0.06 or $0.08 at 2K; plus $0.01 per input image.

Request1k2k
low, 1 input$0.05$0.07
medium, 1 input$0.07$0.09

Failed runs are not charged.

Prompting

  • Quote any text that must appear.

Limits

  • One output image per request.

Also on SandBase

Other Grok Imagine Image endpoints: xai/grok-imagine-image/quality, xai/grok-imagine-image/quality/edit, xai/grok-imagine-image/edit, xai/grok-imagine-image/2.0/text-to-image.

Start building

Send your first request

OpenAI-compatible endpoint with unified authentication and usage tracking.

Production API
Unified Run API endpoint
https://api.sandbase.ai/v1/run
Model ID
xai/grok-imagine-image/2.0/edit
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
  -X POST "https://api.sandbase.ai/v1/run" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'SANDBASE_JSON'
{
  "model": "xai/grok-imagine-image/2.0/edit",
  "images": [
    "https://v3b.fal.media/files/b/0a8b911d/Abk8vStrvmSPlzUqI_NN3_image_043.png"
  ],
  "prompt": "Make this scene more realistic but still keep the game vibes",
  "quality": "medium",
  "resolution": "1k",
  "output_format": "jpeg"
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
  status=$(printf '%s' "$result" | jq -r .status)
  case "$status" in completed|failed|timeout) break ;; esac
  sleep 2
  result=$(curl --fail-with-body --silent \
    -H "Authorization: Bearer $SANDBASE_API_KEY" \
    "https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"

Choose your model

Compare models

All image & video models
ModelTypeDefault priceReleased
xAIImage$0.06 / runAug 11, 2026
xAIImage$0.06 / runAug 11, 2026
xAIImage$0.05 / runMay 7, 2026
xAIImage$0.05 / runMay 7, 2026
xAIImage$0.02 / runJan 29, 2026

Questions

FAQ

How do I call xAI Grok Imagine Image 2.0 Edit through SandBase?

Create a SandBase API key, then send requests with the model ID "xai/grok-imagine-image/2.0/edit" to Unified Run API (/v1/run) at https://api.sandbase.ai. The request examples on this page show the exact payload.

Do I need a separate xAI account?

No. One SandBase API key and balance gives you access to xAI Grok Imagine Image 2.0 Edit and the other models in the catalog; you do not need to sign up with xAI separately.