Learn how to use Flux’s new in-context image generation models
from together import Together
client = Together()
imageCompletion = client.images.generate(
    model="black-forest-labs/FLUX.1-kontext-pro",
    width=1024,
    height=768,
    prompt="make his shirt yellow",
    image_url="https://github.com/nutlope.png",
)
print(imageCompletion.data[0].url)
Was this page helpful?