FLUX.1 Kontext [max]

Overview

FLUX.1 Kontext [max] is the new premium model by Black Forest Labs. It brings maximum performance across all aspects – greatly improved prompt adherence and typography generation meet premium consistency for editing without compromise on speed.

FLUX.1 Kontext [max] is hosted outside of DataCrunch infrastructure.

Below please find examples on how to use DataCrunch Inference API to generate images with FLUX.1 Kontext [max].

Find out more about FLUX.1 Kontext.

Getting Started

Before generating images, make sure your account is ready to use the Inference API. Follow the 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 for detailed instructions on obtaining and using a bearer token for secure API access.

Generating images

Text to image

curl --request POST "https://relay.datacrunch.io/bfl/flux-kontext-max" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <your_api_key>" \
--output "picture.png" \
--data '{
        "prompt": "a scientist racoon eating icecream in a datacenter",
        "steps": 50,
        "guidance": 3.0,
        "prompt_upsampling":true
}'

Image to image

INPUT_BASE64="data:image/png;base64,$(base64 -i <your_picture>.png)"
read -r -d '' PAYLOAD <<EOF
{
  "prompt": "Make the picture a pencil sketch",
  "steps": 50,
  "guidance": 2.0,
  "input_image": "$INPUT_BASE64"
}
EOF

curl --request POST "https://relay.datacrunch.io/bfl/flux-kontext-max" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <your_api_key>" \
--output "picture.png" \
--data "$PAYLOAD"

Last updated

Was this helpful?