---
title: "Grok Imagine 2.0"
method: POST
path: "/generate/image/xai/grok-imagine-2"
tags: ["Image"]
---

# Grok Imagine 2.0

`POST /generate/image/xai/grok-imagine-2`

xAI's image model with selectable quality and 2K output.

## Headers

- `X-Webhook-URL` string, uri

## Request body

- object
  - `prompt` string, required
  - `quality` 'low' | 'medium'
  - `aspect_ratio` '2:1' | '20:9' | '19.5:9' | '16:9' | '3:2' | '4:3' | '1:1' | '3:4' | '2:3' | '9:16' | '9:19.5' | '9:20' | '1:2', required — Aspect ratio. One of: 2:1, 20:9, 19.5:9, 16:9, 3:2, 4:3, 1:1, 3:4, 2:3, 9:16, 9:19.5, 9:20, 1:2.
  - `resolution` '1K' | '2K', required — Resolution scale. One of: 1K, 2K.
  - `style_images` object[] — Image prompts to use for the generation
    - `strength` number, required
    - `url` string, uri — Can be an external URL, base64 data URI, or uploaded asset URL.

## Response `200`

The resulting job data. This will be returned in a pending state until the job is completed. See [`/jobs/{id}`](#tag/default/get/jobs/{id}) for retrieving the results.

- object
  - `job_id` string, uuid, required
  - `status` 'backlogged' | 'queued' | 'scheduled' | 'processing' | 'sampling' | 'intermediate-complete' | 'completed' | 'failed' | 'cancelled', required
  - `created_at` string, date-time, required
  - `completed_at` unknown, required
  - `result` unknown, required
  - `error` object
    - `code` string, required
    - `message` string

## Other responses

- `400` — The request body is invalid.
- `401` — You are not authenticated.
- `402` — You have run out of credits.
- `429` — You have reached the maximum number of concurrent jobs.

---

[API](https://skmtc.net/krea/apis/krea-api.md) · [All operations](https://skmtc.net/krea/apis/krea-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/krea/krea-api/revisions/316fd317ad58/schema)
