BFL FLUX Models
Black Forest Labs' FLUX series image generation models, known for outstanding image quality and text rendering capabilities.
Try it Online
Quick Start
python
from openai import OpenAI
client = OpenAI(
base_url="https://open.dieyuyun.com/v1",
api_key="YOUR_API_KEY"
)
response = client.images.generate(
model="flux-1.1-pro",
prompt="A neon-lit cyberpunk city street at night, rain reflections on the ground",
size="1024x1024",
n=1
)
print(response.data[0].url)Endpoint
| Item | Value |
|---|---|
| Method | POST |
| Path | /v1/images/generations |
| Base URL | https://open.dieyuyun.com |
| Protocol | OpenAI Images API |
Authentication
Bearer Token: Authorization: Bearer YOUR_API_KEY
Available Models
| Model Code | Description |
|---|---|
flux-1.1-pro | FLUX 1.1 Pro, high-quality professional version (default) |
flux-pro | FLUX Pro, high-quality version |
flux-dev | FLUX Dev, development version, faster speed |
flux-schnell | FLUX Schnell, fastest version, ideal for rapid iteration |
Standard Request Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| model | string | Yes | — | Model identifier, e.g. flux-1.1-pro |
| prompt | string | Yes | — | Image description text |
| size | string | No | 1024x1024 | Image size |
| quality | string | No | standard | Generation quality: standard, hd |
| n | integer | No | 1 | Number of images to generate |
| response_format | string | No | url | Response format: url or b64_json |
Supported Sizes
| Size | Aspect Ratio | Description |
|---|---|---|
1024x1024 | 1:1 | Square |
1536x1024 | 3:2 | Landscape |
1024x1536 | 2:3 | Portrait |
1344x768 | 16:9 | Widescreen |
768x1344 | 9:16 | Vertical |
Request Examples
bash
curl https://open.dieyuyun.com/v1/images/generations \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "flux-1.1-pro",
"prompt": "A neon-lit cyberpunk city street at night, rain reflections on the ground",
"size": "1024x1024",
"n": 1
}'python
from openai import OpenAI
client = OpenAI(
base_url="https://open.dieyuyun.com/v1",
api_key="YOUR_API_KEY"
)
response = client.images.generate(
model="flux-1.1-pro",
prompt="A neon-lit cyberpunk city street at night, rain reflections on the ground",
size="1024x1024",
n=1
)
print(response.data[0].url)javascript
import OpenAI from 'openai'
const client = new OpenAI({
baseURL: 'https://open.dieyuyun.com/v1',
apiKey: 'YOUR_API_KEY',
})
const response = await client.images.generate({
model: 'flux-1.1-pro',
prompt: 'A neon-lit cyberpunk city street at night, rain reflections on the ground',
size: '1024x1024',
n: 1,
})
console.log(response.data[0].url)Response Format
Success Response
json
{
"created": 1717000000,
"data": [
{
"url": "https://...",
"revised_prompt": "..."
}
]
}| Field | Type | Description |
|---|---|---|
| created | integer | Unix timestamp |
| data | array | Array of generated results |
| data[].url | string | Image URL |
| data[].revised_prompt | string | The revised/optimized prompt used for generation |
Error Response
See Error Codes for details.
Best Practices
- Model selection: Choose
flux-1.1-profor the highest quality,flux-schnellfor rapid iteration, andflux-devfor a balance of speed and quality. - Text rendering: The FLUX series excels at rendering text within images compared to most models, making it ideal for scenes with text elements (posters, banners, etc.).
- Prompt style: FLUX responds well to natural language descriptions. Write prompts like you would describe a scene naturally, without excessive keyword stacking.
- High-resolution output: For larger dimensions, choose non-square resolutions like
1536x1024or1344x768for better widescreen results.
Rate Limits
See Rate Limits for details.
Related Documentation
- GPT Image 2 - OpenAI image generation model
- Model List & Pricing - Browse available models and pricing
- Playground - Test image generation interactively