Grok Imagine Image Edit
xai/grok-imagine-image/editGrok Imagine Image 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.02USD / run
- Execution
- async
- Model type
- image
- Input fields
- 5
Try the model
Playground
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
Examples
Select an example to load its inputs and result into the playground.
Model card
Specifications
Pricing
- Base price
- $0.02 / 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/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
- #26 of 77
- Elo
- 1073 ±13
- Gap to #1
- −126
Image-editing arena: people pick the better of two edits of the same image and instruction, without seeing the model names.
- #21MAI-Image-2.5-Flash1091±13
- #22Qwen-Image-3.0-Pro1091±13
- #23Fibo 2.01088±14
- #24Qwen-Image-2.11081±13
- #25Luma UNI 1 Max1079±13
- #26grok-imagine-image1073±13
- #27FLUX 3 Image Klein1072±14
- #28Ideogram 4.5 (High)1070±15
- #29Qwen-Image-2.1-Pro1069±13
- #30Qwen-Image-3.01068±13
API README
Grok Imagine Image Edit
Grok Imagine Image edit (standard): fast, low-cost image edits.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 8,000 characters. |
images | image URL[] | — | Images to edit or combine, Image 1, Image 2, … |
resolution | 1k / 2k | 1k | Sets the per-image rate. |
aspect_ratio | 21:9 / 16:9 / 3:2 / 4:3 / 5:4 / 1:1 / 4:5 / 3:4 / 2:3 / 9:16 | — | Output shape. |
output_format | jpeg / png | jpeg | Output file format. |
Billing
$0.02 per output image plus $0.002 per input image.
| Request | Price |
|---|---|
| 1 input image | $0.022 |
| 3 input images | $0.026 |
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/2.0/text-to-image, xai/grok-imagine-image/2.0/edit.
Start building
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
# 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/edit",
"images": [
"https://static.sandbase.ai/examples/xai/grok-imagine-image/edit/input_images_0.png"
],
"prompt": "Make this scene more realistic but still keep the game vibes",
"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
| Model | Type | Default price | Released |
|---|---|---|---|
Grok Imagine Image EditThis model xAI | Image | $0.02 / run | Jan 29, 2026 |
xAI | Image | $0.06 / run | Aug 11, 2026 |
xAI | Image | $0.06 / run | Aug 11, 2026 |
xAI | Image | $0.05 / run | May 7, 2026 |
xAI | Image | $0.05 / run | May 7, 2026 |
Questions
FAQ
How do I call xAI Grok Imagine Image Edit through SandBase?
Create a SandBase API key, then send requests with the model ID "xai/grok-imagine-image/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 Edit and the other models in the catalog; you do not need to sign up with xAI separately.

