from huggingface_hub import InferenceClient client = InferenceClient( provider="together", api_key="30cce3973ee421b57733847e64ae7a67a55307fb7cd4d176303468f812582a24", ) # output is a PIL.Image object image = client.text_to_image( "Astronaut riding a horse", model="black-forest-labs/FLUX.1-dev", )