version models 支持以下
"ac732df83cea7fff18b8472768c88ad041fa750ff7682a21affe81863cbe77e4": "stability-ai/stable-diffusion",
"7762fd07cf82c948538e41f63f77d685e02b063e37e496e96eefd46c929f9bdc": "stability-ai/sdxl",
"95b7223104132402a9ae91cc677285bc5eb997834bd2349fa486f53910fd68b3": "stability-ai/stable-diffusion-inpainting",
"15a3689ee13b0d2616e98820eca31d4c3abcd36672df6afce5cb6feb1d66087d": "stability-ai/stable-diffusion-img2img",
"2a6b576af31790b470f0a8442e1e9791213fa13799cbb65a9fc1436e96389574": "lucataco/flux-schnell-lora",
"091495765fa5ef2725a175a57b276ec30dc9d39c22d30410f2ede68a3eab66b3": "lucataco/flux-dev-lora",
"ca1f5e306e5721e19c473e0d094e6603f0456fe759c10715fcd6c1b79242d4a5": "andreasjansson/stable-diffusion-animation",
"beecf59c4aee8d81bf04f0381033dfa10dc16e845b4ae00d281e2fa377e48a9f": "lucataco/animate-diff",
"153b0087c2576ad30d8cbddb35275b387d1a6bf986bda5499948f843f6460faf": "sujaykhandekar/object-removal",
"fb8af171cfa1616ddcf1242c093f9c46bcada5ad4cf6f2fbe8b81b330ec5c003": "cjwbw/rembg"
models 具体参数请前往 replicate.com 查看具体模型请求参数
POST
/replicate/v1/predictions创建任务-通过模型version(predictions)
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": "stability-ai/stable-diffusion:ac732df83cea7fff18b8472768c88ad041fa750ff7682a21affe81863cbe77e4",
"input": {
"width": 768,
"height": 768,
"prompt": "an astronaut riding a horse on mars, hd, dramatic lighting",
"scheduler": "K_EULER",
"num_outputs": 1,
"guidance_scale": 7.5,
"num_inference_steps": 50
}
}'请求参数
| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
Authorization | Header | string | 否 | - | Bearer {{YOUR_API_KEY}} |
version | JSON body | string | 否 | - | - |
input | JSON body | object | 否 | - | - |
input.width | JSON body | integer | 否 | 生成图像的宽度(以像素为单位)。需要为 64 的倍数。默认值:768。 | - |
input.height | JSON body | integer | 否 | 生成图像的高度(以像素为单位)。需要为 64 的倍数。默认值:768。 | - |
input.prompt | JSON body | string | 否 | 输入提示。 | - |
input.scheduler | JSON body | string | 否 | 选择一个调度程序。默认值:“DPMSolverMultistep”。 | - |
input.num_outputs | JSON body | integer | 否 | 要生成的图像数量。默认值:1。最小值:1,最大值:4。 | - |
input.guidance_scale | JSON body | number | 是 | 无分类器引导尺度。默认值:7.5。最小值:1,最大值:20。 | - |
input.num_inference_steps | JSON body | integer | 是 | 去噪步骤数。默认值:50。最小值:1,最大值:500。 | - |
返回响应 (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 | 是 | - | - |
响应示例
{
"created": 1589478378,
"data": [
{
"url": "https://..."
},
{
"url": "https://..."
}
]
}来源原始接口定义(用于追溯)
以下内容来自 Apifox 快照,可能包含兼容层字段或旧示例;公开调用请以本页的协议说明和当前模型列表为准。
{
"id": 495899833,
"name": "创建任务-通过模型version(predictions)",
"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": "2FqsSpqafNByIGJRC8hwOyNIhwQg8e7c"
}
],
"inheritPreProcessors": {},
"inheritPostProcessors": {},
"description": "version models 支持以下\n\"ac732df83cea7fff18b8472768c88ad041fa750ff7682a21affe81863cbe77e4\": \"stability-ai/stable-diffusion\",\n\"7762fd07cf82c948538e41f63f77d685e02b063e37e496e96eefd46c929f9bdc\": \"stability-ai/sdxl\",\n\"95b7223104132402a9ae91cc677285bc5eb997834bd2349fa486f53910fd68b3\": \"stability-ai/stable-diffusion-inpainting\",\n\"15a3689ee13b0d2616e98820eca31d4c3abcd36672df6afce5cb6feb1d66087d\": \"stability-ai/stable-diffusion-img2img\",\n\"2a6b576af31790b470f0a8442e1e9791213fa13799cbb65a9fc1436e96389574\": \"lucataco/flux-schnell-lora\",\n\"091495765fa5ef2725a175a57b276ec30dc9d39c22d30410f2ede68a3eab66b3\": \"lucataco/flux-dev-lora\",\n\"ca1f5e306e5721e19c473e0d094e6603f0456fe759c10715fcd6c1b79242d4a5\": \"andreasjansson/stable-diffusion-animation\",\n\"beecf59c4aee8d81bf04f0381033dfa10dc16e845b4ae00d281e2fa377e48a9f\": \"lucataco/animate-diff\",\n\"153b0087c2576ad30d8cbddb35275b387d1a6bf986bda5499948f843f6460faf\": \"sujaykhandekar/object-removal\",\n\"fb8af171cfa1616ddcf1242c093f9c46bcada5ad4cf6f2fbe8b81b330ec5c003\": \"cjwbw/rembg\"\nmodels 具体参数请前往 replicate.com 查看具体模型请求参数",
"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": {
"width": {
"type": "integer",
"description": "生成图像的宽度(以像素为单位)。需要为 64 的倍数。默认值:768。"
},
"height": {
"type": "integer",
"description": "生成图像的高度(以像素为单位)。需要为 64 的倍数。默认值:768。"
},
"prompt": {
"type": "string",
"description": "输入提示。"
},
"scheduler": {
"type": "string",
"description": "选择一个调度程序。默认值:“DPMSolverMultistep”。"
},
"num_outputs": {
"type": "integer",
"description": "要生成的图像数量。默认值:1。最小值:1,最大值:4。"
},
"guidance_scale": {
"type": "number",
"description": "无分类器引导尺度。默认值:7.5。最小值:1,最大值:20。"
},
"num_inference_steps": {
"type": "integer",
"description": "去噪步骤数。默认值:50。最小值:1,最大值:500。"
}
},
"required": [
"guidance_scale",
"num_inference_steps"
],
"x-apifox-orders": [
"width",
"height",
"prompt",
"scheduler",
"num_outputs",
"guidance_scale",
"num_inference_steps"
]
}
},
"x-apifox-orders": [
"version",
"input"
]
},
"examples": [
{
"value": "{\n \"version\": \"stability-ai/stable-diffusion:ac732df83cea7fff18b8472768c88ad041fa750ff7682a21affe81863cbe77e4\",\n \"input\": {\n \"width\": 768,\n \"height\": 768,\n \"prompt\": \"an astronaut riding a horse on mars, hd, dramatic lighting\",\n \"scheduler\": \"K_EULER\",\n \"num_outputs\": 1,\n \"guidance_scale\": 7.5,\n \"num_inference_steps\": 50\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": 131824567,
"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": "Create image",
"responseId": 131824567,
"data": "{\n \"created\": 1589478378,\n \"data\": [\n {\n \"url\": \"https://...\"\n },\n {\n \"url\": \"https://...\"\n }\n ]\n}",
"description": "",
"oasKey": "",
"oasExtensions": "",
"id": "019fc09b-0b29-704e-b2f2-6fd9aee7d85c"
}
],
"codeSamples": [],
"projectId": 8662722,
"moduleId": 8310462,
"folderId": 92436086,
"ordering": 6,
"responsibleId": 0,
"commonResponseStatus": {},
"advancedSettings": {
"disabledSystemHeaders": {},
"isDefaultUrlEncoding": 1
},
"customApiFields": {},
"oasExtensions": "",
"mockScript": {},
"createdAt": "2026-08-02T03:53:34.000Z",
"updatedAt": "2026-08-06T12:15:55.000Z",
"creatorId": 2863449,
"editorId": 2863449,
"creatorUserId": 2863449,
"editorUserId": 2863449,
"responseChildren": [
"BLANK.131824567"
],
"visibility": "INHERITED",
"securityScheme": {},
"callbacks": ""
}