curl --request POST \
--url https://api.modellix.ai/api/v1/xai/grok-imagine-image \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "A serene Japanese garden with a koi pond in spring"
}
'{
"code": 0,
"message": "success",
"data": {
"status": "pending",
"task_id": "task-xai-t2i-002",
"model_id": "xai/grok-imagine-image",
"get_result": {
"method": "GET",
"url": "https://api.modellix.ai/api/v1/tasks/task-xai-t2i-002"
}
}
}{
"code": 400,
"message": "Invalid parameters: parameter 'prompt' is required"
}{
"code": 401,
"message": "Authentication failed: invalid API key"
}{
"code": 429,
"message": "Rate limit exceeded: 100 requests per minute, retry after 60 seconds"
}{
"code": 500,
"message": "Internal server error"
}Grok Imagine Image
[Core Function] Grok Imagine Image is xAI’s standard text-to-image generation model. [Strengths] It excels at quickly generating solid, visually appealing images from a text prompt across a wide range of aspect ratios. [Best For] Highly recommended for: rapid prototyping, social media content, and general-purpose image generation. [Limitations] Do NOT use this model when maximum detail or fidelity is required; the Quality variant produces richer detail. [Routing] Choose this model for fast, general image generation. When the user demands maximum fidelity, route to Grok Imagine Image (Quality).
POST
/
xai
/
grok-imagine-image
curl --request POST \
--url https://api.modellix.ai/api/v1/xai/grok-imagine-image \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "A serene Japanese garden with a koi pond in spring"
}
'{
"code": 0,
"message": "success",
"data": {
"status": "pending",
"task_id": "task-xai-t2i-002",
"model_id": "xai/grok-imagine-image",
"get_result": {
"method": "GET",
"url": "https://api.modellix.ai/api/v1/tasks/task-xai-t2i-002"
}
}
}{
"code": 400,
"message": "Invalid parameters: parameter 'prompt' is required"
}{
"code": 401,
"message": "Authentication failed: invalid API key"
}{
"code": 429,
"message": "Rate limit exceeded: 100 requests per minute, retry after 60 seconds"
}{
"code": 500,
"message": "Internal server error"
}Body
application/json
xAI Grok Imagine text-to-image request. Shared by the Quality and standard image generation models.