Models / Black Forest Labs
Image

FLUX.2 [flex]

Customizable image generation with advanced text rendering capabilities

About model

Flexible Creative Control:
FLUX.2 [flex] provides customizable image generation and editing with adjustable inference steps and guidance parameters. Excels at typography and text rendering while supporting up to 10 reference images (14 MP total input) for maximum creative flexibility.

  • API usage

    • cURL
    • Python
    • Typescript

    Endpoint:

    black-forest-labs/FLUX.2-flex

    curl -X POST "https://api.together.xyz/v1/images/generations" \
      -H "Authorization: Bearer $TOGETHER_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "black-forest-labs/FLUX.2-flex",
        "prompt": "Draw an anime style version of this image.",
        "width": 1024,
        "height": 768,
        "steps": 28,
        "n": 1,
        "response_format": "url",
        "image_url": "https://huggingface.co/datasets/patrickvonplaten/random_img/resolve/main/yosemite.png"
      }'
    
    from together import Together
    
    client = Together()
    
    imageCompletion = client.images.generate(
        model="black-forest-labs/FLUX.2-flex",
        width=1024,
        height=768,
        steps=28,
        prompt="Draw an anime style version of this image.",
        image_url="https://huggingface.co/datasets/patrickvonplaten/random_img/resolve/main/yosemite.png",
    )
    
    print(imageCompletion.data[0].url)
    
    
    
    import Together from "together-ai";
    
    const together = new Together();
    
    async function main() {
      const response = await together.images.create({
        model: "black-forest-labs/FLUX.2-flex",
        width: 1024,
        height: 1024,
        steps: 28,
        prompt: "Draw an anime style version of this image.",
        image_url: "https://huggingface.co/datasets/patrickvonplaten/random_img/resolve/main/yosemite.png",
      });
    
      console.log(response.data[0].url);
    }
    
    main();
    
    
  • Model card

    Architecture Overview:
    • Customizable inference with adjustable steps and guidance
    • Up to 4MP output resolution capability
    • 32K prompt token capacity

    Multi-Reference System:
    • API & Playground: Up to 10 reference images
    • 14 MP total input capacity
    • Enhanced character and product consistency

    Performance Characteristics:
    • Superior typography and text rendering
    • Enhanced prompt following capabilities
    • Photorealistic detail in skin, hair, fabric
    • Flexible quality/speed adjustment
    • Hex-code color accuracy support

Related models
  • Model provider
    Black Forest Labs
  • Type
    Image
  • Main use cases
    Image Generation
  • Deployment
    Serverless
  • Context length
    32K prompt tokens
  • Price

    $0.03 / image

  • Input modalities
    Text
    Image
  • Output modalities
    Image