FLUX 3 API 문서
코드에서 FLUX 3 API를 호출하는 데 필요한 모든 내용입니다. 기본 URL은 https://cheapergen.com/api/v1입니다. 먼저 플레이그라운드에서 테스트해 보세요.
코딩 에이전트를 사용하시나요?
이 내용을 Claude Code, Cursor, Codex 또는 원하는 코딩 에이전트에 붙여넣으세요. 프로젝트에 API를 추가하고 API 키는 CHEAPERGEN_API_KEY에 보관하며, 비용을 사용하기 전에 무료 견적을 요청해 테스트합니다.
Add FLUX 3 (CheaperGen endpoint bfl/ flux-3/ text-to-image) to this project by following https:/ / cheapergen.com/ agents/ integrate.md인증
대시보드 → API 키에서 키를 만들고 bearer token으로 전송하세요. 키는 서버에 안전하게 보관하세요.
export CHEAPERGEN_API_KEY="cg_live_…"
# every request
Authorization: Bearer $CHEAPERGEN_API_KEYFLUX 3 텍스트 → 이미지 API
/api/v1/run/bfl/flux-3/text-to-image비동기 작업을 제출하고 생성 ID가 포함된 HTTP 202 응답을 반환합니다. GET /api/v1/generations/{id}의 상태를 조회하거나 webhook_url를 전달하세요. 자세한 내용은 작업 수명 주기 문서를 참조하세요.
입력 매개변수
| 이름 | 유형 | 설명 | 가격에 영향 |
|---|---|---|---|
prompt필수 | string | 피사체, 동작, 카메라 움직임, 조명, 스타일을 설명하세요. | 없음 |
aspect_ratio | string (enum) | 출력 이미지 비율입니다. 허용값: 1:1 · 4:5 · 3:4 · 2:3 · 9:16 · 1:2 · 9:21 · 5:4 · 4:3 · 3:2 · 16:9 · 2:1 · 21:9 · 7:5 · 5:7 기본값: 1:1 | 예 |
resolution | string (enum) | 출력 크기: 1K ≈ 1 MP, 1.5K ≈ 2.25 MP, 2K ≈ 4 MP, 4K ≈ 16 MP. 허용값: 1K · 1.5K · 2K · 4K 기본값: 1K | 예 |
webhook_url | 문자열(URL) | 선택 사항. 완료된 생성을 웹훅 비밀키로 서명해 이곳으로 POST합니다. 웹훅 | 없음 |
요청
const API = "https://cheapergen.com/api/v1";
const headers = {
Authorization: `Bearer ${process.env.CHEAPERGEN_API_KEY}`,
"Content-Type": "application/json",
};
// 1. Submit the job
let job = await fetch(`${API}/run/bfl/flux-3/text-to-image`, {
method: "POST",
headers,
body: JSON.stringify({
"prompt": "비에 젖은 타이베이 야시장, 음식 노점에서 피어오르는 김, 한자로 된 네온사인, 35mm 사진",
"aspect_ratio": "1:1",
"resolution": "1K"
}),
}).then((r) => r.json());
// 2. Poll until it finishes (or pass webhook_url and skip polling)
while (job.status === "queued" || job.status === "running") {
await new Promise((r) => setTimeout(r, 3000));
job = await fetch(`${API}/generations/${job.id}`, { headers }).then((r) => r.json());
}
console.log(job.status === "succeeded" ? job.output.images[0].url : job.error);응답
{
"id": "gen_8c2QmX1nq0k4",
"object": "generation",
"model": "bfl/flux-3",
"endpoint": "bfl/flux-3/text-to-image",
"mode": "text-to-image",
"status": "queued",
"input": {
"prompt": "비에 젖은 타이베이 야시장, 음식 노점에서 피어오르는 김, 한자로 된 네온사인, 35mm 사진",
"aspect_ratio": "1:1",
"resolution": "1K"
},
"output": null,
"error": null,
"cost": {
"amount_usd": 0.2255,
"currency": "usd",
"estimated": true,
"official_usd": null,
"list_price_source": "official",
"list_price_label": "Official",
"saved_usd": null
},
"source": "api",
"started_at": null,
"completed_at": null,
"urls": {
"get": "https://cheapergen.com/api/v1/generations/gen_8c2QmX1nq0k4",
"cancel": "https://cheapergen.com/api/v1/generations/gen_8c2QmX1nq0k4/cancel"
},
"created_at": "2026-10-15T09:21:04Z"
}FLUX 3 이미지 편집 API
/api/v1/run/bfl/flux-3/edit비동기 작업을 제출하고 생성 ID가 포함된 HTTP 202 응답을 반환합니다. GET /api/v1/generations/{id}의 상태를 조회하거나 webhook_url를 전달하세요. 자세한 내용은 작업 수명 주기 문서를 참조하세요.
입력 매개변수
| 이름 | 유형 | 설명 | 가격에 영향 |
|---|---|---|---|
prompt필수 | string | 피사체, 동작, 카메라 움직임, 조명, 스타일을 설명하세요. | 없음 |
image_urls필수 | string[] (URLs) | 수정하거나 조합할 참조 이미지를 최대 10개까지 사용할 수 있습니다. 프롬프트에서 “이미지 1”, “이미지 2”…와 같이 참조하세요. 최대 항목 수: 10 | 없음 |
aspect_ratio | string (enum) | 출력 이미지 비율입니다. 허용값: 1:1 · 4:5 · 3:4 · 2:3 · 9:16 · 1:2 · 9:21 · 5:4 · 4:3 · 3:2 · 16:9 · 2:1 · 21:9 · 7:5 · 5:7 기본값: 1:1 | 예 |
resolution | string (enum) | 출력 크기: 1K ≈ 1 MP, 1.5K ≈ 2.25 MP, 2K ≈ 4 MP, 4K ≈ 16 MP. 허용값: 1K · 1.5K · 2K · 4K 기본값: 1K | 예 |
webhook_url | 문자열(URL) | 선택 사항. 완료된 생성을 웹훅 비밀키로 서명해 이곳으로 POST합니다. 웹훅 | 없음 |
요청
const API = "https://cheapergen.com/api/v1";
const headers = {
Authorization: `Bearer ${process.env.CHEAPERGEN_API_KEY}`,
"Content-Type": "application/json",
};
// 1. Submit the job
let job = await fetch(`${API}/run/bfl/flux-3/edit`, {
method: "POST",
headers,
body: JSON.stringify({
"prompt": "이미지 1을 이미지 2의 스타일로 바꾸되 구도와 인물은 그대로 유지하세요",
"image_urls": [
"https://cdn.cheapergen.com/samples/portrait.jpg"
],
"aspect_ratio": "1:1",
"resolution": "1K"
}),
}).then((r) => r.json());
// 2. Poll until it finishes (or pass webhook_url and skip polling)
while (job.status === "queued" || job.status === "running") {
await new Promise((r) => setTimeout(r, 3000));
job = await fetch(`${API}/generations/${job.id}`, { headers }).then((r) => r.json());
}
console.log(job.status === "succeeded" ? job.output.images[0].url : job.error);응답
{
"id": "gen_8c2QmX1nq0k4",
"object": "generation",
"model": "bfl/flux-3",
"endpoint": "bfl/flux-3/edit",
"mode": "edit",
"status": "queued",
"input": {
"prompt": "이미지 1을 이미지 2의 스타일로 바꾸되 구도와 인물은 그대로 유지하세요",
"image_urls": [
"https://cdn.cheapergen.com/samples/portrait.jpg"
],
"aspect_ratio": "1:1",
"resolution": "1K"
},
"output": null,
"error": null,
"cost": {
"amount_usd": 0.2255,
"currency": "usd",
"estimated": true,
"official_usd": null,
"list_price_source": "official",
"list_price_label": "Official",
"saved_usd": null
},
"source": "api",
"started_at": null,
"completed_at": null,
"urls": {
"get": "https://cheapergen.com/api/v1/generations/gen_8c2QmX1nq0k4",
"cancel": "https://cheapergen.com/api/v1/generations/gen_8c2QmX1nq0k4/cancel"
},
"created_at": "2026-10-15T09:21:04Z"
}결과 가져오기
생성은 비동기로 처리됩니다. status 값을 확인해 succeeded, failed, canceled 중 하나가 될 때까지 폴링하거나 제출 시 webhook_url를 전달하세요. 실패한 생성은 자동 환불됩니다.
curl https://cheapergen.com/api/v1/generations/gen_8c2QmX1nq0k4 \
-H "Authorization: Bearer $CHEAPERGEN_API_KEY"FLUX 3 요금
결제 이미지당 사용한 만큼 결제하며 구독은 필요하지 않습니다 (월간 요금제은 선택 사항입니다). 생성 실패 시 자동으로 환불됩니다.
| 등급 | 공식 가격 | CheaperGen | 절감액 |
|---|---|---|---|
1K ≈1 MP | $0.0317/img | −34% | |
1.5K ≈2.25 MP | $0.0644/img | −8% | |
2K ≈4 MP | $0.092/img | −8% | |
4K ≈16 MP | $0.5073/img | −16% |
- 공식 가격: FLUX 3 Image의 BFL API 공식 가격 (1K $0.048, 1.5K $0.07, 2K $0.10, 4K $0.607; 참조 이미지는 무료). 가격 확인일 2026년 10월 18일.
- 편집 요금은 생성과 같으며, 참조 이미지는 무료입니다.