Black Forest Labs
FLUX.2 Pro
FLUX에서 품질이 가장 좋아요. 정사각 한 장에 $0.03부터예요
black-forest-labs/flux.2-pro100만 토큰 가격
- 입력
- $0.00
- 글 출력
- $26.78571
- 그림 출력
- $26.78571
그림 한 장(1K 크기)은 1,120토큰이라 약 $0.030예요. 더 큰 그림은 토큰이 더 들어요.
코드에서 쓰기
import base64
from openai import OpenAI
client = OpenAI(
base_url="https://alprouter.alpsoft.io/api/v1",
api_key="alp-내-키",
)
answer = client.chat.completions.create(
model="black-forest-labs/flux.2-pro",
messages=[{"role": "user", "content": "노을 지는 바다 위를 나는 종이비행기를 그려 줘"}],
)
# data:image/png;base64,... 모양이에요. 모델에 따라 JPEG로 오기도 해요
url = answer.choices[0].message.images[0]["image_url"]["url"]
kind = url.split(";")[0].split("/")[1]
with open(f"image.{kind}", "wb") as file:
file.write(base64.b64decode(url.split(",", 1)[1]))자세한 정보
- 한 번에 만들 수 있는 출력
- 2,500 토큰
- 도구 호출
- 지원하지 않아요
- 보낼 수 있는 것
- 글
- 받을 수 있는 것
- 글, 그림
- 공급사
- Microsoft Foundry
- 쓸 수 있는 옵션
- image_config, max_completion_tokens, max_tokens, modalities, stream