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
Compatibility alias: grok-imagine-image-quality
prompt string required
Text description of the image to generate
n integer
Number of 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.
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
stringError code
message
stringDetailed error message
output array
Generation results, only present when status is completed
content
arrayList of generated resource content
type
stringResource type
Value:
image|videourl
stringProcessed resource URL
jobId
stringRemote task ID
usage object
Usage statistics, only present when status is completed
cost
stringTotal cost in USD
discount
numberDiscount amount
metadata object
Metadata information