# FLUX.1 Krea \[dev]

## Overview

FLUX.1 Krea is a powerful open-weight model for text-to-image generation with high-quality outputs that break free from the typical "AI look". This model is the result of a close collaboration between [Black Forest Labs](https://bfl.ai/) and [Krea](https://www.krea.ai/) – an example of what happens when two world-class research teams join forces. The model has full ecosystem compatibility with FLUX.1-dev tools and workflows.

Optimized for large-scale production-grade inference, FLUX.1 Krea \[dev] runs seamlessly on the Verda GPU infrastructure and inference services, ensuring low-latency and cost-efficient generation without compromising output quality.

Our secure and easy API access to FLUX.1 Krea lets startups and enterprises alike focus on crafting products – not managing infrastructure. With Verda, you get high-quality image generation, minimal cold starts, and out-of-the-box elastic scaling – ready to integrate.

### **Getting Started**

Before generating images, make sure your account is ready to use the Inference API. Follow the [Getting Started](https://docs.verda.com/inference/getting-started) guide to create an account and top up your balance.

### Authorization

To access and use these API endpoints, authorization is required. Please visit our [Authorization page](https://docs.verda.com/inference/authorization) for detailed instructions on obtaining and using a bearer token for secure API access.

## Generating images

### Parameters

#### `prompt` (string)

The text description to generate an image from.\
This is the core input that drives the output.

***

#### `size` (string)

The resolution of the output image in `"width*height"` format.\
**Default:** `"1024*1024"`

***

#### `num_inference_steps` (integer)

How many denoising steps to run during generation.\
More steps may improve quality, at the cost of speed.\
**Default:** `28`

***

#### `seed` (integer)

A seed value for reproducibility.\
The same seed + prompt + model version = same image.\
Use `-1` to randomize.\
**Default:** `-1`

***

#### `guidance_scale` (float)

CFG (Classifier-Free Guidance) controls how closely the image follows the prompt.\
Higher values = stronger prompt adherence, but may reduce creativity.\
**Default:** `3.5`

***

#### `num_images` (integer)

How many images to generate per request.\
**Default:** `1`

***

#### `enable_safety_checker` (boolean)

If enabled, content will be checked for safety violations.\
**Default:** `true`

***

#### `output_format` (string)

The file format of the generated image.\
**Possible values:** `"jpeg"`, `"png"`, `"webp"`\
**Default:** `"jpeg"`

***

#### `output_quality` (integer)

Applies to `"jpeg"` and `"webp"` formats.\
Defines compression quality.\
**Range:** `1–100`\
**Default:** `95`

***

#### `enable_base64_output` (boolean)

If `true`, the API will return the image as a base64-encoded string in the response.\
**Default:** `false`

### Text to image

{% tabs %}
{% tab title="cURL" %}

```bash
curl --request POST "https://inference.datacrunch.io/flux-krea-dev/runsync" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <your_api_key>" \
--data '{
    "input": {
        "prompt": "an F1 car on track in front of a fancy hotel",
        "num_inference_steps": 50,
        "enable_base64_output": true
    }
}'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import os

token = "<your_api_key>"  # Replace with your actual key
bearer_token = f"Bearer {token}"

url = "https://inference.datacrunch.io/flux-krea-dev/runsync"
headers = {
    "Content-Type": "application/json",
    "Authorization": bearer_token
}
data = {
    "input": {
        "prompt": "an F1 car on track in front of a fancy hotel",
        "num_inference_steps": 50,
        "enable_base64_output": True
    }
}

response = requests.post(url, headers=headers, json=data)
print(response.json())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

const token = '<your_api_key>'; // Replace with your actual token
const url = 'https://inference.datacrunch.io/flux-krea-dev/runsync';
const headers = {
  'Content-Type': 'application/json',
  'Authorization': `Bearer ${token}`
};
const data = {
  input: {
    prompt: 'an F1 car on track in front of a fancy hotel',
    num_inference_steps: 50,
    enable_base64_output: true
  }
};

axios
  .post(url, data, { headers: headers })
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    console.error('Error:', error);
  });
```

{% endtab %}
{% endtabs %}
