Flux Dev - Image Generator
Professional AI image generation model by Black Forest Labs. Flux Dev delivers high-quality image generation with balanced performance, advanced prompt following, and comprehensive customization options for professional creative workflows.
Endpoint
Request Headers
| Field | Value |
|---|---|
| API-KEY | <api-key> |
| Content-Type | application/json |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Feature type identifier. Must be IMAGE_GENERATOR |
model | string | Yes | AI model identifier. Must be black-forest-labs/flux-dev |
promptObject | object | Yes | Configuration object containing all generation parameters |
Prompt Object Parameters
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
prompt | string | Yes | Text description of the image to generate | - |
image_prompt | string | No | Path to input image from Asset API for image-to-image generation | - |
aspect_ratio | string | No | Image aspect ratio (1:1, 16:9, 9:16, 3:2, 2:3, 4:5, 5:4, custom) | 1:1 |
prompt_strength | number | No | Influence of prompt vs input image (0-1) | 0.8 |
num_inference_steps | number | No | Number of inference steps (1-50) | 28 |
guidance | number | No | Guidance scale for prompt adherence (0-50) | 3.5 |
seed | number | No | Random seed for reproducibility (0-4294967295) | Random |
output_quality | number | No | Output image quality (0-100) | 80 |
disable_safety_checker | boolean | No | Disable built-in safety filtering | false |
go_fast | boolean | No | Enable fastest generation mode | false |
megapixels | string | No | Output resolution in megapixels (0.25, 1, 2) | 1 |
Supported Aspect Ratios
| Ratio | Use Case |
|---|---|
| 1:1 | Square images, social media posts |
| 16:9 | Widescreen, video thumbnails |
| 9:16 | Vertical video, mobile screens |
| 3:2 | Standard photography |
| 2:3 | Portrait photography |
| 4:5 | Instagram posts |
| 5:4 | Landscape photography |
| custom | Use specific width/height values |
Quality Settings
| Setting | Range | Description |
|---|---|---|
| Inference Steps | 1-50 | More steps = higher quality but longer generation time |
| Guidance | 0-50 | How closely to follow the prompt (higher = more adherence) |
| Megapixels | 0.25, 1, 2 | Output resolution (2MP max for detailed work) |
| Output Quality | 0-100 | JPEG/WebP compression quality |
Advanced Features
| Feature | Description |
|---|---|
| Image-to-Image | Transform existing images using text prompts |
| High Resolution | Support up to 2 megapixel output |
| Fast Mode | Optimized generation for quick results |
| Safety Controls | Built-in content filtering with optional disable |
Code Examples
- cURL
- JavaScript
- Python
curl --location 'https://api.1min.ai/api/features' \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"type": "IMAGE_GENERATOR",
"model": "black-forest-labs/flux-dev",
"promptObject": {
"prompt": "A futuristic cityscape at sunset with flying cars and neon lights",
"aspect_ratio": "16:9",
"num_inference_steps": 28,
"guidance": 3.5,
"megapixels": "1",
"output_quality": 85
}
}'
fetch('https://api.1min.ai/api/features', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'API-KEY': 'YOUR_API_KEY'
},
body: JSON.stringify({
type: 'IMAGE_GENERATOR',
model: 'black-forest-labs/flux-dev',
promptObject: {
prompt: 'A futuristic cityscape at sunset with flying cars and neon lights',
aspect_ratio: '16:9',
num_inference_steps: 28,
guidance: 3.5,
megapixels: '1',
output_quality: 85
}
})
})
import requests
url = "https://api.1min.ai/api/features"
headers = {
"Content-Type": "application/json",
"API-KEY": "YOUR_API_KEY"
}
data = {
"type": "IMAGE_GENERATOR",
"model": "black-forest-labs/flux-dev",
"promptObject": {
"prompt": "A futuristic cityscape at sunset with flying cars and neon lights",
"aspect_ratio": "16:9",
"num_inference_steps": 28,
"guidance": 3.5,
"megapixels": "1",
"output_quality": 85
}
}
response = requests.post(url, headers=headers, json=data)
Interactive Playground
API Playground
https://api.1min.ai/api/featuresDescribe the image you want to generate
Path to input image from Asset API for image-to-image generation
Choose aspect ratio for your image
Influence of prompt vs input image (0-1)
Number of inference steps (1-50)
Guidance scale for prompt adherence (0-50)
Output resolution in megapixels
Enable fastest generation mode
Disable built-in safety filtering
Output image quality (0-100)
Random seed for reproducibility (0-4294967295)
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": "black-forest-labs/flux-dev",
"promptObject": {
"prompt": "A futuristic cityscape at sunset with flying cars and neon lights",
"aspect_ratio": "16:9",
"prompt_strength": 0.8,
"num_inference_steps": 28,
"guidance": 3.5,
"megapixels": "1",
"output_quality": 85
}
}'
Response Format
{
"aiRecord": {
"uuid": "e4f5g6h7-i8j9-0123-4567-890123defghi",
"userId": "user-12345",
"teamId": "team-67890",
"model": "black-forest-labs/flux-dev",
"type": "IMAGE_GENERATOR",
"status": "SUCCESS",
"createdAt": "2025-01-15T10:50:00.000Z",
"aiRecordDetail": {
"promptObject": {
"prompt": "A futuristic cityscape at sunset with flying cars and neon lights",
"aspect_ratio": "16:9",
"num_inference_steps": 28,
"guidance": 3.5,
"megapixels": "1",
"output_quality": 85
},
"resultObject": [
"development/images/2025_01_15_10_50_45_001_futuristic_cityscape.webp"
]
},
"temporaryUrl": "https://s3.us-east-1.amazonaws.com/asset.1min.ai/development/images/2025_01_15_10_50_45_001_futuristic_cityscape.webp?X-Amz-Algorithm=AWS4-HMAC-SHA256&..."
}
}
Use Cases
- Professional Design: High-quality imagery for commercial and creative projects
- Content Creation: Marketing materials, social media content, and visual assets
- Concept Art: Rapid prototyping of visual ideas and concepts
- Image Enhancement: Transform and improve existing images with AI
- Rapid Iteration: Fast generation for creative workflows and A/B testing
Tips for Best Results
-
Prompt Engineering:
- Use descriptive, specific language for better results
- Include style keywords (e.g., "photorealistic", "artistic", "minimalist")
- Specify lighting, composition, and mood details
-
Quality vs Speed:
- Higher inference steps (35-50) for maximum quality
- Lower steps (15-25) for faster generation
- Use "go_fast" for rapid prototyping
-
Image-to-Image:
- Use prompt strength 0.6-0.8 for balanced transformation
- Higher guidance (4-6) maintains more input image structure
- Lower prompt strength preserves original composition
-
Resolution Optimization:
- 0.25MP for quick previews and iterations
- 1MP for standard use cases and web content
- 2MP for high-quality prints and detailed work
Notes
Professional Quality
Flux Dev provides an optimal balance of speed and quality, making it ideal for professional workflows that require consistent, high-quality results without the complexity of LoRA customization.