매우 빠른 이미지 생성·편집 모델입니다. 4스텝으로 증류되어 프로덕션 및 준실시간 애플리케이션에 적합한 1초 이내 추론 속도를 제공합니다.
콘솔의 Playground에서 별도 코드 없이 이 모델을 즉시 테스트할 수 있어요
이 모델의 사용법을 Claude, ChatGPT 등에 복사
curl -X POST "https://api.core.today/v1/predictions" \
-H "Content-Type: application/json" \
-H "X-API-Key: cdt_your_api_key" \
-d '{
"model": "black-forest-labs/flux-2-klein-4b",
"input": {
"prompt": "A surreal underwater or cosmic garden scene with bioluminescent flora against a deep navy background",
"output_megapixels": "1",
"aspect_ratio": "1:1"
}
}'| 파라미터 | 타입 | 필수 | 기본값 | 설명 |
|---|---|---|---|---|
prompt | string | Yes | - | 이미지 생성을 위한 텍스트 프롬프트 |
images | array | No | [] | 이미지-이미지 생성을 위한 입력 이미지 (최대 5장) |
aspect_ratio | string | No | 1:1 | 생성 이미지의 종횡비. match_input_image로 첫 입력 이미지의 비율을 따를 수 있음 1:116:99:163:22:34:33:45:44:521:99:21match_input_image |
output_megapixels | string | No | 1 | 출력 이미지의 메가픽셀 해상도. 값이 클수록 더 많은 크레딧이 소요됨 0.250.5124 |
seed | integer | No | - | 재현 가능한 생성을 위한 랜덤 시드 |
go_fast | boolean | No | false | 추가 최적화로 더 빠른 추론 실행 |
output_format | string | No | jpg | 출력 이미지 형식 webpjpgpng |
output_quality | integer | No | 95 | 출력 이미지 저장 품질 (0-100). 100이 최고 품질, 0이 최저 품질. png 출력에는 해당 없음. |
disable_safety_checker | boolean | No | false | 생성된 이미지의 안전성 검사기 비활성화. |
이 모델의 images 파라미터에 파일을 전달하는 방법은 3가지입니다.
POST /v1/predictions/upload에 파일을 직접 첨부합니다. 별도 업로드 과정이 필요 없습니다.
curl -X POST "https://api.core.today/v1/predictions/upload" \
-H "X-API-Key: cdt_your_api_key" \
-F "model=black-forest-labs/flux-2-klein-4b" \
-F 'input={"prompt":"your prompt here"}' \
-F "file:images=@your_file.png"공개 접근 가능한 URL을 직접 전달합니다. Storage API로 업로드한 파일의 file_url도 사용 가능합니다.
{
"model": "black-forest-labs/flux-2-klein-4b",
"input": {
"prompt": "your prompt here",
"images": ["https://example.com/image.jpg"]
}
}POST /v1/predictions 요청 시 사용되는 공통 파라미터입니다.
| 파라미터 | 타입 | 필수 | 기본값 | 설명 |
|---|---|---|---|---|
model | string | Yes | - | 모델 식별자 |
input | object | Yes | - | 위 테이블의 모델별 파라미터를 포함하는 객체 |
output_folder | string | No | - | 결과물 저장 폴더 경로 (최대 256자, '..' 사용 불가) |
webhook_url | string | No | - | 완료 시 호출할 Webhook URL |
is_public | boolean | No | false | true 시 결과물을 영구 공개 URL로도 제공 |
기본 1메가픽셀 텍스트-이미지 생성
curl -X POST "https://api.core.today/v1/predictions" \
-H "Content-Type: application/json" \
-H "X-API-Key: cdt_your_api_key" \
-d '{
"model": "black-forest-labs/flux-2-klein-4b",
"input": {
"prompt": "A surreal underwater or cosmic garden scene with bioluminescent flora against a deep navy background",
"output_megapixels": "1",
"aspect_ratio": "1:1"
}
}'빠른 프롬프트 반복 실험을 위한 0.25메가픽셀 드래프트
curl -X POST "https://api.core.today/v1/predictions" \
-H "Content-Type: application/json" \
-H "X-API-Key: cdt_your_api_key" \
-d '{
"model": "black-forest-labs/flux-2-klein-4b",
"input": {
"prompt": "A neon-lit cyberpunk alley at night, concept sketch",
"output_megapixels": "0.25"
}
}'