# Flux 2 Pro Text To Image > Flux 2 Pro is an advanced text-to-image generative model designed for high-precision visual synthesis and professional-grade imaging workflows. ## Overview - **Model ID**: `flux-2-pro` - **Category**: image - **Provider**: bfl - **Status**: model_ready - **Screenshot**: `https://assets.modelslab.com/generations/45b7843a-cc0e-466c-b390-e84a53df15c5.png` ## API Information This model can be used via our HTTP API. See the API documentation and usage examples below. ### Endpoint - **URL**: `https://modelslab.com/api/v7/images/text-to-image` - **Method**: POST ### Parameters - **`prompt`** (required): - Type: textarea - **`width`** (required): Width of the image (max 1024) - Type: number (range: 512-1024) - **`height`** (required): Height of the Image (max 1024) - Type: number (range: 512-1024) ## Usage Examples ### cURL ```bash curl --request POST \ --url https://modelslab.com/api/v7/images/text-to-image \ --header "Content-Type: application/json" \ --data '{ "key": "YOUR_API_KEY", "model_id": "flux-2-pro", "prompt": "Ultra-realistic cinematic portrait of a girl standing outdoors during golden hour. Soft directional lighting, shallow depth of field, detailed skin texture, natural shadows, high-contrast highlights, volumetric atmosphere. Shot on a high-end camera, 85mm lens, HDR, 8K resolution.", "width": "1024", "height": "1024" }' ``` ### Python ```python import requests response = requests.post( "https://modelslab.com/api/v7/images/text-to-image", headers={ "Content-Type": "application/json" }, json={ "key": "YOUR_API_KEY", "model_id": "flux-2-pro", "prompt": "Ultra-realistic cinematic portrait of a girl standing outdoors during golden hour. Soft directional lighting, shallow depth of field, detailed skin texture, natural shadows, high-contrast highlights, volumetric atmosphere. Shot on a high-end camera, 85mm lens, HDR, 8K resolution.", "width": "1024", "height": "1024" } ) print(response.json()) ``` ### JavaScript ```javascript fetch("https://modelslab.com/api/v7/images/text-to-image", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ "key": "YOUR_API_KEY", "model_id": "flux-2-pro", "prompt": "Ultra-realistic cinematic portrait of a girl standing outdoors during golden hour. Soft directional lighting, shallow depth of field, detailed skin texture, natural shadows, high-contrast highlights, volumetric atmosphere. Shot on a high-end camera, 85mm lens, HDR, 8K resolution.", "width": "1024", "height": "1024" }) }) .then(response => response.json()) .then(data => console.log(data)); ``` ## Links - [Model Playground](https://modelslab.com/models/flux-2-pro-text-to-image/flux-2-pro) - [API Documentation](https://docs.modelslab.com) - [ModelsLab Platform](https://modelslab.com)