⌘K

Grok Imagine Image Quality Edit

grok_imagine_image_quality_edit

Grok Imagine Image Quality Edit transforms one or more input images from a text instruction through the Vtrix generation API.

Authentication

authorization string required

All APIs require authentication via Bearer Token.

Get API Key:

Visit API Key Management Page to get your API Key.

Usage:

Add to request header:

Authorization: Bearer YOUR_API_KEY

Parameters

model string required

Model ID to use for the request

Canonical value: grok_imagine_image_quality_edit

Compatibility alias: grok-imagine-image-quality-edit


prompt string required

Text instruction describing the requested image edit


image object

Single input image to edit. Use images when providing multiple input images

url string required

Public image URL or Base64-encoded data URL in JPEG, PNG, or WebP format

type string

Image reference type

Value: image_url


images array<object>

Multiple input images to use for the edit. Each item uses the same structure as image

url string required

Public image URL or Base64-encoded data URL in JPEG, PNG, or WebP format

type string

Image reference type

Value: image_url


n integer

Number of edited images to generate

Default: 1


response_format string

Image response format requested from the upstream image API

Options: url, b64_json

Default: url


API Boundary

Call this model through /model/v1/generation. It is not exposed through the OpenAI Images or Queue endpoints.

Input Image Behavior

Provide image for a single reference or images for multiple references. At least one of these parameters is required. Vtrix accepts public image URLs and Base64 data URLs at the generation boundary.

Output Behavior

The final task output contains hosted image URLs in output[].content[].url. When the upstream model returns Base64 image data, Vtrix uploads the image and returns the hosted URL instead of exposing the raw Base64 payload.

Polling

Since result generation takes time, you need to poll the task status after creating the task.

The initial response only returns information such as the task ID and initial status. The final result must be obtained by polling the task status endpoint using the task ID.

See the examples on the right for polling requests and responses.

Response Format

error object

Error information, only present when status is failed

code string

Error code

message string

Detailed error message


output array

Generation results, only present when status is completed

content array

List of generated resource content

type string

Resource type

Value: image|video

url string

Processed resource URL

jobId string

Remote task ID


usage object

Usage statistics, only present when status is completed

cost string

Total cost in USD

discount number

Discount amount


metadata object

Metadata information