Chapter 13 · the model makes pictures now
def generate(prompt, path):
r = client.images.generate(
model="gpt-image-1", prompt=prompt, size="1024x1024")
data = base64.b64decode(r.data[0].b64_json)
open(path, "wb").write(data)
No conversation. What you iterate on is the prompt.
Vague in → generic out.
Add: "soft watercolor," "dramatic rim lighting," "isometric," "shot on 35mm film."
The vocabulary of art direction is the vocabulary that works.
Same generate call; the prompt template + size change.
_STYLE = "A die-cut sticker of {subject}. Bold outline, flat colors, white bg."
User brings the subject; app brings the look. Most real image features are exactly this.
One-shot call; the skill is all prompt + parameters. Template a house style, choose aspect ratio on purpose, budget for the cost. Next: audio, both directions.