官方文档: https://replicate.com/lucataco/flux-dev-lora
POST
/replicate/v1/predictions创建任务 lucataco/flux-dev-lora
API Key application/json
请求示例
curl -X POST https://top.qingyuntop.ai/replicate/v1/predictions \
-H "Authorization: Bearer ${QINGYUN_TOP_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"version": "lucataco/flux-dev-lora:091495765fa5ef2725a175a57b276ec30dc9d39c22d30410f2ede68a3eab66b3",
"input": {
"prompt": "a beautiful castle frstingln illustration",
"hf_lora": "alvdansen/frosting_lane_flux",
"lora_scale": 0.8,
"num_outputs": 1,
"aspect_ratio": "1:1",
"output_format": "webp",
"guidance_scale": 3.5,
"output_quality": 80,
"prompt_strength": 0.8,
"num_inference_steps": 28
}
}'请求参数
| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
Authorization | Header | string | 否 | - | Bearer {{YOUR_API_KEY}} |
version | JSON body | string | 否 | - | - |
input | JSON body | object | 否 | - | - |
input.prompt | JSON body | string | 是 | 提示生成图像。 | - |
input.hf_lora | JSON body | string | 否 | HF、Replicate、CivitAI 或 LoRA 的 URL。例如:alvdansen/frosting_lane_flux | - |
input.lora_scale | JSON body | number | 否 | LoRA 权重的缩放。默认值:0.8。 | - |
input.num_outputs | JSON body | integer | 否 | 要输出的图像数量。默认值:1。最小值:1,最大值:4。 | - |
input.aspect_ratio | JSON body | string | 否 | 生成图像的长宽比。默认值:“1:1”。 | - |
input.output_format | JSON body | string | 否 | 输出图像的格式。默认值:“webp”。 | - |
input.guidance_scale | JSON body | number | 否 | 引导强度。默认值:3.5。最小值:0,最大值:10。 | - |
input.output_quality | JSON body | integer | 否 | 保存输出图像时的质量,范围为 0 至 100。100 为最佳质量,0 为最低质量。与 .png 输出无关。默认值:80。 | - |
input.prompt_strength | JSON body | number | 否 | 使用图像对图像时的提示强度(或去噪强度)。1.0 对应于完全破坏图像中的信息。默认值:0.8。 | - |
input.num_inference_steps | JSON body | integer | 否 | 推理步骤数。默认值:28。最小值:1,最大值:50。 | - |
返回响应 (200)
| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
id | 响应 JSON | string | 是 | - | - |
model | 响应 JSON | string | 是 | - | - |
version | 响应 JSON | string | 是 | - | - |
input | 响应 JSON | object | 是 | - | - |
input.aspect_ratio | 响应 JSON | string | 是 | - | - |
input.input_image | 响应 JSON | string | 是 | - | - |
input.output_format | 响应 JSON | string | 是 | - | - |
input.prompt | 响应 JSON | string | 是 | - | - |
input.prompt_upsampling | 响应 JSON | boolean | 是 | - | - |
input.safety_tolerance | 响应 JSON | integer | 是 | - | - |
logs | 响应 JSON | string | 是 | - | - |
output | 响应 JSON | null | 是 | - | - |
data_removed | 响应 JSON | boolean | 是 | - | - |
error | 响应 JSON | null | 是 | - | - |
status | 响应 JSON | string | 是 | - | - |
created_at | 响应 JSON | string | 是 | - | - |
urls | 响应 JSON | object | 是 | - | - |
urls.cancel | 响应 JSON | string | 是 | - | - |
urls.get | 响应 JSON | string | 是 | - | - |
urls.stream | 响应 JSON | string | 是 | - | - |
urls.web | 响应 JSON | string | 是 | - | - |
响应示例
{
"id": "c9zn270jk1rj00crans8m6ssjc",
"model": "lucataco/flux-dev-lora",
"version": "091495765fa5ef2725a175a57b276ec30dc9d39c22d30410f2ede68a3eab66b3",
"input": {
"aspect_ratio": "1:1",
"guidance_scale": 3.5,
"hf_lora": "alvdansen/frosting_lane_flux",
"lora_scale": 0.8,
"num_inference_steps": 28,
"num_outputs": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "a beautiful castle frstingln illustration",
"prompt_strength": 0.8
},
"logs": "",
"output": null,
"data_removed": false,
"error": null,
"status": "starting",
"created_at": "2025-07-29T09:09:55.992Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/c9zn270jk1rj00crans8m6ssjc/cancel",
"get": "https://api.replicate.com/v1/predictions/c9zn270jk1rj00crans8m6ssjc",
"stream": "https://stream.replicate.com/v1/files/qoxq-37kfnrolbp7l2vy5f2ffduf6vyqye4savtprvsiikqzpcjbuejfa",
"web": "https://replicate.com/p/c9zn270jk1rj00crans8m6ssjc"
}
}来源原始接口定义(用于追溯)
以下内容来自 Apifox 快照,可能包含兼容层字段或旧示例;公开调用请以本页的协议说明和当前模型列表为准。
{
"id": 497673399,
"name": "创建任务 lucataco/flux-dev-lora",
"type": "http",
"serverId": "",
"preProcessors": [],
"postProcessors": [
{
"type": "customScript",
"data": "// 将接口返回数据,封装成自己需要的结构\r\nvar resp = {\r\n response: pm.response.json().data[0].url\r\n}\r\n\r\n// html 模板字符\r\nvar template = `<html><img src=\"{{response}}\" /></html>`;\r\n\r\n// 设置 visualizer 数据。传模板、解析对象。\r\npm.visualizer.set(template, resp);",
"defaultEnable": true,
"enable": true,
"id": "MLVmV9HufvX0bj3ULVpGXMS9sQtAECl1"
}
],
"inheritPreProcessors": {},
"inheritPostProcessors": {},
"description": "官方文档: https://replicate.com/lucataco/flux-dev-lora",
"operationId": "",
"sourceUrl": "",
"method": "post",
"path": "/replicate/v1/predictions",
"tags": [],
"status": 1,
"requestBody": {
"type": "application/json",
"parameters": [],
"jsonSchema": {
"type": "object",
"properties": {
"version": {
"type": "string"
},
"input": {
"type": "object",
"properties": {
"prompt": {
"type": "string",
"description": "提示生成图像。"
},
"hf_lora": {
"type": "string",
"description": "HF、Replicate、CivitAI 或 LoRA 的 URL。例如:alvdansen/frosting_lane_flux"
},
"lora_scale": {
"type": "number",
"description": "LoRA 权重的缩放。默认值:0.8。"
},
"num_outputs": {
"type": "integer",
"description": "要输出的图像数量。默认值:1。最小值:1,最大值:4。"
},
"aspect_ratio": {
"type": "string",
"description": "生成图像的长宽比。默认值:“1:1”。"
},
"output_format": {
"type": "string",
"description": "输出图像的格式。默认值:“webp”。"
},
"guidance_scale": {
"type": "number",
"description": "引导强度。默认值:3.5。最小值:0,最大值:10。"
},
"output_quality": {
"type": "integer",
"description": "保存输出图像时的质量,范围为 0 至 100。100 为最佳质量,0 为最低质量。与 .png 输出无关。默认值:80。"
},
"prompt_strength": {
"type": "number",
"description": "使用图像对图像时的提示强度(或去噪强度)。1.0 对应于完全破坏图像中的信息。默认值:0.8。"
},
"num_inference_steps": {
"type": "integer",
"description": "推理步骤数。默认值:28。最小值:1,最大值:50。"
}
},
"required": [
"prompt"
],
"x-apifox-orders": [
"prompt",
"hf_lora",
"lora_scale",
"num_outputs",
"aspect_ratio",
"output_format",
"guidance_scale",
"output_quality",
"prompt_strength",
"num_inference_steps"
]
}
},
"x-apifox-orders": [
"version",
"input"
]
},
"examples": [
{
"value": "{\n \"version\": \"lucataco/flux-dev-lora:091495765fa5ef2725a175a57b276ec30dc9d39c22d30410f2ede68a3eab66b3\",\n \"input\": {\n \"prompt\": \"a beautiful castle frstingln illustration\",\n \"hf_lora\": \"alvdansen/frosting_lane_flux\",\n \"lora_scale\": 0.8,\n \"num_outputs\": 1,\n \"aspect_ratio\": \"1:1\",\n \"output_format\": \"webp\",\n \"guidance_scale\": 3.5,\n \"output_quality\": 80,\n \"prompt_strength\": 0.8,\n \"num_inference_steps\": 28\n }\n }",
"mediaType": "application/json",
"description": ""
}
],
"mediaType": "",
"oasExtensions": "",
"required": false,
"additionalContentTypes": []
},
"parameters": {
"path": [],
"query": [],
"cookie": [],
"header": [
{
"id": "GTujCrB2It",
"name": "Authorization",
"required": false,
"enable": true,
"description": "",
"type": "string",
"sampleValue": "Bearer {{YOUR_API_KEY}}"
}
]
},
"commonParameters": {
"query": [],
"body": [],
"cookie": [],
"header": []
},
"auth": {},
"responses": [
{
"id": 170729803,
"name": "成功",
"code": 200,
"contentType": "json",
"jsonSchema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"model": {
"type": "string"
},
"version": {
"type": "string"
},
"input": {
"type": "object",
"properties": {
"aspect_ratio": {
"type": "string"
},
"input_image": {
"type": "string"
},
"output_format": {
"type": "string"
},
"prompt": {
"type": "string"
},
"prompt_upsampling": {
"type": "boolean"
},
"safety_tolerance": {
"type": "integer"
}
},
"required": [
"aspect_ratio",
"input_image",
"output_format",
"prompt",
"prompt_upsampling",
"safety_tolerance"
],
"x-apifox-orders": [
"aspect_ratio",
"input_image",
"output_format",
"prompt",
"prompt_upsampling",
"safety_tolerance"
]
},
"logs": {
"type": "string"
},
"output": {
"type": "null"
},
"data_removed": {
"type": "boolean"
},
"error": {
"type": "null"
},
"status": {
"type": "string"
},
"created_at": {
"type": "string"
},
"urls": {
"type": "object",
"properties": {
"cancel": {
"type": "string"
},
"get": {
"type": "string"
},
"stream": {
"type": "string"
},
"web": {
"type": "string"
}
},
"required": [
"cancel",
"get",
"stream",
"web"
],
"x-apifox-orders": [
"cancel",
"get",
"stream",
"web"
]
}
},
"required": [
"id",
"model",
"version",
"input",
"logs",
"output",
"data_removed",
"error",
"status",
"created_at",
"urls"
],
"x-apifox-orders": [
"id",
"model",
"version",
"input",
"logs",
"output",
"data_removed",
"error",
"status",
"created_at",
"urls"
]
},
"itemSchema": {},
"description": "",
"mediaType": "",
"headers": [],
"oasExtensions": ""
}
],
"responseExamples": [
{
"name": "成功示例",
"responseId": 170729803,
"data": "{\n \"id\": \"c9zn270jk1rj00crans8m6ssjc\",\n \"model\": \"lucataco/flux-dev-lora\",\n \"version\": \"091495765fa5ef2725a175a57b276ec30dc9d39c22d30410f2ede68a3eab66b3\",\n \"input\": {\n \"aspect_ratio\": \"1:1\",\n \"guidance_scale\": 3.5,\n \"hf_lora\": \"alvdansen/frosting_lane_flux\",\n \"lora_scale\": 0.8,\n \"num_inference_steps\": 28,\n \"num_outputs\": 1,\n \"output_format\": \"webp\",\n \"output_quality\": 80,\n \"prompt\": \"a beautiful castle frstingln illustration\",\n \"prompt_strength\": 0.8\n },\n \"logs\": \"\",\n \"output\": null,\n \"data_removed\": false,\n \"error\": null,\n \"status\": \"starting\",\n \"created_at\": \"2025-07-29T09:09:55.992Z\",\n \"urls\": {\n \"cancel\": \"https://api.replicate.com/v1/predictions/c9zn270jk1rj00crans8m6ssjc/cancel\",\n \"get\": \"https://api.replicate.com/v1/predictions/c9zn270jk1rj00crans8m6ssjc\",\n \"stream\": \"https://stream.replicate.com/v1/files/qoxq-37kfnrolbp7l2vy5f2ffduf6vyqye4savtprvsiikqzpcjbuejfa\",\n \"web\": \"https://replicate.com/p/c9zn270jk1rj00crans8m6ssjc\"\n }\n}",
"description": "",
"oasKey": "",
"oasExtensions": "",
"id": "019fd25e-4bea-77ac-9aa4-3f87af5d4e74"
}
],
"codeSamples": [],
"projectId": 8662722,
"moduleId": 8310462,
"folderId": 92436086,
"ordering": 42,
"responsibleId": 0,
"commonResponseStatus": {},
"advancedSettings": {
"disabledSystemHeaders": {},
"isDefaultUrlEncoding": 1
},
"customApiFields": {},
"oasExtensions": "",
"mockScript": {},
"createdAt": "2026-08-05T14:40:23.000Z",
"updatedAt": "2026-08-06T12:15:55.000Z",
"creatorId": 2863449,
"editorId": 2863449,
"creatorUserId": 2863449,
"editorUserId": 2863449,
"responseChildren": [
"BLANK.170729803"
],
"visibility": "INHERITED",
"securityScheme": {},
"callbacks": ""
}