Models / Black Forest Labs
Image

FLUX.1 Kontext [max]

In-context image generation and editing model with fast iterative capabilities.

About model

FLUX.1 Kontext offers maximum-quality image editing with text-guided targeted modifications. Optimized for demanding commercial applications, it delivers high-capability results. Designed for commercial use.

  • API usage

    • cURL
    • Python
    • Typescript

    Endpoint:

    black-forest-labs/FLUX.1-kontext-max

    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.1-kontext-max",
        "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.1-kontext-max",
        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.1-kontext-max",
        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

    FLUX.1 Kontext [max] is a premium generative flow matching model that delivers maximum performance for in-context image generation and editing. It features enhanced prompt adherence, superior typography generation, and premium consistency for complex editing tasks.

    The model processes both text and image inputs to enable character consistency, local editing, style reference, and iterative refinement workflows.

    Designed for demanding applications requiring the highest quality outputs, precise prompt following, and consistent results across varied editing scenarios.

Related models
  • Model provider
    Black Forest Labs
  • Type
    Image
  • Main use cases
    Image-to-Image
  • Deployment
    Serverless
    On-Demand Dedicated
  • Price

    $0.08 / MP

  • Input modalities
    Text
    Image
  • Output modalities
    Image