메인 콘텐츠로 건너뛰기
POST
/
flux
/
v1
/
{model}
flux generate image
curl --request POST \
  --url https://api.cometapi.com/flux/v1/{model} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "Hello"
}
'
{
  "id": "<string>",
  "polling_url": "<string>"
}

개요

/flux/v1/\{model\} 엔드포인트는 Black Forest Labs의 Flux 모델 패밀리를 사용해 텍스트 프롬프트로 고품질 이미지를 생성합니다. URL 경로의 모델 이름만 바꾸면 서로 다른 Flux 변형 모델 간에 전환할 수 있습니다.
Flux 시리즈 모델마다 파라미터 목록에 큰 차이가 있으므로, 자세한 사용 방법은 공식 문서를 참조하세요. 여기에 제공된 파라미터 목록은 참고용입니다.생성 후에는 /flux/v1/get_result 엔드포인트를 사용해 생성된 이미지를 조회하거나 프로세스 상태를 모니터링하세요.BFL 서비스가 반환하는 이미지 URL은 약 10분 후 만료됩니다. 생성된 결과는 즉시 저장하세요.

인증

Authorization
string
header
필수

Bearer token authentication. Use your CometAPI key.

헤더

Content-Type
string

Must be application/json.

경로 매개변수

model
string
필수

Flux model variant to use, e.g. flux-pro-1.1, flux-pro, flux-dev, flux-pro-1.1-ultra.

본문

application/json
prompt
string
기본값:Hello
필수

Text prompt describing the image to generate.

image_prompt
string

URL of a reference image to guide the generation style or content.

width
integer

Output image width in pixels. Must be a multiple of 32. Range varies by model.

height
integer

Output image height in pixels. Must be a multiple of 32. Range varies by model.

steps
integer

Number of diffusion steps. Higher values improve quality but increase latency.

prompt_upsampling
boolean

When true, automatically enhances the prompt for more detailed results.

seed
integer

Random seed for reproducible outputs. Omit for random generation.

guidance
number

Guidance scale controlling how closely the output follows the prompt. Higher values increase prompt adherence.

safety_tolerance
integer

Safety filter tolerance level. Higher values are more permissive. Range: 0–6.

interval
integer

Diversity interval. Higher values produce more varied outputs at the cost of prompt adherence.

output_format
string

Output image format. Supported values: jpeg, png.

webhook_url
string

URL to receive a POST notification when the task completes.

webhook_secret
string

Secret string included in webhook payloads for request verification.

응답

200 - application/json

OK

id
string
polling_url
string