About Grok Imagine - Text to Image
Grok Imagine text-to-image is part of xAI's Grok Imagine suite, a multimodal creative stack supporting text-to-image generation with strong prompt adherence, cinematic aesthetics, style adaptation (including anime), and advanced world/physics understanding. It excels in believable lighting, coherent composition, and production-ready outputs suitable for video game ads and creative workflows.
Ready to build with Grok Imagine - Text to Image?
Try Grok Imagine - Text to Image in the Workbench to prompt it, compare outputs, and iterate on prompts without writing any code. When you're ready to ship, call the same model from our API and build your own apps on top of it.
curl -sSf -X POST https://hub.oxen.ai/api/ai/images/generate \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OXEN_API_KEY" \
-d '{
"model": "xai-grok-imagine-image",
"prompt": "Minimalist ox silhouette dissolving into golden particle streams, sumi-e brushwork meets generative art, zen simplicity with data-driven particle flow, lunar new year energy captured in motion",
"aspect_ratio": "16:9",
"resolution": "2k",
"output_format": "webp"
}'Request parameters
Every field Grok Imagine - Text to Image accepts in the request body. See the API reference for response formats.
POST
https://hub.oxen.ai/api/ai/images/generate| Field | Type | Required | Default | Description |
|---|---|---|---|---|
prompt | string | Yes | — | Prompt for generated image |
aspect_ratio | string | No | "16:9" | 1:116:99:164:33:43:22:32:120:919.5:99:19.59:201:2 |
resolution | string | No | "2k" | 1k2k |
output_format | string | No | "webp" | Format of the output imageswebpjpegpng |