---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://modelslab.com/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
title: Flux 3.1 Text To Image API – Pricing | ModelsLab
description: Flux 3.1 Text To Image API by BFL: create images from text with the FLUX 3.1 API on ModelsLab. From $0.0375 per generation. API & playground on ModelsLab.
url: https://modelslab.com/models/bfl/flux-3.1-t2i.md
canonical: https://modelslab.com/models/bfl/flux-3.1-t2i
type: product
component: Playground/Endpoint/Index
generated_at: 2026-12-05T02:09:46.995748Z
---

[![Flux 3.1 Text To Image thumbnail](https://assets.modelslab.ai/api-logos/01KMSWRE3S4D4TNYGY3EB8G5SX.avif)](https://modelslab.com/models/bfl)Flux 3.1 Text To Image
---

[by BFL](https://modelslab.com/models/bfl)Generate images from text with FLUX 3.1 by Black Forest Labs. Output up to 4K in fast or quality mode, bounding box layout control, and web grounding for accurate real-world subjects. Available through the ModelsLab API and Playground.

`flux-3.1-t2i`

Closed Source Model [LLMs.txt](https://modelslab.com/models/bfl/flux-3.1-t2i/llms.txt)

[API Playground](/models/bfl/flux-3.1-t2i)API DocumentationVibe CodeRelated ModelsDeveloper SupportModel Specs

Input
---

Prompt 

A cozy reading nook by a rain-streaked window, a ginger cat asleep on a knitted blanket, warm lamp light, a steaming mug of tea on the sill, shelves of old books, soft cinematic lighting, photorealistic

Resolution 

Aspect Ratio 

Mode 

Layout 

 Add region

Add a region to place an object at an exact position.

Advanced Settings Customize your input with more control.

Quality mode: 1K will cost $0.0375, 1.5K $0.0525, 2K $0.075, 2.5K $0.1624, 3.5K $0.2539 and 4K $0.35 per image

Login to Generate

Output
---

Sample

![Generated Content](https://assets.modelslab.ai/generations/28f50743-e487-4864-8d96-227b5425aab7.webp)

Looking for something different?
---

Models that trade off differently against the one you are viewing

### Better quality

Newer flagship models that generally produce stronger results.

![Nano Banana Pro API](https://images.modelslab.sh/?Image=https://assets.modelslab.ai/generations/5ee72f26-dfa9-4d26-a546-7d496ef71be7.webp)

[Google](/models/google)

 [Nano Banana Pro](/models/google/nano-banana-pro?config=nano-banana-pro-text2image)

![Gen4 Text to Image API](https://images.modelslab.sh/?Image=https://assets.modelslab.ai/generations/b656bfe5-c402-456b-9980-f7447198887d.webp)

[Runway ML](/models/runway_ml)

 [Gen4 Text to Image](/models/runway_ml/gen4_image)

![Grok Imagine Image 2.0 Text To Image API](https://images.modelslab.sh/?Image=https://assets.modelslab.ai/generations/36454d6f-dd19-4a92-b618-d9332263045f.webp)

[xAI](/models/xai)

 [Grok Imagine Image 2.0 Text To Image](/models/x-ai/grok-imagine-image-2.0-t2i)

![Seedream 5.0 Pro Text To Image  API](https://images.modelslab.sh/?Image=https://assets.modelslab.ai/generations/280db637-e26a-4621-a7ea-572ca88c7876.png)

[BytePlus](/models/byteplus)

 [Seedream 5.0 Pro Text To Image](/models/byteplus/seedream-5.0-pro-t2i)

![Nano Banana 2.1 Text To Image  API](https://images.modelslab.sh/?Image=https://assets.modelslab.ai/generations/f44e6b5c-f64c-456a-b63f-8fae5728b0f1.webp
)

[Google](/models/google)

 [Nano Banana 2.1 Text To Image](/models/google/gemini-nano-banana-2.1-t2i)

![GPT-Image-2.5 Sunburst - Text To Image  API](https://images.modelslab.sh/?Image=https://assets.modelslab.ai/generations/ab94e5f0-8076-4254-a470-6006f72a4967.webp)

[OpenAI](/models/openai)

 [GPT-Image-2.5 Sunburst - Text To Image](/models/openai/gpt-image-2.5-sunburst-t2i)

### Faster Generation

Built for speed when you are iterating on a prompt.

![Grok Imagine Text To Image API](https://images.modelslab.sh/?Image=https://assets.modelslab.ai/generations/77fe7302-eee2-45bd-baae-45d2a822b52f.webp)

[xAI](/models/xai)

 [Grok Imagine Text To Image](/models/xai/grok-imagine-image-t2i)

![Wan 2.7 Text To Image API](https://images.modelslab.sh/?Image=https://assets.modelslab.ai/generations/aba76d25-b19c-4fee-9123-4cbb29e71646.webp)

[Alibaba](/models/alibaba_cloud)

 [Wan 2.7 Text To Image](/models/alibaba_cloud/wan-2.7-t2i)

### Lower cost per run

Open-source models we host, unlimited on the $149/month plan.

![Flux 3 Klein Text To Image API](https://images.modelslab.sh/?Image=https://assets.modelslab.ai/generations/eeded1dc-53f1-4aab-972b-8c9a4a8304b4.webp)

[ModelsLab](/models/modelslab)

 [Flux 3 Klein Text To Image](/models/modelslab/flux-3-klein)Open Source Model

![Qwen Text to Image API](https://images.modelslab.sh/?Image=https://assets.modelslab.ai/generations/4fb32c7b-02a8-469f-bb10-04aaf1238991.webp)

[ModelsLab](/models/modelslab)

 [Qwen Text to Image](/models/modelslab/qwen?config=qwen-text-to-image)Open Source Model

![Hidream-O1 Text to Image API](https://images.modelslab.sh/?Image=https://assets.modelslab.ai/generations/8b413ab9-adab-4032-8ff5-91911074f3c5.png)

[ModelsLab](/models/modelslab)

 [Hidream-O1 Text to Image](/models/modelslab/hidream-o1)Open Source Model

![Krea-2 turbo Text to Image API](https://images.modelslab.sh/?Image=https://assets.modelslab.ai/generations/c7144b17-55ef-4a8c-93a7-7555d9f45874.png)

[ModelsLab](/models/modelslab)

 [Krea-2 turbo Text to Image](/models/modelslab/krea-2-turbo)Open Source Model

![Flux 3 Text To Image API](https://images.modelslab.sh/?Image=https://assets.modelslab.ai/generations/12fba95d-f6a9-40c0-bb7c-50917579558c.webp)

[BFL](/models/bfl)

 [Flux 3 Text To Image](/models/bfl/flux-3-image-t2i)Closed Source Model

![Ideogram 4.5 Text To Image API](https://images.modelslab.sh/?Image=https://assets.modelslab.ai/generations/f61c4859-f5a8-4507-a67b-0c412d6691e2.webp)

[Ideogram](/models/ideogram)

 [Ideogram 4.5 Text To Image](/models/ideogram/ideogram-4-5-t2i)Closed Source Model

Related Models
---

Discover similar models you might be interested in

 [View all Image Models](https://modelslab.com/models?feature=imagen)

![Seedream 4.0 Image to image API](https://images.modelslab.sh/?Image=https://assets.modelslab.ai/generations/d050da31-b346-4c6c-b087-20fdc87d17b7.webp)

[BytePlus](/models/byteplus)

 [Seedream 4.0 Image to image](/models/byteplus/seedream-4.0-i2i)Closed Source Model

![RealTime Text To Image API](https://images.modelslab.sh/?Image=https://assets.modelslab.ai/generations/a6186100-59c4-4f5e-8a51-e0eeb4228f10.png)

[ModelsLab](/models/modelslab)

 [RealTime Text To Image](/models/modelslab/realtime_t2i)Open Source Model

![Krea-2-turbo Text to Image API](https://images.modelslab.sh/?Image=https://assets.modelslab.ai/generations/c7144b17-55ef-4a8c-93a7-7555d9f45874.png)

[ModelsLab](/models/modelslab) Popular

 [Krea-2-turbo Text to Image](/models/modelslab/krea-2-turbo)Open Source Model

![Fibo-2 Image Editing API](https://images.modelslab.sh/?Image=https://assets.modelslab.ai/generations/d581c12a-257f-4b80-97e2-cd118edf824c.png)

[ModelsLab](/models/modelslab) Popular

 [Fibo-2 Image Editing](/models/modelslab/fibo-2)Open Source Model

![Qwen API](https://images.modelslab.sh/?Image=https://assets.modelslab.ai/generations/4fb32c7b-02a8-469f-bb10-04aaf1238991.webp)

[ModelsLab](/models/modelslab) Popular

 [Qwen](/models/modelslab/qwen)Open Source Model

![Qwen 2.1 Realtime Image Editing API](https://images.modelslab.sh/?Image=https://assets.modelslab.ai/generations/e2efce38-e35b-476a-b06e-569fcfeaeb96.webp)

[ModelsLab](/models/modelslab) Popular

 [Qwen 2.1 Realtime Image Editing](/models/modelslab/qwen-image-2.1)Open Source Model

View all 18 related models

About Flux 3.1 Text To Image
---

Flux 3.1 Text To Image is a text to image AI model by BFL, available on ModelsLab through the API and the playground above. API access comes with Open Source Unlimited at $149/month, and open-source models are unlimited on the $149/month plan.

### Flux 3.1 Text To Image facts

ProviderBFL

PriceFrom $0.0375 per generation

Added to ModelsLabDecember 4, 2026

Model IDflux-3.1-t2i

### Key Features

- High-resolution AI image generation from text prompts
- Negative prompt support for precise control
- Multiple output formats and aspect ratios
- Adjustable inference steps and guidance scale
- Batch generation support via API

### Quick Start

Integrate Flux 3.1 Text To Image into your application with a single API call. Get your API key from the [pricing page](https://modelslab.com/pricing) to get started.

PythonJavaScriptcURLPHP

```
<div>import requests</div>
<div>import json</div>
<div>
</div>
<div>url = "https://modelslab.com/api/v7/images/text-to-image"</div>
<div>
</div>
<div>headers = {</div>
<div>    "Content-Type": "application/json"</div>
<div>}</div>
<div>
</div>
<div>data = {</div>
<div>        "model_id": "flux-3.1-t2i",</div>
<div>        "prompt": "A cozy reading nook by a rain-streaked window, a ginger cat asleep on a knitted blanket, warm lamp light, a steaming mug of tea on the sill, shelves of old books, soft cinematic lighting, photorealistic",</div>
<div>        "key": "YOUR_API_KEY"</div>
<div>    }</div>
<div>
</div>
<div>try:</div>
<div>    response = requests.post(url, headers=headers, json=data)</div>
<div>    response.raise_for_status()  # Raises an HTTPError for bad responses (4XX or 5XX)</div>
<div>    result = response.json()</div>
<div>    print("API Response:")</div>
<div>    print(json.dumps(result, indent=2))</div>
<div>except requests.exceptions.HTTPError as http_err:</div>
<div>    print(f"HTTP error occurred: {http_err} - {response.text}")</div>
<div>except Exception as err:</div>
<div>    print(f"Other error occurred: {err}")</div>
```

const requestBody = {

 "model_id": "flux-3.1-t2i",

 "prompt": "A cozy reading nook by a rain-streaked window, a ginger cat asleep on a knitted blanket, warm lamp light, a steaming mug of tea on the sill, shelves of old books, soft cinematic lighting, photorealistic",

 "key": "YOUR_API_KEY"

 };

async function makeApiRequest() {

 try {

 const response = await fetch(endpointUrl, {

 method: 'POST',

 headers: {

 'Content-Type': 'application/json',

 },

 body: JSON.stringify(requestBody)

 });

 if (!response.ok) {

 let errorResult;

 try {

 errorResult = await response.json();

 } catch (e) {

 errorResult = { error: { message: await response.text() } };

 }

 throw new Error(`API Error (${response.status}): ${errorResult.error?.message || response.statusText || 'Unknown error'}`);

 }

 const result = await response.json();

 console.log('API Response:', result);

 return result;

 } catch (error) {

 console.error('Error making API request:', error.message);

 throw error;

 }

}

makeApiRequest();

 -H "Content-Type: application/json" \

 -d '{

 "model_id": "flux-3.1-t2i",

 "prompt": "A cozy reading nook by a rain-streaked window, a ginger cat asleep on a knitted blanket, warm lamp light, a steaming mug of tea on the sill, shelves of old books, soft cinematic lighting, photorealistic",

 "key": "YOUR_API_KEY"

}'

$url = 'https://modelslab.com/api/v7/images/text-to-image';

$headers = [

 'Content-Type: application/json'

];

$data = [

 'model_id' => 'flux-3.1-t2i',

 'prompt' => 'A cozy reading nook by a rain-streaked window, a ginger cat asleep on a knitted blanket, warm lamp light, a steaming mug of tea on the sill, shelves of old books, soft cinematic lighting, photorealistic',

 'key' => 'YOUR_API_KEY',

];

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);

curl_setopt($ch, CURLOPT_POST, true);

curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));

curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

curl_setopt($ch, CURLOPT_TIMEOUT, 30);

$response = curl_exec($ch);

$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

$curlError = curl_error($ch);

if ($curlError) {

 echo 'Curl error: ' . $curlError;

} else {

 echo "HTTP Status Code: " . $httpCode . "\n";

 $result = json_decode($response, true);

 if (json_last_error() !== JSON_ERROR_NONE) {

 echo "Error decoding JSON: " . json_last_error_msg() . "\n";

 echo "Raw response: " . $response . "\n";

 } else {

 echo "API Response:\n";

 print_r($result);

 }

}

?>

### Pricing

Flux 3.1 Text To Image API costs $0.037 per generation, scaled by your settings. Open Source Unlimited is $149/month, and open-source models are unlimited on the $149/month plan. [View pricing plans](https://modelslab.com/pricing)

### Use Cases

- Product photography and e-commerce visuals
- Marketing and social media content creation
- Concept art and design prototyping
- Custom illustrations and artwork

### More from BFL

- [Flux Kontext Pro API](/models/bfl/flux-kontext-pro)
- [Flux 2 Pro Text To Image API](/models/bfl/flux-2-pro)
- [Flux 2 Max Image Editing API](/models/bfl/flux-2-max)
- [Flux Pro 1.1 Ultra Text To Image API](/models/bfl/flux-pro-1.1-ultra)
- [Flux 3 Text To Image API](/models/bfl/flux-3-image-t2i)
- [Flux Pro 1.1 Text To Image API](/models/bfl/flux-pro-1.1)

[All BFL models](/models/bfl)

[Flux API](/flux-api) [Browse Image Models](https://modelslab.com/models?feature=imagen) [View Pricing](https://modelslab.com/pricing)

Flux 3.1 Text To Image FAQ
---

### What is Flux 3.1 Text To Image?

Flux 3.1 Text To Image is a text to image AI model by BFL, available on ModelsLab through the API and the playground above.

### How do I use the Flux 3.1 Text To Image API?

You can integrate Flux 3.1 Text To Image into your application with a single API call. Sign up on ModelsLab to get your API key, then use the model ID "flux-3.1-t2i" in your API requests. We provide SDKs for Python, JavaScript, and cURL examples in the API documentation.

### How much does Flux 3.1 Text To Image cost?

Flux 3.1 Text To Image costs from $0.0375 per generation. The Open Source Unlimited plan is $149/month and includes unlimited generation on open-source models.

### What is the Flux 3.1 Text To Image model ID?

The model ID for Flux 3.1 Text To Image is "flux-3.1-t2i". Use this ID in your API requests to specify this model.

### Do I need a paid plan to use Flux 3.1 Text To Image?

Yes. ModelsLab is subscription-based with no free tier. The $149/month Open Source Unlimited plan includes unlimited generation across open-source models; premium third-party models are billed per call from your wallet.

---

*This markdown version is optimized for AI agents and LLMs.*

**Links:**
- [Website](https://modelslab.com)
- [API Documentation](https://docs.modelslab.com)
- [Blog](https://modelslab.com/blog)

---
*Generated by ModelsLab - 2026-12-05*