The FLUX AI Studio API allows developers to integrate high-fidelity generative AI and computer vision models into mobile applications, web platforms, and automated asset pipelines.
https://api.fluxstudio.ai/v1
Authenticate all requests by including your secret API key in the x-api-key HTTP request header:
x-api-key: flx_live_9a8b7c6d5e4f3a2b1c0d
⚠️ Never expose your API key in client-side frontends. Proxy requests through your backend application server.
High-throughput batch pipeline processing up to 500 images per request. Automatically partitioned into concurrent chunks of 25 with automatic failure protection: credits are only finalized for completed outputs, and any failed items are instantly returned to your available balance.
curl -X POST https://api.fluxstudio.ai/v1/batches \
-H "Authorization: Bearer flx_live_sk_YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nightmareai/real-esrgan",
"inputs": [
{ "image": "https://example.com/item1.jpg", "scale": 4 },
{ "image": "https://example.com/item2.jpg", "scale": 4 },
{ "image": "https://example.com/item500.jpg", "scale": 4 }
]
}'
# Returns 202 Accepted:
# {
# "id": "batch_99fe21a",
# "status": "processing",
# "total_items": 500,
# "completed_items": 0,
# "credits_frozen": 125.00,
# "urls": { "get": "https://api.fluxstudio.ai/v1/batches/batch_99fe21a" }
# }
Poll GET https://api.fluxstudio.ai/v1/batches/:batch_id to inspect progress percentage and download completed CDN URLs.
curl https://api.fluxstudio.ai/v1/batches/batch_99fe21a \
-H "Authorization: Bearer flx_live_sk_YOUR_SECRET_KEY"
Call any specific hosted neural model directly by its model slug (e.g. black-forest-labs/flux-1.1-pro, black-forest-labs/flux-dev, nightmareai/real-esrgan, briaai/rmbg-1.4). Credits are deducted transparently based on the selected model rate.
curl -X POST https://api.fluxstudio.ai/v1/predictions \
-H "Authorization: Bearer flx_live_sk_YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "black-forest-labs/flux-1.1-pro",
"input": {
"prompt": "editorial fashion photography, high luxury jewelry, natural soft daylight",
"aspect_ratio": "4:5",
"output_format": "png"
}
}'
Extracts foreground subjects and returns an alpha-channel transparent PNG or isolated binary mask.
| Parameter | Type | Required | Description |
|---|---|---|---|
image_url |
string | Yes* | Public HTTPS URL of source image. (Or submit file via multipart upload) |
format |
string | No | png (default, transparent cutout) or mask (binary alpha matte) |
crop_to_object |
boolean | No | Trims outer transparent margins to bounding box. Default false |
curl -X POST https://api.fluxstudio.ai/v1/remove-background \
-H "x-api-key: YOUR_PRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"image_url": "https://images.unsplash.com/photo-1542291026-7eec264c27ff",
"format": "png",
"crop_to_object": false
}'
Super-resolves images up to 16K with AI neural texture synthesis, unblurring, and pore-level facial restoration.
| Parameter | Type | Required | Description |
|---|---|---|---|
image_url |
string | Yes | URL of low or medium resolution photo |
scale |
integer | No | Multiplier factor: 2, 4, or 8. Default 4 |
face_enhance |
boolean | No | Photorealistic facial pore restoration. Default true |
model |
string | No | flux-clarity, real-esrgan, or anime-ultrasharp |
Replaces or adds creative elements within a masked region using descriptive text guidance.
curl -X POST https://api.fluxstudio.ai/v1/generative-fill \
-H "x-api-key: YOUR_PRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"image_url": "https://example.com/room.jpg",
"mask_url": "https://example.com/mask.png",
"prompt": "luxurious emerald green velvet sofa with golden brass legs"
}'
Extends image canvas boundaries into wider aspect ratios with context-aware generative scenery.
curl -X POST https://api.fluxstudio.ai/v1/uncrop \
-H "x-api-key: YOUR_PRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"image_url": "https://example.com/portrait.jpg",
"aspect_ratio": "16:9",
"prompt": "modern loft with floor-to-ceiling windows overlooking downtown skyline"
}'
FLUX AI Studio operates on a unified, predictable credit system where 1 Credit has a baseline value of $0.01 USD. Your balance is only debited upon successful generation and delivery of your output, with precise fractional accounting for maximum cost efficiency.
Every endpoint and neural model has a fixed, transparent credit rate per generated output:
| Capability / Neural Model | Credit Cost per Call | Effective Rate | Typical Latency |
|---|---|---|---|
| Real-ESRGAN (4x Neural Upscaler) Basic photo restoration |
0.25 Credits | ~$0.0025 | ~0.35s |
| HD Background Cutout Sub-pixel edge segmentation |
1.00 Credit | ~$0.0100 | ~0.42s |
| Magic Eraser & Object Removal Context-aware inpainting |
1.00 Credit | ~$0.0100 | ~0.88s |
| Generative Fill Inpaint Prompted element replacement |
2.00 Credits | ~$0.0200 | ~1.84s |
| Uncrop & Generative Outpainting Natural canvas aspect expansion |
2.00 Credits | ~$0.0200 | ~1.62s |
| FLUX Schnell (Fast Generation) Ultra-fast 4-step diffusion |
4.00 Credits | ~$0.0400 | ~1.10s |
| FLUX Dev (High-Res Photorealism) Studio guidance & prompt fidelity |
12.00 Credits | ~$0.1200 | ~2.20s |
| Heavy 16K Upscaler Master Ultra-resolution texture synthesis |
18.00 Credits | ~$0.1800 | ~2.80s |
Top up your balance anytime through your Developer Console. Larger packs include generous volume bonus credits, lowering your effective cost per generation by up to 40%:
| Credit Pack | Credits | Price (USD) | Effective Rate | Volume Bonus |
|---|---|---|---|---|
| Developer Starter | 1,000 | $10.00 | $0.0100 / credit | Standard Baseline |
| Growth Pack | 5,000 | $45.00 | $0.0090 / credit | +10% Bonus |
| Scale Pack | 15,000 | $120.00 | $0.0080 / credit | +20% Bonus |
| Enterprise Pack | 50,000 | $350.00 | $0.0070 / credit | +30% Bonus |
| Mega Studio Pack | 100,000 | $680.00 | $0.0068 / credit | +32% Bonus |
| High-Volume SaaS Pack | 250,000 | $1,650.00 | $0.0066 / credit | +34% Bonus |
| Hyper Scale Pack | 500,000 | $3,200.00 | $0.0064 / credit | +36% Bonus |
| Ultimate Volume Pack | 900,000 | $5,400.00 | $0.0060 / credit | +40% Maximum Bonus |
| Enterprise Custom | > 900,000 | Contact Enterprise Support → (Dedicated compute clusters, custom SLA & invoiced Net-30 billing) | ||
Simulate endpoint requests directly in the browser to verify payload formats.
// Response preview will appear here...
Click "Test Request" above