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

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
결과
대기 중

출력이 여기에 표시됩니다

입력을 완료한 다음 Run을 클릭하세요.

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