from openai import OpenAI client = OpenAI(api_key="DIN_API_NĂGLE") response = client.images.generate( model="gpt-image-1", # erstatter dall-e-3 i den nye API prompt=( "A futuristic 1980s-inspired American muscle car parked between two tall " "palm trees on the beach in Malibu at sunset. Strong synthwave aesthetic " "with neon pink, purple, orange and turquoise colors, glowing highlights, " "reflective chrome, retro-futuristic design elements, and a dramatic sun " "setting behind the ocean. 80s vaporwave/synthwave art style, crisp details, " "vibrant lighting, square 1:1 composition, perfect for an NFT." ), size="1024x1024" ) image_base64 = response.data[0].b64_json # Hvis du vil gemme billedet: import base64 with open("synthwave_car.png", "wb") as f: f.write(base64.b64decode(image_base64)) print("Billede gemt som synthwave_car.png") See more