FLUX.1 Kontext [pro] 기반으로 사진 한 장에서 헤어스타일과 머리 색을 바꿉니다. 90개 이상의 헤어스타일과 30가지 머리 색 중 선택하거나 'Random'으로 랜덤 변신 — 얼굴은 그대로 유지됩니다.
콘솔의 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": "flux-kontext-apps/change-haircut",
"input": {
"input_image": "https://example.com/portrait.png",
"gender": "none",
"haircut": "Random",
"hair_color": "Random",
"aspect_ratio": "match_input_image"
}
}'| 파라미터 | 타입 | 필수 | 기본값 | 설명 |
|---|---|---|---|---|
seed | integer | No | - | 랜덤 시드. 설정 시 재현 가능한 생성 |
gender | string | No | none | 인물의 성별 (선택적 힌트) nonemalefemale |
haircut | string | No | No change | 적용할 헤어스타일 — Bob, Pixie Cut, Layered, French Braid, Undercut, Slicked Back, Hollywood Waves, Box Braids, Chignon 등 90개 이상의 프리셋. 'Random'은 무작위 선택 No changeRandomStraightWavyCurlyBobPixie CutLayeredMessy BunHigh PonytailLow PonytailBraided PonytailFrench BraidDutch BraidFishtail BraidSpace BunsTop KnotUndercutMohawkCrew CutFaux HawkSlicked BackSide-PartedCenter-PartedBlunt BangsSide-Swept BangsShagLobAngled BobA-Line BobAsymmetrical BobGraduated BobInverted BobLayered ShagChoppy LayersRazor CutPermOmbréStraightenedSoft WavesGlamorous WavesHollywood WavesFinger WavesTousledFeatheredPageboyPigtailsPin CurlsRollersetTwist OutBantu KnotsDreadlocksCornrowsBox BraidsCrochet BraidsDouble Dutch BraidsFrench Fishtail BraidWaterfall BraidRope BraidHeart BraidHalo BraidCrown BraidBraided CrownBubble BraidBubble PonytailBallerina BraidsMilkmaid BraidsBohemian BraidsFlat TwistCrown TwistTwisted BunTwisted Half-UpdoTwist and Pin UpdoChignonSimple ChignonMessy ChignonFrench TwistFrench Twist UpdoFrench RollUpdoMessy UpdoKnotted UpdoBallerina BunBanana Clip UpdoBeehiveBouffantHair BowHalf-Up Top KnotHalf-Up, Half-DownMessy Bun with a HeadbandMessy Bun with a ScarfMessy Fishtail BraidSideswept PixieMohawk FadeZig-Zag PartVictory Rolls |
hair_color | string | No | No change | 적용할 머리 색. 'Random'은 무작위 선택 No changeRandomBlondeBrunetteBlackDark BrownMedium BrownLight BrownAuburnCopperRedStrawberry BlondePlatinum BlondeSilverWhiteBluePurplePinkGreenBlue-BlackGolden BlondeHoney BlondeCaramelChestnutMahoganyBurgundyJet BlackAsh BrownAsh BlondeTitaniumRose Gold |
input_image | string | Yes | - | 헤어스타일을 바꿀 인물 이미지 (jpeg, png, gif, webp) |
aspect_ratio | string | No | match_input_image | 생성 이미지의 화면 비율. 'match_input_image'는 입력 이미지 비율 유지 match_input_image1:116:99:164:33:43:22:34:55:421:99:212:11:2 |
output_format | string | No | png | 생성 이미지의 출력 포맷 jpgpng |
safety_tolerance | integer | No | 2 | 안전 허용 수준. 0이 가장 엄격하고 2가 가장 관대하며, 현재 최대 허용치는 2입니다. |
이 모델의 input_image 파라미터에 파일을 전달하는 방법은 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=flux-kontext-apps/change-haircut" \
-F 'input={"prompt":"your prompt here"}' \
-F "file:input_image=@your_file.png"공개 접근 가능한 URL을 직접 전달합니다. Storage API로 업로드한 파일의 file_url도 사용 가능합니다.
{
"model": "flux-kontext-apps/change-haircut",
"input": {
"prompt": "your prompt here",
"input_image": "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로도 제공 |
헤어스타일과 머리 색 모두 모델이 무작위로 선택
curl -X POST "https://api.core.today/v1/predictions" \
-H "Content-Type: application/json" \
-H "X-API-Key: cdt_your_api_key" \
-d '{
"model": "flux-kontext-apps/change-haircut",
"input": {
"input_image": "https://example.com/portrait.png",
"gender": "none",
"haircut": "Random",
"hair_color": "Random",
"aspect_ratio": "match_input_image"
}
}'헤어스타일은 그대로 두고 로즈골드 색만 체험
curl -X POST "https://api.core.today/v1/predictions" \
-H "Content-Type: application/json" \
-H "X-API-Key: cdt_your_api_key" \
-d '{
"model": "flux-kontext-apps/change-haircut",
"input": {
"input_image": "https://example.com/portrait.png",
"haircut": "No change",
"hair_color": "Rose Gold"
}
}'