Image - 2026-10-16 11:34
from openai import OpenAI import base64 client = OpenAI(api_key="SIZNING_API_KALIT") prompt = ( "Keep the man's face, hairstyle and skin exactly the same, " "no retouching, no beauty filter, no changes to facial features. " "Place him in a luxurious villa kitchen, sitting at a dining table, " "holding a spoon and eating a bowl of hot soup (sho'rva). " "Natural lighting, realistic photo." ) result = client.images.edit( model="gpt-image-1", image=open("rasm.jpg", "rb"), prompt=prompt, input_fidelity="high", # yuzni saqlash uchun size="1024x1536", ) with open("natija.png", "wb") as f: f.write(base64.b64decode(result.data[0].b64_json)) print("Tayyor: natija.png")
Бесплатный старт · Генерация видео и картинок с ИИ за секунды