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/api

Endpoints

POST/api/generate

Generate 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

standard

Clean, high-quality default generation

nano-banana

Viral 3D clay render miniature style

anime

Japanese animation aesthetic

photorealism

Ultra-realistic photography style

cyberpunk

Neon-lit futuristic aesthetic

watercolor

Soft, 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 remainingGenerations field

Error Codes

StatusDescription
200Success - Image generated
400Bad Request - Missing or invalid prompt
429Rate Limited - Daily limit exceeded
500Server Error - Generation failed

Need Higher Limits?

Contact us for enterprise API access with higher rate limits and priority processing.

Contact for Enterprise