创建任务 riffusion/riffusion
POST /replicate/v1/models/riffusion/riffusion/predictions
说明
概览
| Method | POST |
|---|---|
| Path | /replicate/v1/models/riffusion/riffusion/predictions |
| Type | http |
| Status | 1 |
| Module | 2102810 |
| Folder | 62419371 |
参数
{ "query": [], "path": [], "cookie": [], "header": [ { "required": false, "description": "", "type": "string", "id": "GTujCrB2It", "enable": true, "name": "Authorization", "sampleValue": "Bearer {{YOUR_API_KEY}}" } ] }
请求体
{ "type": "application/json", "parameters": [], "jsonSchema": { "type": "object", "properties": { "input": { "type": "object", "properties": { "alpha": { "type": "number", "description": "如果使用两个提示,则插值 alpha。值为 0 表示完全使用 prompt_a,值为 1 表示完全使用 prompt_b。默认值:0.5。最小值:0,最大值:1。" }, "prompt_a": { "type": "string", "description": "音频提示。" }, "prompt_b": { "type": "string", "description": "第二个提示与第一个提示进行插值,如果不进行插值则留空。" }, "denoising": { "type": "number", "description": "对输入频谱图进行多少转换。默认值:0.75。最小值:0,最大值:1。" }, "seed_image_id": { "type": "string" }, "num_inference_steps": { "type": "integer", "description": "运行扩散模型的步数。默认值:50。最低:1。" } }, "x-apifox-orders": [ "alpha", "prompt_a", "prompt_b", "denoising", "seed_image_id", "num_inference_steps" ] }, "version": { "type": "string" } }, "x-apifox-orders": [ "version", "input" ] }, "mediaType": "", "examples": [ { "value": "{\n \"version\": \"8cf61ea6c56afd61d8f5b9ffd14d7c216c0a93844ce2d82ac1c9ecc9c7f24e05\",\n \"input\": {\n \"alpha\": 0.5,\n \"prompt_a\": \"funky synth solo\",\n \"prompt_b\": \"90's rap\",\n \"denoising\": 0.75,\n \"seed_image_id\": \"vibes\",\n \"num_inference_steps\": 50\n }\n }", "mediaType": "application/json", "description": "" } ], "oasExtensions": "" }
响应
[ { "id": 729621331, "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" ] }, "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" ] } }, "required": [ "id", "model", "version", "input", "logs", "output", "data_removed", "error", "status", "created_at", "urls" ] }, "itemSchema": {}, "description": "", "mediaType": "", "headers": [], "oasExtensions": "" } ]
响应示例
[ { "name": "Create image", "responseId": 729621331, "data": "{\n \"created\": 1589478378,\n \"data\": [\n {\n \"url\": \"https://...\"\n },\n {\n \"url\": \"https://...\"\n }\n ]\n}", "description": "", "oasKey": "", "oasExtensions": "", "id": 649163831 }, { "name": "成功示例", "responseId": 729621331, "data": "{\n \"id\": \"w44zs9cet5rmc0cqzp49gpkhf8\",\n \"model\": \"black-forest-labs/flux-kontext-dev\",\n \"version\": \"hidden\",\n \"input\": {\n \"aspect_ratio\": \"match_input_image\",\n \"input_image\": \"https://replicate.delivery/xezq/XfwWjHJ7HfrmXE6ukuLVEpXWfeQ3PQeRI5mApuLXRxST7XMmC/tmpc91tlq20.png\",\n \"output_format\": \"jpg\",\n \"prompt\": \"Make the letters 3D, floating in space on a city street\",\n \"prompt_upsampling\": false,\n \"safety_tolerance\": 2\n },\n \"logs\": \"\",\n \"output\": null,\n \"data_removed\": false,\n \"error\": null,\n \"status\": \"starting\",\n \"created_at\": \"2025-07-12T07:27:54.577Z\",\n \"urls\": {\n \"cancel\": \"https://api.replicate.com/v1/predictions/w44zs9cet5rmc0cqzp49gpkhf8/cancel\",\n \"get\": \"https://api.replicate.com/v1/predictions/w44zs9cet5rmc0cqzp49gpkhf8\",\n \"stream\": \"https://stream.replicate.com/v1/files/bcwr-h7bu76ujftxzwih5u35puoysogps56mqvpvjz4nrxskhfe7ks42a\",\n \"web\": \"https://replicate.com/p/w44zs9cet5rmc0cqzp49gpkhf8\"\n }\n}", "description": "", "oasKey": "", "oasExtensions": "", "id": 649177482 } ]