curl --request POST \
--url https://api.maxapi.io/api/v1/task/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "grok-imagine/image-to-image",
"callBackUrl": "https://example.com/webhook",
"input": {
"prompt": "Put the subject in a neon-lit alley at night",
"imageUrls": ["https://example.com/portrait.jpg"],
"n": 1
}
}'
{
"code": 0,
"msg": "ok",
"data": {
"taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
Grok Imagine Image-to-Image — Edit existing images with text prompts (xAI)
curl --request POST \
--url https://api.maxapi.io/api/v1/task/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "grok-imagine/image-to-image",
"callBackUrl": "https://example.com/webhook",
"input": {
"prompt": "Put the subject in a neon-lit alley at night",
"imageUrls": ["https://example.com/portrait.jpg"],
"n": 1
}
}'
{
"code": 0,
"msg": "ok",
"data": {
"taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
Edit up to two reference images with a text prompt. Upstream locks output to 1024×1024, soDocumentation Index
Fetch the complete documentation index at: https://docs.maxapi.io/llms.txt
Use this file to discover all available pages before exploring further.
ratio and resolution are not accepted.
grok-imagine/image-to-image — $0.015 per image.
grok-imagine/image-to-image.curl --request POST \
--url https://api.maxapi.io/api/v1/task/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "grok-imagine/image-to-image",
"callBackUrl": "https://example.com/webhook",
"input": {
"prompt": "Put the subject in a neon-lit alley at night",
"imageUrls": ["https://example.com/portrait.jpg"],
"n": 1
}
}'
{
"code": 0,
"msg": "ok",
"data": {
"taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}