import requests import base64 prompt = "A simple square headshot portrait of Karyla, an adult female Amazon warrior. Plain neutral parchment background. Painterly fantasy illustration style, single face only, facing forward. Do not include multiple views, this is a dialogue portrait." url = f"https://image.pollinations.ai/prompt/{requests.utils.quote(prompt)}?width=512&height=512&nologo=true" response = requests.get(url) if response.status_code == 200: with open("test_flux_portrait.png", "wb") as f: f.write(response.content) print("Success, saved test_flux_portrait.png") else: print("Error:", response.status_code)