Illustration to photoExample 01flux-kontext-pro
Flux Kontext Pro is a Black Forest Labs image editing API on TTAPI. Run in-context edits from a prompt and reference image through the official Flux channel.
Illustration to photoExample 01
Snow-covered FreiburgExample 02
Harbor kite archiveExample 03
Crimson fog gas stationExample 04Prompt to image, in context
Make this a 90s cartoon
Remove the background
Abstract expressionist painting Pop Art and cubism early 20 century, straight lines and solids, cute cat face without body, warm colors, green, intricate details, hologram floating in space, a vibrant digital illustration, black background, flat color, 2D, strong lines.
Replace 'joy' with 'Pro'
Replace text with 'COOL!!'
Transform the reference subject into a high-fashion editorial scene inside a vast Victorian glasshouse during a thunderstorm, preserving facial identity, silver hair, and elegant silhouette. Surround the subject with towering tropical leaves, wet stone flooring, scattered fallen petals, and misted glass panes streaked with rain. Outfit evolved into sculptural avant-garde couture in black lacquered fabric with subtle emerald accents, dramatic tailoring, refined textures, and striking accessories. Cinematic natural storm light, reflections in puddles, soft fog, deep contrast, sophisticated composition, premium magazine aesthetic, ultra-detailed materials, poised and enigmatic mood.
Change the car color to red
Change the background to a beach while keeping the person in the exact same position, scale, and pose. Maintain identical subject placement, camera angle, framing, and perspective. Only replace the environment around them
Close-up of a vintage car hood under heavy rain, droplets cascading down the deep cherry-red paint, windshield blurred with streaks of water, glowing headlights diffused through mist, reflections of crimson neon signage spelling "FLUX" dancing across the wet chrome grille, steam rising from the engine, ambient red light enveloping the scene, moody composition, shallow depth of field, monochromatic red palette, cinematic lighting with glossy textures.
What you can build with flux-kontext-pro
Prompt driven generation
Submit a concise prompt and get production-ready image output through one TTAPI job.
Core controls only
Keep integration simple with prompt, model, output settings, and callback handling.
Async result flow
Use polling or webhook callbacks so long-running generations do not block your UI.
Ready for product UI
Return Flux.2 Pro results that can be displayed, stored, or passed into downstream workflows.
Per-action, in quota
Usage is metered in quota by model, action, and output settings.
Headers and submit parameters
Use the endpoint below with your TTAPI key and the request fields shown.
/bfl/v1/flux-kontext-proSubmit a flux-kontext-pro image task.
Official reference/flux/fetchRetrieve the generated image task result.
Official referenceHeaders
TT-API-KEYstringrequiredYour TTAPI API key.
Content-TypestringrequiredUse application/json.
Body
promptstringrequiredText description of the target image.
input_imagestringoptionalReference image URL or base64 value.
input_image_2stringoptionalSecond reference image for supported Flux.2 models.
input_image_3stringoptionalThird reference image for supported Flux.2 models.
input_image_4stringoptionalFourth reference image for supported Flux.2 models.
widthstringoptionalRequested output width.
heightstringoptionalRequested output height.
seedstringoptionalSeed for reproducible output.
output_formatenumoptionaljpeg or png, subject to model support.
safety_tolerancestringoptionalSupported safety tolerance value.
webhook_urlstringoptionalCallback URL for asynchronous completion.
From key to first result
Copy the resolved endpoint, authentication headers, and request body for this model.
curl --request POST \
--url https://api.ttapi.io/bfl/v1/flux-kontext-pro \
--header 'TT-API-KEY: $TTAPI_KEY' \
--header 'Content-Type: application/json' \
--data '{"prompt":"editorial portrait in soft window light","output_format":"jpeg","webhook_url":"https://example.com/webhooks/flux"}'