C.W.K.
Stream
Lesson 03 of 05 · published

Image Generation — gpt-image-1.5

~22 min · image-gen, gpt-image-1.5

Level 0Tokenizer
0 XP0/54 lessons0/10 achievements
0/120 XP to next level120 XP to go0% complete

2026 년 first-party image gen 의 답은 gpt-image-1.5. DALL-E 3 보다 long structured prompt 를 잘 이해하고, reference image (image-to-image, style transfer) 를 기본 지원. New work 는 gpt-image-1.5.

API surface

client.images.generate(model='gpt-image-1.5', prompt='...', size='1024x1024'). Size 옵션 — 1024x1024, 1792x1024, 1024x1792. Quality 와 style 파라미터로 fine-tune.

Reference image (image-to-image)

Reference 박으면 모델이 그 style/composition 을 새 image 에 inherit. Style transfer, character consistency, brand voice 유지.

Moderation 따로

Text moderation 통과해도 image gen 은 content reason 으로 refuse 가능. Moderation error catch 하고 graceful fallback — 전체 flow crash X.

Non-OpenAI 옵션

Google Nano Banana Pro (gemini-3-pro-image-preview) 도 prompt fidelity 와 reference image quality 에서 경쟁력. cwkPippa 의 image-gen skill 은 Nano Banana Pro 를 default, gpt-image-1.5 는 explicit request 시. 선택은 작업별, vendor loyalty 아님.

Code

images.generate with gpt-image-1.5·python
import base64

result = client.images.generate(
    model="gpt-image-1.5",
    prompt="A photorealistic golden retriever in a field of sunflowers",
    n=1,
    size="1024x1024",       # "1024x1024", "1536x1024", "1024x1536", "auto"
    quality="high",          # "auto", "high", "medium", "low"
    output_format="png",     # "png", "jpeg", "webp"
    background="opaque",     # "transparent", "opaque", "auto"
)

image_bytes = base64.b64decode(result.data[0].b64_json)
with open("output.png", "wb") as f:
    f.write(image_bytes)
Reference-based generation (image-to-image)·python
response = client.responses.create(
    model="gpt-4.1",
    input="Draw a minimalist logo for a coffee shop called 'Dawn Brew'",
    tools=[{"type": "image_generation"}],
)

for item in response.output:
    if item.type == "image_generation_call":
        img = base64.b64decode(item.result)
        with open("logo.png", "wb") as f:
            f.write(img)

External links

Exercise

Structured prompt 1 개로 1024x1024, 1792x1024, 1024x1792 3 size 이미지 생성. 작은 HTML report 에 저장 + embed. Image 당 cost 비교.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.