Sign in

FLUX.2 Flex
flux-2-flexFLUX.2 [flex] excels at rendering complex text, typography, and fine details, and supports multi-reference editing within the same unified architecture.
Playground
Pricing
| Billing item | Price |
|---|---|
| Image generation (per megapixel) | $0.0600 / megapixel |
| Reference image (per megapixel) | $0.0600 / megapixel |
How billing works:
- 1 megapixel = 1024×1024 pixels
- Resolution is always rounded up to the next megapixel
- Generated images and reference images are billed separately
- With multiple reference images, each one is billed as 1 megapixel
- Images larger than 4 megapixels are resized down to 4 megapixels
Example:A 1024×1024 image (1 megapixel) costs $0.0600; a 2048×2048 image (4 megapixels) costs $0.2400
Overview
Input
Text Image
Output
Image
API
API integration
Model ID
flux-2-flexUse this value as the model in image generation requests
API Key
View it in API key management
Bearer token (OAuth 2.0) used to authenticate image generation requests
Image API
https://api.seawhaleai.com/v2/images/generationsImage size
1:1
Square — avatars and icons
2:3
Portrait — phone wallpapers and posters
3:2
Landscape — scenery and banners
3:4
Portrait — Instagram vertical
4:5
Portrait — social media content
5:4
Landscape — presentation slides
9:16
Vertical — full-screen mobile and Stories
16:9
Widescreen — video thumbnails and desktop wallpapers
21:9
Ultrawide — cinematic framing
Multiple aspect ratios are supported for different use cases — social media, ads, wallpapers and more.
flux-2-flex usage examples
The SeaWhale AI image generation endpoint is compatible with the OpenAI Images API and can be called with standard HTTP requests.
js
curl https://api.seawhaleai.com/v2/images/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <API_KEY>" \
-d '{
"model": "flux-2-flex",
"prompt": "A cute kitten playing in the sunshine",
"aspect_ratio": "1:1"
}'js
import requests
url = "https://api.seawhaleai.com/v2/images/generations"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer <API_KEY>",
}
payload = {
"model": "flux-2-flex",
"prompt": "A cute kitten playing in the sunshine",
"aspect_ratio": "1:1",
}
response = requests.post(url, json=payload, headers=headers)
response.raise_for_status()
data = response.json()
print(data["data"][0]["url"])js
const response = await fetch('https://api.seawhaleai.com/v2/images/generations', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer <API_KEY>',
},
body: JSON.stringify({
model: 'flux-2-flex',
prompt: 'A cute kitten playing in the sunshine',
aspect_ratio: '1:1',
}),
})
const data = await response.json()
console.log(data.data[0].url)