control_image_urlstring필수제어 맵입니다. 포즈 스켈레톤, 깊이 맵, canny나 soft-edge 선화, 흑백 사진 또는 일반 사진을 넣을 수 있습니다. 대신 추출해 주지는 않으며, 결과는 이 이미지의 화면비를 유지합니다.
- 기본값
- 지정되지 않음
- 제약 조건
- format:"uri"contentMediaType:["image/jpeg","image/png","image/webp","image/gif"]
black-forest-labs/flux-1-dev-controlnet-lora/text-to-imageBlack Forest Labs의 FLUX.1 [dev]를 Shakker Labs의 ControlNet Union Pro 2.0으로 이끄는 텍스트→이미지이며, FLUX.1 dev LoRA를 최대 3개까지 직접 불러옵니다. 제어 이미지 한 장이 포즈나 구도를 정하고 나머지는 프롬프트가 정하며, 어떤 것도 필터링되지 않습니다.
예시는 선택한 엔드포인트의 공개 파라미터 정의를 사용합니다. API 키와 예시 미디어를 바꾼 뒤 서버에서 요청하세요.
SDK 및 연동https://api.spicyapi.ai/api/v1/jobs/createTaskAPI 키는 서버 환경 변수 SPICY_API_KEY에 보관하세요. Bearer 인증을 사용하고 JSON 요청에는 Content-Type: application/json을 지정하세요.
Authorization: Bearer $SPICY_API_KEY
# Generate the idempotency key once; reuse it when retrying after a lost response.
export SPICY_IDEMPOTENCY_KEY="${SPICY_IDEMPOTENCY_KEY:-$(uuidgen)}"
curl -X POST https://api.spicyapi.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $SPICY_IDEMPOTENCY_KEY" \
-d '{
"model": "black-forest-labs/flux-1-dev-controlnet-lora/text-to-image",
"input": {
"control_image_url": "https://example.com/reference.png",
"num_outputs": 1,
"output_format": "jpeg",
"prompt": "A ceramic teapot on a linen cloth, soft window light, muted palette",
"resolution": "1k"
}
}'
# Copy data.taskId from the response into TASK_ID, then poll the status.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.spicyapi.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $SPICY_API_KEY"이 모델의 입력 스키마에서 뽑아낸 예시입니다. API도 모든 요청을 같은 스키마로 검증합니다.
이 필드들은 요청 본문의 input 객체 안에 넣습니다. 이름과 타입은 API와 동일합니다. 기본값이 적혀 있지 않은 필드는 임의로 가정하지 마세요.
control_image_urlstring필수제어 맵입니다. 포즈 스켈레톤, 깊이 맵, canny나 soft-edge 선화, 흑백 사진 또는 일반 사진을 넣을 수 있습니다. 대신 추출해 주지는 않으며, 결과는 이 이미지의 화면비를 유지합니다.
promptstring필수원하는 그림을 인물, 의상, 배경, 빛으로 묘사하십시오. 제어 이미지는 구도만 정합니다. LoRA 트리거 문구를 맨 앞에 두십시오. 최대 5,000자입니다.
seedinteger선택강도나 LoRA를 바꾸는 동안 결과를 비교하기 쉽게 해 줍니다. 실행할 때마다 똑같은 픽셀이 나온다는 보장은 없습니다.
output_formatstring선택기본은 JPEG이며 PNG나 WebP도 고를 수 있습니다. 형식은 가격에 영향이 없습니다.
"jpeg""png""webp"stepsinteger선택노이즈 제거 단계 수이며 1~50(기본값 28)입니다. 단계가 적을수록 빨리 나오고 조금 더 부드럽습니다. 가격에는 영향이 없습니다.
guidance_scalenumber선택이미지가 프롬프트를 얼마나 따를지이며 0~20(기본값 3.5)입니다. 가격에는 영향이 없습니다.
lorasarray<object>선택FLUX.1 dev용으로 학습한 {path, scale} 항목을 최대 3개 넣습니다. scale은 0~4이고 1이 중립입니다. 다른 모델 계열의 LoRA는 요청이 실패합니다. 가격에는 영향이 없습니다.
loras[].pathstring객체 내 필수Direct URL of a LoRA weights file.
loras[].scalenumber객체 내 필수Weight strength from zero to four.
num_outputsinteger선택요금에 영향같은 맵으로 만들 이미지 수이며 1~4(기본값 1)입니다. 이미지마다 과금되므로 4장은 1장의 4배입니다.
resolutionstring선택1k는 긴 변 1,024픽셀로 기본값이고, 1.5k는 1,536픽셀이며 모두 제어 이미지의 화면비를 따릅니다. 가격은 같습니다.
"1k""1.5k"control_guidance_endnumber선택노이즈 제거 과정에서 맵의 적용이 끝나는 지점이며 0~1(기본값 0.8)입니다. 포즈 맵은 0.65 안팎으로 일찍 끝내면 세부가 더 자유로워집니다. 가격에는 영향이 없습니다.
control_guidance_startnumber선택노이즈 제거 과정에서 맵이 적용되기 시작하는 지점이며 0~1(기본값 0)입니다. 끝 지점보다 늦을 수 없습니다. 가격에는 영향이 없습니다.
control_strengthnumber선택결과가 제어 맵을 얼마나 강하게 따를지이며 0~1(기본값 0.7)입니다. 포즈 맵은 0.9 안팎이 잘 맞았고, 0.3에서는 저희 포즈가 무시되었습니다. 1을 넘는 값은 거부됩니다. 가격에는 영향이 없습니다.
{
"additionalProperties": false,
"properties": {
"control_guidance_end": {
"default": 0.8,
"description": "Fraction of the denoising steps at which the control image stops applying, from 0 to 1; not before the start.",
"maximum": 1,
"minimum": 0,
"type": "number",
"x-ui": {
"advanced": true,
"order": 75,
"step": 0.05,
"widget": "slider"
}
},
"control_guidance_start": {
"default": 0,
"description": "Fraction of the denoising steps at which the control image starts to apply, from 0 to 1.",
"maximum": 1,
"minimum": 0,
"type": "number",
"x-ui": {
"advanced": true,
"order": 76,
"step": 0.05,
"widget": "slider"
}
},
"control_image_url": {
"contentMediaType": [
"image/jpeg",
"image/png",
"image/webp",
"image/gif"
],
"description": "Control image: a pose skeleton, depth map, canny or soft-edge line map, or a grayscale or plain photo. The result keeps its aspect ratio.",
"format": "uri",
"type": "string",
"x-ui": {
"max_size_mb": 10,
"order": 90,
"primary": true,
"widget": "upload"
}
},
"control_strength": {
"default": 0.7,
"description": "How strongly the result follows the control image, from 0 to 1.",
"maximum": 1,
"minimum": 0,
"type": "number",
"x-ui": {
"order": 80,
"step": 0.05,
"widget": "slider"
}
},
"guidance_scale": {
"default": 3.5,
"description": "How closely the image follows the prompt, from 0 to 20.",
"maximum": 20,
"minimum": 0,
"type": "number",
"x-ui": {
"order": 40,
"step": 0.5,
"widget": "slider"
}
},
"loras": {
"default": [],
"description": "Up to three LoRA weight files trained for FLUX.1 dev, each with its own strength.",
"items": {
"additionalProperties": false,
"properties": {
"path": {
"contentMediaType": [
"application/octet-stream"
],
"description": "Direct URL of a LoRA weights file.",
"format": "uri",
"minLength": 1,
"type": "string"
},
"scale": {
"default": 1,
"description": "Weight strength from zero to four.",
"maximum": 4,
"minimum": 0,
"type": "number"
}
},
"required": [
"path",
"scale"
],
"type": "object"
},
"maxItems": 3,
"type": "array",
"x-ui": {
"order": 50,
"widget": "object-list"
}
},
"num_outputs": {
"default": 1,
"description": "How many images to generate in one run, from 1 to 4.",
"maximum": 4,
"minimum": 1,
"type": "integer",
"x-ui": {
"affects_price": true,
"order": 66,
"widget": "number"
}
},
"output_format": {
"default": "jpeg",
"description": "Container of the returned image.",
"enum": [
"jpeg",
"png",
"webp"
],
"type": "string",
"x-ui": {
"order": 20,
"widget": "select"
}
},
"prompt": {
"description": "Describe the picture you want: subject, clothing, setting and light. The control image only sets the layout.",
"maxLength": 5000,
"minLength": 1,
"type": "string",
"x-ui": {
"order": 100,
"widget": "textarea"
}
},
"resolution": {
"default": "1k",
"description": "Length of the output's long side: 1k is 1024 pixels, 1.5k is 1536. The control image's aspect ratio is kept.",
"enum": [
"1k",
"1.5k"
],
"type": "string",
"x-ui": {
"affects_price": false,
"order": 70,
"widget": "radio"
}
},
"seed": {
"description": "Random seed for controlled comparisons.",
"maximum": 2147483647,
"minimum": 0,
"type": "integer",
"x-ui": {
"order": 10,
"widget": "number"
}
},
"steps": {
"default": 28,
"description": "Denoising steps, from 1 to 50. Fewer steps return faster and a little softer.",
"maximum": 50,
"minimum": 1,
"type": "integer",
"x-ui": {
"advanced": true,
"order": 30,
"step": 1,
"widget": "slider"
}
}
},
"required": [
"control_image_url",
"prompt"
],
"type": "object",
"x-pricing": {
"billingMode": "per_unit",
"variantFields": []
}
}HTTP 202는 접수되었다는 뜻이며 생성 완료가 아닙니다. 반환된 taskId를 저장하고 같은 작업을 조회하세요. 결과를 기다리는 동안 작업을 다시 생성하지 마세요.
HTTP/1.1 202 Accepted
Location: /api/v1/jobs/recordInfo?taskId=job_01k3m8x9q2z4v7n5p6r8s0t1w3
{
"code": 200,
"msg": "success",
"request_id": "req_example_create",
"data": {
"taskId": "job_01k3m8x9q2z4v7n5p6r8s0t1w3",
"state": "queued",
"estimatedCost": "0.750000"
}
}접수 응답에 이번 예상 비용이 포함되므로 앱의 작업 기록과 청구 화면에 같은 금액을 표시할 수 있습니다.
curl --get "https://api.spicyapi.ai/api/v1/jobs/recordInfo" \
--data-urlencode "taskId=$TASK_ID" \
-H "Authorization: Bearer $SPICY_API_KEY"약 2초 간격으로 시작해서 점점 간격을 넓히세요. 종료 상태가 나오면 멈추고, 연결이 끊겼더라도 원래 taskId를 그대로 조회하세요. 다시 생성할 때는 처음에 쓴 Idempotency-Key와 본문을 그대로 써야 합니다.
import { verifyWebhook } from "@spicyapi/sdk";
// express.raw keeps the bytes we signed; express.json never matches.
app.post("/hooks/spicy", express.raw({ type: "application/json" }), (req, res) => {
const { payload } = verifyWebhook({
rawBody: req.body,
timestamp: req.header("X-Webhook-Timestamp"),
signature: req.header("X-Webhook-Signature"),
payloadVersion: Number(req.header("X-Webhook-Payload-Version")),
secret: process.env.SPICY_WEBHOOK_SECRET,
});
res.status(200).end();
void handleFinishedTask(payload);
});작업을 만들 때 callBackUrl을 넘기면 완료된 레코드가 POST로 전달됩니다 — 폴링 루프가 아예 필요 없습니다. 모든 전달에는 X-Webhook-Timestamp, X-Webhook-Signature, X-Webhook-Payload-Version이 함께 옵니다. 서명은 taskId.timestamp.sha256(body)에 대한 base64 HMAC-SHA256이므로 반드시 원본 바이트로 검증해야 합니다. JSON을 파싱했다가 다시 직렬화하면 바이트가 달라져 검증이 실패합니다. 실패한 전달은 재시도되므로 같은 taskId가 두 번 올 수 있습니다. 핸들러를 멱등하게 만드세요. 먼저 2xx로 답하고 처리는 그다음에 — 응답이 느리면 전달 실패로 간주됩니다.
state가 succeeded일 때만 output을 사용하세요. 실패 시 errorCode, errorMessage, request_id로 원인을 확인하세요. 예시 비용과 상태는 실제 청구 내역이 아닙니다.
{
"code": 200,
"msg": "success",
"request_id": "req_example_record",
"data": {
"taskId": "job_01k3m8x9q2z4v7n5p6r8s0t1w3",
"model": "black-forest-labs/flux-1-dev-controlnet-lora/text-to-image",
"state": "succeeded",
"output": {
"assets": [
{
"key": "tasks/2026/08/28/job_01k3m8x9q2z4v7n5p6r8s0t1w3/3f7a1c9e5b2d48f0a6c1e3d5b7f9a1c3.png",
"mime": "image/png",
"url": "https://example.r2.cloudflarestorage.com/results/job_01k3m8x9q2z4v7n5p6r8s0t1w3/result.png?X-Amz-Signature=SIGNATURE_FROM_RESPONSE",
"expiresAt": "2026-08-28T12:20:08.000Z"
}
]
},
"cost": "0.750000",
"settled": true,
"createdAt": "2026-08-28T12:00:00Z",
"completedAt": "2026-08-28T12:00:30Z"
}
}사용 가능한 파일은 assets[].url에서 바로 열거나 다운로드할 수 있으며 API Authorization 헤더가 필요하지 않습니다. 서명 URL은 expiresAt에 만료됩니다. 보관 기간 내에 작업을 다시 조회하면 URL이 갱신됩니다. 처리 중이거나 사용할 수 없는 파일에는 URL이 없습니다. 서명 URL은 비공개로 보관하세요.
앱, 터미널, AI 어시스턴트 또는 시각적 워크플로에서 SpicyAPI를 사용하세요. 원하는 설정 가이드를 선택하세요.
위 코드를 직접 쓸 필요는 없습니다. MCP 서버를 한 번만 연결해 두면 MCP를 지원하는 에이전트(Claude Code, Codex, Cursor, Windsurf, VS Code, Gemini CLI, Cline, LibreChat)가 이 모델을 이름으로 호출합니다. 셸에서 명령 한 줄로 실행할 수도 있습니다.
black-forest-labs/flux-1-dev-controlnet-lora/text-to-image로 네온 아래 선 댄서의 인물 사진을 만들어서 ./out/에 저장해 줘.
에이전트가 공개 카탈로그에서 모델을 찾고, 로컬 파일을 대신 업로드한 뒤, 정확한 견적과 최대 청구액을 보여 주고 확인을 기다립니다. 승인하기 전에는 요금이 발생하지 않습니다.
claude mcp add spicyapi -e SPICY_API_KEY=$SPICY_API_KEY \
-- npx --yes --package=@spicyapi/mcp spicyapi-mcp
npx skills add spicyapi-ai/spicy-skill첫 줄은 도구를, 둘째 줄은 Skill을 넘겨줍니다. Skill은 그 도구를 다루는 규칙입니다 — 청구 전에 견적을 받고, 로컬 파일은 바이트를 붙여 넣는 대신 업로드하고, 완성된 산출물 URL을 추측하지 않고 읽습니다. 다른 클라이언트도 각자의 설정 파일로 같은 서버를 사용합니다. 개발자 페이지를 참고하세요.
npx @spicyapi/cli tasks create --model black-forest-labs/flux-1-dev-controlnet-lora/text-to-image \
--input-json '{"control_image_url":"https://example.com/reference.png","num_outputs":1,"output_format":"jpeg","prompt":"A ceramic teapot on a linen cloth, soft window light, muted palette","resolution":"1k"}' \
--wait입력값은 위 예시와 마찬가지로 이 엔드포인트의 스키마에서 생성했습니다. --wait는 작업이 끝날 때까지 폴링해 결과를 출력하고, CI에서는 --yes로 확인 절차를 건너뜁니다. 먼저 SPICY_API_KEY를 설정하세요. API와 CLI, MCP 서버가 같은 키를 씁니다.
npx @spicyapi/cli files upload ./poster.png
# -> spicy://uploads/01k3m8x9q2z4v7n5p6r8s0t1w3
npx @spicyapi/cli tasks create --model black-forest-labs/flux-1-dev-controlnet-lora/text-to-image \
--input-json '{"control_image_url":"spicy://uploads/01k3m8x9q2z4v7n5p6r8s0t1w3"}' \
--wait요청 본문은 바이트가 아니라 URL을 받습니다. 파일을 먼저 업로드하고 출력되는 spicy:// URI를 넘기세요. 위 필드 이름은 이 엔드포인트의 스키마에서 그대로 가져온 것입니다. MCP를 쓰는 에이전트는 이 단계를 대신 처리합니다 — 앞의 문장이 ./poster.png를 그대로 가리킬 수 있는 이유입니다. 공개 HTTPS로 접근되는 미디어는 업로드가 필요 없습니다.
npx @spicyapi/cli tasks create --model black-forest-labs/flux-1-dev-controlnet-lora/text-to-image \
--input-json '{…}' --retention 1h --wait
npx @spicyapi/cli tasks get $TASK_ID # read back the retention that applied--retention은 보관 기간을 줄이기만 합니다 — 30m, 1h, 7d, 또는 0이면 작업이 종료 상태에 도달하는 즉시 삭제됩니다. 실제로 적용되는 값은 요청과 계정 설정, 플랫폼 상한 중 가장 짧은 값이므로 요청한 숫자가 그대로 반영됐다고 가정하지 말고 작업 레코드에서 다시 읽으세요. 계정이 허용하는 것보다 긴 값을 넘기면 아무 일도 일어나지 않습니다.
ComfyUI Manager나 아래 명령으로 SpicyAPI 노드를 설치한 뒤 캔버스에서 FLUX.1 Dev ControlNet LoRA · ControlNet Text to Image를 검색하세요. 노드는 이 페이지와 같은 옵션을 제공하며, 실행하기 전에 가격을 보여 줍니다.
cd ComfyUI/custom_nodes
git clone https://github.com/spicyapi-ai/comfyui-spicyapi삽입된 패널은 이 페이지와 같은 스키마를 참조하므로 API 사양과 어긋나지 않습니다. 문서 검색 대상에 포함하려면 /api/embed/models/의 JSON을 받아 직접 렌더링하세요.
<iframe src="https://spicyapi.ai/embed/ko/models/flux-1-dev-controlnet-lora/api?model=black-forest-labs%2Fflux-1-dev-controlnet-lora%2Ftext-to-image" width="100%" height="560" loading="lazy" title="요청 예시" style="border:1px solid rgba(0,0,0,.12)"></iframe>