import requests prompt = "Task: Generate a game NPC portrait. Subject: an original adult female elven mage with long pointed ears, slightly glowing eyes, a mystical but weary aura, wearing simple practical traveler/prisoner garb with subtle elven motifs. Context: dialogue portrait for a stylized exploration game set in an original world. Style: painterly game concept art with clear shape language, grounded materials, and slightly exaggerated but believable proportions. Composition: a simple square headshot/bust on a plain neutral muted parchment background, facing forward with a subtle expression. Lighting: neutral studio key with soft rim separation and no cinematic color." 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_pollinations_portrait.png", "wb") as f: f.write(response.content) print("Success") else: print("Error:", response.status_code)