Sand AISand AI MAGI-2MAGI-2 が SandBase に登場しました: ネイティブ音声付き 1080p 動画今すぐ試す
テキストから画像xAI

Grok Imagine Image

APIドキュメント
x-ai/grok-imagine-image

Grok Imagine Image by xAI generates images from a prompt or edits up to 5 input images, at $0.02 per image. Call it from this page, through /v1/run, or with the xAI Images API at SandBase.

モデルを試す

プレイグラウンド

Playground を開く
入力
Describe the image, or the change to make to the input images.

PNG, JPEG, WebP, or GIF · 20 MiB maximum each · up to 5

Up to 5 images to edit or combine (upload or public HTTPS URL). Leave empty to generate from the prompt.
Output aspect ratio. auto picks one from the prompt or the first input image.
Output size: 1k or 2k.
詳細設定
110
Images to generate (1-10). Each image is billed. 範囲: 1 から 10 まで。

Fill in prompt to run

Per run$0.02
結果
待機中

出力はここに表示されます

入力を完了してから[実行]をクリックしてください。

Grok Imagine Image

Grok Imagine Image is xAI's previous image model, at $0.02 per image. It generates images from a prompt, or edits and combines up to 5 input images. For better quality and 1.5K output, use Grok Imagine Image 2.0.

Use the form on this page, call x-ai/grok-imagine-image through /v1/run, or call the xAI API below with model: grok-imagine-image. Both bill the same as xAI.

Inputs

FieldTypeDefaultNotes
promptstring, required—What to draw, or what to change.
imagesimage list, up to 5—Images to edit or combine. Leave empty to generate.
ninteger 1–101Images to generate.
aspect_ratioauto1:116:99:164:33:43:22:32:11:219.5:99:19.520:99:2021:95:2autoOutput shape.
resolution1k / 2k1kOutput size; the price is the same.

xAI API

SandBase implements xAI's Images and Videos API under https://api.sandbase.ai/grok/v1. Requests and responses match xAI's API reference field by field, so the xAI SDK or any OpenAI-style HTTP client works after you change the base URL and use your SandBase API key.

xAISandBase
Base URLhttps://api.x.ai/v1https://api.sandbase.ai/grok/v1
GeneratePOST /images/generationsPOST /images/generations
EditPOST /images/editsPOST /images/edits
Deferred resultGET /images/{request_id}GET /images/{request_id}
modelgrok-imagine-imagegrok-imagine-image
curl https://api.sandbase.ai/grok/v1/images/edits \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-imagine-image",
    "prompt": "Turn this photo into a watercolor painting",
    "image": {"url": "https://example.com/photo.jpg"},
    "response_format": "url"
  }'

quality and resolution: 1.5k are only available on Grok Imagine Image 2.0 and return 400 here, as they do at xAI.

Billing

$0.02 per image. Editing adds $0.002 per input image. Failed runs are not billed.

RequestPrice
Generate 1 image$0.02
Generate 4 images$0.08
Edit 1 input image$0.022

One mode at a time

Learn more