Grok Imagine Image

AI Image Editing Model

$$ · 2¢

An image generation model by xAI designed to generate highly aesthetic images from text descriptions.

grok-imagine API OpenAI-compatible

Integrate Grok Imagine Image into your workflow via the Lumenfall OpenAI-compatible API to programmatically generate high-fidelity images and perform precise image edits. Use a single endpoint to access xAI's image generation technology using standard text-to-image parameters.

Base URL
https://api.lumenfall.ai/openai/v1
Model
grok-imagine-image

Text to Image Generate

Create images from text descriptions

curl -X POST \
  https://api.lumenfall.ai/openai/v1/images/generations \
  -H "Authorization: Bearer $LUMENFALL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-imagine-image",
    "prompt": "A serene mountain landscape at sunset",
    "size": "1024x1024"
  }'
# Response:
# { "created": 1234567890, "data": [{ "url": "https://...", "revised_prompt": "..." }] }

Image Editing Edit

Transform existing images with text instructions

curl -X POST \
  https://api.lumenfall.ai/openai/v1/images/edits \
  -H "Authorization: Bearer $LUMENFALL_API_KEY" \
  -F "model=grok-imagine-image" \
  -F "[email protected]" \
  -F "prompt=Add a starry night sky to this image" \
  -F "size=1024x1024"
# Response:
# { "created": 1234567890, "data": [{ "url": "https://...", "revised_prompt": "..." }] }