ai-startup
CHAPTER 46 / 100
읽기 약 2분
FUNCTION
AI 이미지 생성: DALL-E/Midjourney API
핵심 개념
image generation·prompt engineering·variations·실전 통합.
본문
이미지 생성 API 비교
| 도구 | 품질 | 속도 | 가격 | API |
|---|---|---|---|---|
| DALL-E 3 | 좋음 | 5~10s | $0.04/img | ✅ |
| Midjourney | 최고 | 30~60s | $10~/mo | 비공식 |
| Stable Diffusion | 가변 | 2~5s | $0.001/img | ✅ |
| Flux | 매우 좋음 | 5~10s | $0.025/img | ✅ |
| Imagen 3 (Google) | 좋음 | 5s | $0.03/img | ✅ |
→ DALL-E 3: 빠르게 + 일반 용도
→ Flux: 가성비 + 사실감
→ SD: 자체 호스팅 + 대량DALL-E 3 (OpenAI)
import OpenAI from 'openai';
const openai = new OpenAI();
const result = await openai.images.generate({
model: 'dall-e-3',
prompt: 'A modern minimalist landing page hero image for an AI English speaking app. Korean professional in a coffee shop, laptop open, warm lighting, photorealistic, 16:9',
n: 1,
size: '1792x1024', // 1024x1024, 1792x1024, 1024x1792
quality: 'hd', // 'standard' or 'hd'
style: 'natural', // 'vivid' or 'natural'
});
const imageUrl = result.data[0].url;
// 1시간만 유효 — 다운로드 후 자체 저장
const buffer = await fetch(imageUrl).then(r => r.arrayBuffer());
await s3.upload({ Bucket: 'images', Key: 'hero.png', Body: Buffer.from(buffer) }).promise();Replicate (다양한 모델)
import Replicate from 'replicate';
const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN });
// Flux Schnell — 빠르고 좋음
const output = await replicate.run(
'black-forest-labs/flux-schnell',
{
input: {
prompt: 'Korean coffee shop, modern laptop, professional working',
aspect_ratio: '16:9',
num_outputs: 1,
},
},
);
// Flux Pro — 최고 품질
const output = await replicate.run('black-forest-labs/flux-pro', { ... });
// SDXL — 자체 호스팅 가능
const output = await replicate.run('stability-ai/sdxl', { ... });프롬프트 엔지니어링 (이미지)
[좋은 이미지 프롬프트]
[Subject] [Action/Pose] [Setting] [Style] [Lighting] [Camera] [Quality modifiers]
예시:
"Korean professional woman, mid-30s, working on laptop,
modern coffee shop with plants,
photorealistic, soft natural lighting from window,
shallow depth of field, 50mm lens,
high detail, magazine quality"
[금지]
- 너무 추상적
- 명령어 (no negation 권장)
- 너무 많은 details (focus 잃음)일관된 스타일 (브랜딩)
const BRAND_STYLE_SUFFIX = `,
modern minimalist design,
soft pastel colors with indigo accents,
clean typography,
ample whitespace,
Pretendard font feel,
on-brand for SaaS landing page`;
async function generateBrandImage(subject: string) {
return openai.images.generate({
model: 'dall-e-3',
prompt: `${subject}${BRAND_STYLE_SUFFIX}`,
quality: 'hd',
});
}Variation 생성
// DALL-E 2만 가능
const variation = await openai.images.createVariation({
image: fs.createReadStream('original.png'),
n: 4,
size: '1024x1024',
});
// 또는 SD ControlNet — 구도 유지 + 변형
// Replicate에서 controlnet 모델비용 분석
[월 1000 이미지]
- DALL-E 3 HD: $40
- DALL-E 3 Standard: $20
- Flux Pro: $50
- Flux Schnell: $3 (압도적)
- SDXL 자체 호스팅: ~$20 (인스턴스)
[블로그용 이미지]
- 주 3편 × 4 이미지 = 12/주
- 월 48 이미지
- DALL-E 3: $2/월
[SaaS 마케팅]
- 광고 + 소셜 + 블로그
- 월 100~500 이미지
- $5~25/월다음 챕터
CH.47 "AI 음성 변환".
AI 프롬프트
🤖 AI에게 잘 물어보는 법 — 모델·전략별 프롬프트
무료
월 $0 — 검증·시작 단계
AI 이미지 생성을 무료 도구만으로 시작하는 방법을 알려줘.
소자본
월 $20~50 — MVP·초기 운영
월 $20~50 예산으로 AI 이미지 생성을 검증·MVP 단계까지 진행하는 전략은?
프로덕션
월 $200~500 — 성장 단계
AI 이미지 생성을 프로덕션 단계로 확장할 때 필요한 도구·운영 체계는?
스택
풀스택 — 도구 조합 분석
2026년 AI 이미지 생성 관련 도구 5개를 조합한 추천 스택을 알려줘.
⭐ 이것만 기억하세요
AI 이미지 생성: DALL-E/Midjourney API는 이 3가지만 확실히 잡으세요
1.DALL-E 3 = 빠르고 좋음, Flux = 가성비, SDXL = 자체 호스팅
2.브랜딩 일관성 = 공통 style suffix
3.월 100 이미지 = $5 (가격 부담 없음)
공유하기
진행도 46 / 100