xAIImage to imageComing soon
grok-imagine-image/edit
grok-imagine-image/edit is an image to image tool from xAI that runs in the background and returns images. Coming soon: listed with its price, not yet open to runs.
This tool is listed but not yet available to run.
Priced by usagePricing
$0.026 per image. Billed on n, default 1. The final charge comes from usage.
Limits
- Runs
- In the background
- Returns
- image
- Longest queue wait
- 3600s
- Run deadline
- 1800s
- Largest inline input
- 1024 KB
- Largest input file
- 500 MB
- Largest output
- 4768 MB
- Outputs per run
- 16
Input
| Field | Kind | Default | Description |
|---|---|---|---|
prompt required | text | — | Prompt for image editing. |
n | number (whole) | — | Number of image edits to be generated. |
image | JSON | — | Input image to perform edit on. Mutually exclusive with `images`. |
images | JSON | — | List of input images for multi-reference editing. Mutually exclusive with `image`. When multiple images are provided, refer to them as \<IMAGE_0\>, \<IMAGE_1\>, etc. in the prompt. |
resolution | one of 1k, 2k, 1.5k | — | Resolution of the generated image. Defaults to `1k`. Only supported by grok-imagine models. |
aspect_ratio | one of 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, 21:9, 5:2, auto | — | Aspect ratio of the output image for image editing with multiple images. For single image editing, do not set this. It will always auto-detect from the input image. |
Same request in code
curl https://api.spiral.ai/v1/runs \
-H "Authorization: Bearer $SPIRAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"provider": "xai",
"model": "grok-imagine-image/edit",
"input": {
"prompt": "<prompt>"
}
}'