---
title: "Grok Imagine Image Text-to-Image API & Playground - Comfy"
description: "Grok Imagine Image Text-to-Image by xAI: Generates an image quickly with selectable 1K/2K resolution. Typical cost: 4.2 credits per run."
canonical: https://comfy.org/hub/models/grok-imagine-image-text-to-image/
lang: en
index: https://comfy.org/llms.txt
---

[Models](https://comfy.org/hub/models/)

xAI

[Generate images](https://comfy.org/hub/models/?useCase=generate-images)

# Grok Imagine Image Text-to-Image

Generates an image quickly with selectable 1K/2K resolution.

- Use via API
- [Open in Cloud](https://stagingcloud.comfy.org/)

4.2 credits /Run

- [fast](https://comfy.org/hub/models/?q=fast)
- [text-to-image](https://comfy.org/hub/models/?q=text-to-image)

## Playground

Input

Prompt

Aspect ratio

Resolution

Output

![Grok Imagine Image Text-to-Image: Cyber-ronin at the waterline](https://media.comfy.org/website/workshop/xai/grok-imagine-image/cyber-ronin-at-the-waterline.png)

Example

## Try an example

-
-
-

## Call this model from your code

Sends your Playground inputs to Comfy Router.

[API docs (opens in a new tab)](https://docs.comfy.org/development/comfy-router/models#xai)

1. ### Get an API key

  Needs a paid Cloud plan with credits.

  [Get an API key (opens in a new tab)](https://platform.comfy.org/profile/api-keys?onboarding=models&model=xai--grok-imagine-image--generate-images)
2. ### Install the SDK

  Python 3.10+. Also on npm as @comfyorg/sdk.

  pip install comfy-sdk==0.2.0
3. ### Run it

  Calls Comfy Router at this endpoint with your COMFY_API_KEY.

  POST /v2/models/xai/grok-imagine-image

Fill in the Playground inputs to generate a request.

## More from xAI

Compare xAI's other models. Price is the default setting; resolution and duration show the full range each model offers.

| Model | Price | Resolution | Duration |
| --- | --- | --- | --- |
| [Grok Imagine Image 2.0 Text-to-Image](https://comfy.org/hub/models/grok-imagine-image-2-0-text-to-image/) | — | 1K – 2K | — |
| [Grok Imagine Video 1.5 Text-to-Video](https://comfy.org/hub/models/grok-imagine-video-1-5-text-to-video/) | — | 480p – 1080p | 1 – 15s |
| [Grok Imagine Video Image-to-Video](https://comfy.org/hub/models/grok-imagine-video-image-to-video/) | 63.7 credits /Run | 480p – 720p | 1 – 15s |
| [Grok Imagine Video Reference-to-Video](https://comfy.org/hub/models/grok-imagine-video-reference-to-video/) | 63.7 credits /Run | 480p – 720p | 1 – 15s |
| [Grok Imagine Video Text-to-Video](https://comfy.org/hub/models/grok-imagine-video-text-to-video/) | 63.3 credits /Run | 480p – 720p | 1 – 15s |
| [Grok Imagine Video 1.5 Reference-to-Video](https://comfy.org/hub/models/grok-imagine-video-1-5-reference-to-video/) | 147.8 credits /Run | 480p – 1080p | 1 – 15s |
| [Grok Imagine Video 1.5 Image-to-Video](https://comfy.org/hub/models/grok-imagine-video-1-5-image-to-video/) | 147.8 credits /Run | 480p – 1080p | 1 – 15s |
