🎉 New Year Sale: Get 20% OFF on all plans — Use code NEWYEAR2026.

Upgrade now
Flux.2 Dev Text to Image  thumbnail

ModelsLab/Flux.2 Dev Text To Image

flux-2-dev
Flux.2 Dev Text To ImageFree for Premium UsersLLMs.txt
Flux.2 Dev is a high-performance, developer-focused text-to-image generative model designed for experimentation, customization, and advanced creative workflows.
API PlaygroundAPI Documentation

API Endpoint URL

Base URL for all API requests to this endpoint.

https://modelslab.com/api/v6/images/text2img

API Authentication

Authentication requires a valid API key included in the request. Generate and manage your API keys from your developer dashboard. Include the key in the key parameter for all API requests.

Integration Examples

Production-ready code samples for API integration

{
"model_id": "flux-2-dev",
"prompt": "A hyper-realistic cinematic portrait of a woman standing in warm golden-hour sunlight, soft rim lighting around her hair, shallow depth of field, ultra-sharp facial details, film-grade color tones, Leica 50mm lens look, atmospheric haze, dramatic yet natural expression.",
"width": "1024",
"height": "1024",
"num_inference_steps": "30",
"samples": "4",
"key": "YOUR_API_KEY"
}

SDKs

Official SDKs

Production-ready SDKs and client libraries for all major programming languages

API Parameters

Technical specifications for API request parameters.

Field NameParameterTechnical Description
model_idmodel_idModel to use for generation
promptpromptText description of the image you want to generate
widthwidthwidth of the image
heightheightHeight of the Image
num_inference_stepsnum_inference_stepsThe number of denoising steps. Values range from 20 to 50 default value 30
samplessamplesThe number of images to be returned in response. Maximum is 4. Required range: x <= 4