Back to Generator
API Documentation
Flux Image Generation API
Integrate AI image generation into your applications with our simple REST API. Generate stunning images programmatically with support for multiple art styles.
Fast Generation
Rate Limited
5 Req/Day (Free)
Quick Start
curl -X POST https://fluximagegen.com/api/generate \
-H "Content-Type: application/json" \
-d '{
"prompt": "A serene mountain landscape at sunset",
"style": "photorealism"
}'Base URL
https://fluximagegen.com/apiEndpoints
POST
/api/generateGenerate an image from a text prompt
Request Body
prompt: string (required) - The text description of the image
style: string (optional) - Art style: standard, nano-banana, anime, photorealism, cyberpunk, watercolor
Response
success: boolean - Whether generation succeeded
imageUrl: string - URL of the generated image
prompt: string - The processed prompt used
remainingGenerations: number - Remaining daily generations
Available Styles
standardClean, high-quality default generation
nano-bananaViral 3D clay render miniature style
animeJapanese animation aesthetic
photorealismUltra-realistic photography style
cyberpunkNeon-lit futuristic aesthetic
watercolorSoft, artistic painting style
Code Examples
JavaScript / Node.js
const response = await fetch('https://fluximagegen.com/api/generate', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
prompt: 'A serene mountain landscape at sunset',
style: 'photorealism'
})
});
const data = await response.json();
console.log(data.imageUrl);Python
import requests
response = requests.post(
'https://fluximagegen.com/api/generate',
json={
'prompt': 'A serene mountain landscape at sunset',
'style': 'photorealism'
}
)
data = response.json()
print(data['imageUrl'])Rate Limiting
Free Tier Limits
- • 5 image generations per day per IP address
- • Rate limits reset at midnight UTC
- • Each generation takes approximately 10-30 seconds
- • Remaining generations returned in
remainingGenerationsfield
Error Codes
| Status | Description |
|---|---|
200 | Success - Image generated |
400 | Bad Request - Missing or invalid prompt |
429 | Rate Limited - Daily limit exceeded |
500 | Server Error - Generation failed |
Need Higher Limits?
Contact us for enterprise API access with higher rate limits and priority processing.
Contact for Enterprise