Skip to main content
POST

개요

POST /flux/v1/\{model\} 네이티브 BFL 형식 이미지 작업을 제출합니다. 최상위 응답의 id을 저장한 후 GET /flux/v1/get_result 해당 작업 ID로 폴링합니다. API 플레이그라운드에는 FLUX.2 Pro, Flex 및 Max용 텍스트-이미지 요청 예제가 포함되어 있습니다. 모델 ID와 계정 사용 가능 여부는 모델 페이지 또는 /v1/models에서 확인하세요.

요청 필드

prompt, width, height, output_format부터 시작하세요. seed도 전송할 수 있습니다. 완료된 결과에는 사용된 시드가 보고될 수 있지만, 이 필드만으로는 재현 가능한 출력이 보장되지 않습니다. 참조 이미지 편집의 경우 input_image에 공개 HTTPS 이미지 URL을 전송하세요. 이 필드는 위의 세 가지 FLUX.2 모델에서 지원됩니다. FLUX.2 Pro는 input_image_2에도 두 번째 공개 HTTPS URL을 허용합니다. input_imageinput_image_2을 전송할 때마다 포함하세요.

제출 및 폴링

작업이 실행되는 동안 생성 응답은 status: "processing"을 사용할 수 있습니다. CometAPI 결과 엔드포인트에 최상위 id을 사용하세요. 클라이언트는 응답에서 제공되는 polling_url에 의존해서는 안 됩니다. 결과 엔드포인트가 status: "Ready"을 반환할 때까지 폴링하세요. Error, Failed, Failure, Task not found, Request Moderated, Content Moderated은 실패로 처리하세요. 다른 상태에서는 애플리케이션의 재시도 및 시간 제한 내에서 계속 폴링하세요.
작업이 준비되면 result.sample은 임시 이미지 URL입니다. 즉시 다운로드하거나 전송하세요. 고정된 유효 기간에 의존하지 마세요.

인증

Authorization
string
header
필수

Bearer token authentication. Use your CometAPI key.

경로 매개변수

model
string
필수

FLUX.2 model ID in the URL path. Check /v1/models or the Models page for account availability.

본문

application/json
prompt
string
필수

Text prompt describing the image or reference-image edit.

예시:

"A clean editorial photograph of a red ceramic teapot on a pale blue table, soft window light, no text."

input_image
string

Public HTTPS URL of the first reference image. Replace the example URL with an image that the model provider can retrieve. This editing field is available for the FLUX.2 models covered by this reference.

예시:

"https://your-image-host/reference-one.jpg"

input_image_2
string

Public HTTPS URL of a second reference image for flux-2-pro. Replace the example URL and also send input_image.

예시:

"https://your-image-host/reference-two.jpg"

seed
integer

Optional seed value. A completed result can report the used seed; that field alone does not establish repeatable output.

width
integer

Requested output width in pixels. Use a dimension supported by the selected model.

예시:

1280

height
integer

Requested output height in pixels. Use a dimension supported by the selected model.

예시:

768

output_format
string

Requested output image format supported by the selected model. The examples use png.

예시:

"png"

응답

200 - application/json

FLUX task submission response. Save the top-level id and poll the CometAPI result endpoint.

id
string
필수

Task ID to pass to GET /flux/v1/get_result?id=....

status
string
필수

Submission state. An accepted task can return processing.

result
object | null

Task result. It can be empty or null at submission time.

polling_url
string | null

Response-supplied convenience URL when returned. Clients should poll the documented CometAPI result route by the top-level id.

cost
number | null

Numeric billing coefficient when returned. This field is not documented as a currency or credit amount.

input_mp
number | null

Input image megapixels when returned.

output_mp
number | null

Output image megapixels when returned.

progress
number | null

Task progress when returned.

details
any

Additional task details when returned.

preview
any

Task preview data when returned.

마지막 수정일 2026년 7월 31일