Skip to main content

Gemini 3.1 Flash Image Preview - Image Generator

Fast and efficient AI image generation model by Google AI. Gemini 3.1 Flash Image Preview delivers high-quality image generation optimized for speed, supporting flexible aspect ratios and multiple image sizes for a wide range of creative and commercial applications.

Endpoint

Request Headers

FieldValue
API-KEY<api-key>
Content-Typeapplication/json

Parameters

ParameterTypeRequiredDescription
typestringYesFeature type identifier. Must be IMAGE_GENERATOR
modelstringYesAI model identifier. Must be gemini-3.1-flash-image-preview
promptObjectobjectYesConfiguration object containing all generation parameters

Prompt Object Parameters

ParameterTypeRequiredDescriptionDefault
promptstringYesText description of the image to generate-
imageSizestringYesImage size quality. Must be one of: "512", "1K", "2K", or "4K"1K
aspectRatiostringNoAspect ratio for the generated image. Must be one of: "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"-
temperaturenumberNoControls randomness in generation (0.0-2.0). Higher values produce more creative results1.0
topPnumberNoNucleus sampling parameter (0.0-1.0). Controls diversity of output0.95

Code Examples

curl --location 'https://api.1min.ai/api/features' \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"type": "IMAGE_GENERATOR",
"model": "gemini-3.1-flash-image-preview",
"promptObject": {
"prompt": "A futuristic cityscape at sunset with flying vehicles and neon lights reflecting on glass buildings",
"imageSize": "2K",
"aspectRatio": "16:9",
"temperature": 1.0,
"topP": 0.95
}
}'

Interactive Playground

API Playground

https://api.1min.ai/api/features
Describe the image you want to generate
Image size quality. Must be one of: 512, 1K, 2K, or 4K
Aspect ratio for the generated image
Controls randomness (0.0-2.0). Higher = more creative
Nucleus sampling parameter (0.0-1.0). Controls diversity

Generated cURL Command:

curl -X POST "https://api.1min.ai/api/features" \
-H "API-KEY: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"type": "IMAGE_GENERATOR",
"model": "gemini-3.1-flash-image-preview",
"promptObject": {
"prompt": "A futuristic cityscape at sunset with flying vehicles and neon lights reflecting on glass buildings",
"imageSize": "2K",
"aspectRatio": "16:9",
"temperature": 1,
"topP": 0.95
}
}'

Response Format

{
"aiRecord": {
"uuid": "e4f5g6h7-i8j9-0123-4567-890123defghi",
"userId": "user-12345",
"teamId": "team-67890",
"model": "gemini-3.1-flash-image-preview",
"type": "IMAGE_GENERATOR",
"status": "SUCCESS",
"createdAt": "2025-01-15T10:50:00.000Z",
"aiRecordDetail": {
"promptObject": {
"prompt": "A futuristic cityscape at sunset with flying vehicles and neon lights reflecting on glass buildings",
"imageSize": "2K",
"aspectRatio": "16:9",
"temperature": 1.0,
"topP": 0.95
},
"resultObject": [
"development/images/2025_01_15_10_50_45_001_futuristic_cityscape.png"
]
},
"temporaryUrl": "https://s3.us-east-1.amazonaws.com/asset.1min.ai/development/images/2025_01_15_10_50_45_001_futuristic_cityscape.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&..."
}
}

Use Cases

  • Creative Content: High-quality imagery for social media and digital marketing
  • Professional Design: Business visuals, presentations, and brand assets
  • Product Visualization: Product imagery and concept visualization
  • Marketing Materials: Visuals for campaigns with flexible aspect ratios for different platforms
  • Digital Art: Illustrations and artistic creations at multiple resolutions
  • Content Optimization: Fast, cost-effective image generation for high-volume use cases