Flux API
Image endpoints are grouped as Flux 3, Flux 2, and Flux 1. For a new integration, use FLUX 3 Image: onePOST /bfl/v1/flux-3-image handles both text-to-image and edits. Use FLUX 3 Image Klein when you need a seed, exact width and height, or a step count.
Send requests to https://api.ttapi.io with the TT-API-KEY header. Create the key in the dashboard. See Authentication.
The submit response returns a jobId immediately. The image is available after the task finishes. Poll the fetch endpoint, or pass webhook_url and receive the result by callback. FLUX 3 Image and Klein are billed by resolution at 40% off official pricing. See Image Pricing.
Text-to-image and edits share one request
Omitimages and the model creates a new image from prompt. Pass images and the same prompt becomes an edit instruction: change a detail, restyle the image, or combine several images.
Name the change specifically. “Change the bird in the middle of image 1 to #e01075 and leave the rest unchanged” is more reliable than “make it better.” Multiple images are image 1, image 2, and so on, in array order. Refer to them that way in the prompt.
images accepts one image URL or base64 string, or an array of 1 to 10. Each image must be at least 256×256 and no larger than 16 megapixels. FLUX 3 Image rejects input_image, seed, width, and height.
Klein adds one reference rule: the first image is the picture being edited, and it sets the default output size when width and height are omitted.
Place elements with bounding boxes
To put an element in a fixed region, or to change only part of the frame, append bounding boxes to the end of the prompt. Coordinates use a 0 to 1000 grid in[top, left, bottom, right] order. The top-left corner is [0, 0]. The bottom-right corner is [1000, 1000].
Mark each object with angle brackets in the prompt, then give its box and description at the end:
id matches the angle-bracket label in the prompt. desc says what that region should become. See FLUX 3 Image for the full fields.
Choose the frame, then the resolution
aspect_ratio defaults to auto. For text-to-image, set it yourself, for example 16:9, 1:1, 9:16, or 21:9. auto first uses a ratio named in the prompt. If there is no reference image and the prompt names no ratio, FLUX 3 Image uses 1:1 and Klein uses 16:9. With reference images, auto keeps the first image’s framing.
resolution is a pixel-area tier. The default is 1k:
Changing the resolution starts a new generation, so the composition can differ from a lower-resolution draft. Exact width and height follow the aspect ratio. On Klein, passing
width and height together overrides both fields above.
grounding is on by default. The model can search the web and images to check real objects named in the prompt. Turn it off to draw from the prompt only, which is usually faster.
When to use Klein
FLUX 3 Image Klein does the same jobs as FLUX 3 Image: text-to-image, up to 10 reference images, and bounding boxes. It also accepts:widthandheighttogether, each from 64 to 6256, with a product no larger than 16822272seedto reproduce a generation, from 0 to 4294967295output_formatofjpegorpng, defaultjpegsteps, from 1 to 16, default 16
One complete call
PENDING_QUEUE means the task is waiting. ON_QUEUE means it is generating. After SUCCESS, read data.imageUrl. The URL expires; see Storage. On FAILED, read message. Status codes are listed in Responses.
Polling is enough while you are testing. Wait a few seconds between requests. If your server already has a public URL, add webhook_url to the submit request and the result is pushed there when the task finishes.