import requests, json, sys, time

api_key = "vio_sk_vA8llIYm51J3oyXtfevrM92yUBJ8-3IS1sIn6xydF8o"
url = "https://api.viostudio.id/v1/images/generate"

payload = {
    "model": "gpt-image-2.0",
    "prompt": "Digital illustration for Instagram post 3:4 format. Psychology theme about subconscious mind golden window. A young Indonesian man half-asleep on bed, warm golden light entering his head from above, symbolizing transition between conscious and subconscious. Background sage green to cream gradient. Flat vector minimalist style, calm and warm tones. Empty space at top and bottom for text. No text in image.",
    "size": "1080x1350",
    "n": 1
}

headers = {
    "Authorization": f"Bearer {api_key}",
    "Content-Type": "application/json"
}

print("Sending request...")
resp = requests.post(url, json=payload, headers=headers)
print(f"Status: {resp.status_code}")
data = resp.json()
print(json.dumps(data, indent=2))
