curl --request POST \
--url https://api.modellix.ai/api/v1/google/nano-banana-2 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "A colorful abstract painting with flowing shapes"
}
'{
"code": 0,
"message": "success",
"data": {
"status": "pending",
"task_id": "task-ghi789",
"model_id": "google/nano-banana-2",
"get_result": {
"method": "GET",
"url": "https://api.modellix.ai/api/v1/tasks/task-ghi789"
}
}
}{
"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"
}Nano Banana 2
[Core Function] Nano Banana 2 (Gemini 3.1 Flash Image) is an extremely fast text-to-image model. [Strengths] It is optimized for high-speed, high-volume visual generation, creative prompting, and rapid stylistic experimentation. [Best For] Highly recommended for: rapid creative iteration, generating large batches of images quickly, and artistic/stylized graphics. [Limitations] Do NOT use this model if you require strict, high-end photorealism; prefer Nano Banana Pro for higher-fidelity creative output. [Routing] Route to this model for ‘fast’, ‘creative’, or ‘stylized’ high-volume requests.
curl --request POST \
--url https://api.modellix.ai/api/v1/google/nano-banana-2 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "A colorful abstract painting with flowing shapes"
}
'{
"code": 0,
"message": "success",
"data": {
"status": "pending",
"task_id": "task-ghi789",
"model_id": "google/nano-banana-2",
"get_result": {
"method": "GET",
"url": "https://api.modellix.ai/api/v1/tasks/task-ghi789"
}
}
}{
"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"
}Authorizations
API Key authentication. Format: Bearer YOUR_API_KEY.
Body
Image description text
1"A colorful abstract painting with flowing shapes"
Image aspect ratio (14 options supported)
1:1, 1:4, 1:8, 2:3, 3:2, 3:4, 4:1, 4:3, 4:5, 5:4, 8:1, 9:16, 16:9, 21:9 "1:1"
Output image resolution
512, 1K, 2K, 4K "1K"