官方文档: https://replicate.com/lucataco/flux-schnell-lora
POST
/replicate/v1/predictions创建任务 lucataco/flux-schnell-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-schnell-lora:2a6b576af31790b470f0a8442e1e9791213fa13799cbb65a9fc1436e96389574",
"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",
"output_quality": 80,
"prompt_strength": 0.8,
"num_inference_steps": 4
}
}'请求参数
| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
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 | 否 | Huggingface 路径,或 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.output_quality | JSON body | integer | 否 | 保存输出图像时的质量,范围为 0 至 100。100 为最佳质量,0 为最低质量。与 .png 输出无关。默认值:80 | - |
input.prompt_strength | JSON body | number | 否 | 使用图像对图像时的提示强度(或去噪强度)。1.0 对应于完全破坏图像中的信息。默认值:0.8。最小值:0,最大值:1。 | - |
input.num_inference_steps | JSON body | integer | 否 | 推理步骤数。默认值:4。最小值:1,最大值:12。 | - |
返回响应 (200)
| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
created | 响应 JSON | integer | 是 | - | - |
data | 响应 JSON | array<object> | 是 | - | - |
data[].url | 响应 JSON | string | 是 | - | - |
响应示例
{
"id": "nfg4nbtgm9rj00crankr6ft6t0",
"model": "lucataco/flux-schnell-lora",
"version": "2a6b576af31790b470f0a8442e1e9791213fa13799cbb65a9fc1436e96389574",
"input": {
"aspect_ratio": "1:1",
"hf_lora": "alvdansen/frosting_lane_flux",
"lora_scale": 0.8,
"num_inference_steps": 4,
"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-29T08:58:10.978Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/nfg4nbtgm9rj00crankr6ft6t0/cancel",
"get": "https://api.replicate.com/v1/predictions/nfg4nbtgm9rj00crankr6ft6t0",
"stream": "https://stream.replicate.com/v1/files/qoxq-kwulj767tbexpyags2qj6zh6f5k6dmbvfdt6cigg2f4zcuzpnhcq",
"web": "https://replicate.com/p/nfg4nbtgm9rj00crankr6ft6t0"
}
}来源原始接口定义(用于追溯)
以下内容来自 Apifox 快照,可能包含兼容层字段或旧示例;公开调用请以本页的协议说明和当前模型列表为准。
{
"id": 497673398,
"name": "创建任务 lucataco/flux-schnell-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": "y13TjarrJvTTe1NvnXzAhYyw46CSdFhD"
}
],
"inheritPreProcessors": {},
"inheritPostProcessors": {},
"description": "官方文档: https://replicate.com/lucataco/flux-schnell-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": "Huggingface 路径,或 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”。"
},
"output_quality": {
"type": "integer",
"description": "保存输出图像时的质量,范围为 0 至 100。100 为最佳质量,0 为最低质量。与 .png 输出无关。默认值:80"
},
"prompt_strength": {
"type": "number",
"description": "使用图像对图像时的提示强度(或去噪强度)。1.0 对应于完全破坏图像中的信息。默认值:0.8。最小值:0,最大值:1。"
},
"num_inference_steps": {
"type": "integer",
"description": "推理步骤数。默认值:4。最小值:1,最大值:12。"
}
},
"required": [
"prompt"
],
"x-apifox-orders": [
"prompt",
"hf_lora",
"lora_scale",
"num_outputs",
"aspect_ratio",
"output_format",
"output_quality",
"prompt_strength",
"num_inference_steps"
]
}
},
"x-apifox-orders": [
"version",
"input"
]
},
"examples": [
{
"value": "{\n \"version\": \"lucataco/flux-schnell-lora:2a6b576af31790b470f0a8442e1e9791213fa13799cbb65a9fc1436e96389574\",\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 \"output_quality\": 80,\n \"prompt_strength\": 0.8,\n \"num_inference_steps\": 4\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": 180091241,
"name": "成功",
"code": 200,
"contentType": "json",
"jsonSchema": {
"type": "object",
"properties": {
"created": {
"type": "integer"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string"
}
},
"required": [
"url"
],
"x-apifox-orders": [
"url"
]
}
}
},
"required": [
"created",
"data"
],
"x-apifox-orders": [
"created",
"data"
]
},
"itemSchema": {},
"description": "",
"mediaType": "",
"headers": [],
"oasExtensions": ""
}
],
"responseExamples": [
{
"name": "成功示例",
"responseId": 180091241,
"data": "{\n \"id\": \"nfg4nbtgm9rj00crankr6ft6t0\",\n \"model\": \"lucataco/flux-schnell-lora\",\n \"version\": \"2a6b576af31790b470f0a8442e1e9791213fa13799cbb65a9fc1436e96389574\",\n \"input\": {\n \"aspect_ratio\": \"1:1\",\n \"hf_lora\": \"alvdansen/frosting_lane_flux\",\n \"lora_scale\": 0.8,\n \"num_inference_steps\": 4,\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-29T08:58:10.978Z\",\n \"urls\": {\n \"cancel\": \"https://api.replicate.com/v1/predictions/nfg4nbtgm9rj00crankr6ft6t0/cancel\",\n \"get\": \"https://api.replicate.com/v1/predictions/nfg4nbtgm9rj00crankr6ft6t0\",\n \"stream\": \"https://stream.replicate.com/v1/files/qoxq-kwulj767tbexpyags2qj6zh6f5k6dmbvfdt6cigg2f4zcuzpnhcq\",\n \"web\": \"https://replicate.com/p/nfg4nbtgm9rj00crankr6ft6t0\"\n }\n}",
"description": "",
"oasKey": "",
"oasExtensions": "",
"id": "019fd25e-4be9-7338-9c8f-8718ff7964f9"
}
],
"codeSamples": [],
"projectId": 8662722,
"moduleId": 8310462,
"folderId": 92436086,
"ordering": 36,
"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.180091241"
],
"visibility": "INHERITED",
"securityScheme": {},
"callbacks": ""
}