官方文档:https://replicate.com/andreasjansson/stable-diffusion-animation
POST
/replicate/v1/predictions创建任务 andreasjansson/stable-diffusion-animation
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": "andreasjansson/stable-diffusion-animation:ca1f5e306e5721e19c473e0d094e6603f0456fe759c10715fcd6c1b79242d4a5",
"input": {
"width": 512,
"height": 512,
"prompt_end": "tall rectangular black monolith, a white room in the future with a bed, victorian details and a tall black monolith, a detailed matte painting by Wes Anderson, behance, light and space, reimagined by industrial light and magic, matte painting, criterion collection",
"prompt_start": "tall rectangular black monolith, monkeys in the desert looking at a large tall monolith, a detailed matte painting by Wes Anderson, behance, light and space, reimagined by industrial light and magic, matte painting, criterion collection",
"gif_ping_pong": true,
"output_format": "mp4",
"guidance_scale": 7.5,
"prompt_strength": 0.9,
"film_interpolation": true,
"intermediate_output": false,
"num_inference_steps": 50,
"num_animation_frames": 25,
"gif_frames_per_second": 20,
"num_interpolation_steps": 5
}
}'请求参数
| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
Authorization | Header | string | 否 | - | Bearer {{YOUR_API_KEY}} |
version | JSON body | string | 否 | - | - |
input | JSON body | object | 否 | - | - |
input.width | JSON body | integer | 否 | 输出图像的宽度。默认值:512。 | - |
input.height | JSON body | integer | 否 | 输出图像的高度。默认值:512。 | - |
input.prompt_end | JSON body | string | 是 | 动画结束时的提示。您可以使用 |(竖线符号)分隔多个提示,从而包含多个提示。 | - |
input.prompt_start | JSON body | string | 是 | 动画开始的提示。 | - |
input.gif_ping_pong | JSON body | boolean | 否 | 是否反转动画并回到循环前的开头。默认值:false | - |
input.output_format | JSON body | string | 否 | 输出文件格式。默认值:“gif”。 | - |
input.guidance_scale | JSON body | number | 否 | 引导强度。默认值:7.5。最小值:1,最大值:20。 | - |
input.prompt_strength | JSON body | number | 否 | 较低的提示强度会生成更连贯的 gif,较高的提示强度会生成更多但可能会跳跃。默认值:0.8。 | - |
input.film_interpolation | JSON body | boolean | 否 | 是否使用 FILM 进行帧间插值(film-net.github.io)默认值:true | - |
input.intermediate_output | JSON body | boolean | 否 | 是否显示生成过程中的中间输出。默认值:false | - |
input.num_inference_steps | JSON body | integer | 否 | 去噪步骤数。默认值:50。最小值:1,最大值:500。 | - |
input.num_animation_frames | JSON body | integer | 否 | 动画帧数。默认值:10。最小值:2,最大值:50。 | - |
input.gif_frames_per_second | JSON body | integer | 否 | 输出 GIF 的帧/秒。默认值:20。最小值:1,最大值:50。 | - |
input.num_interpolation_steps | JSON body | integer | 否 | 动画帧之间插入的步数。默认值:5。最小值: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": "8qnr2j4kynrj00crapbtfewwdg",
"model": "andreasjansson/stable-diffusion-animation",
"version": "ca1f5e306e5721e19c473e0d094e6603f0456fe759c10715fcd6c1b79242d4a5",
"input": {
"film_interpolation": true,
"gif_frames_per_second": 20,
"gif_ping_pong": true,
"guidance_scale": 7.5,
"height": 512,
"intermediate_output": false,
"num_animation_frames": 25,
"num_inference_steps": 50,
"num_interpolation_steps": 5,
"output_format": "mp4",
"prompt_end": "tall rectangular black monolith, a white room in the future with a bed, victorian details and a tall black monolith, a detailed matte painting by Wes Anderson, behance, light and space, reimagined by industrial light and magic, matte painting, criterion collection",
"prompt_start": "tall rectangular black monolith, monkeys in the desert looking at a large tall monolith, a detailed matte painting by Wes Anderson, behance, light and space, reimagined by industrial light and magic, matte painting, criterion collection",
"prompt_strength": 0.9,
"width": 512
},
"logs": "",
"output": null,
"data_removed": false,
"error": null,
"status": "starting",
"created_at": "2025-07-29T09:50:53.941Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/8qnr2j4kynrj00crapbtfewwdg/cancel",
"get": "https://api.replicate.com/v1/predictions/8qnr2j4kynrj00crapbtfewwdg",
"stream": "https://stream.replicate.com/v1/files/qoxq-lpghpenswbt2fqhz7xaggbmesoqxvt4h3ralq47fkfdcsgf2jmuq",
"web": "https://replicate.com/p/8qnr2j4kynrj00crapbtfewwdg"
}
}来源原始接口定义(用于追溯)
以下内容来自 Apifox 快照,可能包含兼容层字段或旧示例;公开调用请以本页的协议说明和当前模型列表为准。
{
"id": 497673400,
"name": "创建任务 andreasjansson/stable-diffusion-animation",
"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": "KyBWx3xsZrcbhPIgtBzUWsVUvmtmF5IO"
}
],
"inheritPreProcessors": {},
"inheritPostProcessors": {},
"description": "官方文档:https://replicate.com/andreasjansson/stable-diffusion-animation",
"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": "输出图像的宽度。默认值:512。"
},
"height": {
"type": "integer",
"description": "输出图像的高度。默认值:512。"
},
"prompt_end": {
"type": "string",
"description": "动画结束时的提示。您可以使用 |(竖线符号)分隔多个提示,从而包含多个提示。"
},
"prompt_start": {
"type": "string",
"description": "动画开始的提示。"
},
"gif_ping_pong": {
"type": "boolean",
"description": "是否反转动画并回到循环前的开头。默认值:false"
},
"output_format": {
"type": "string",
"description": "输出文件格式。默认值:“gif”。"
},
"guidance_scale": {
"type": "number",
"description": "引导强度。默认值:7.5。最小值:1,最大值:20。"
},
"prompt_strength": {
"type": "number",
"description": "较低的提示强度会生成更连贯的 gif,较高的提示强度会生成更多但可能会跳跃。默认值:0.8。"
},
"film_interpolation": {
"type": "boolean",
"description": "是否使用 FILM 进行帧间插值(film-net.github.io)默认值:true"
},
"intermediate_output": {
"type": "boolean",
"description": "是否显示生成过程中的中间输出。默认值:false"
},
"num_inference_steps": {
"type": "integer",
"description": "去噪步骤数。默认值:50。最小值:1,最大值:500。"
},
"num_animation_frames": {
"type": "integer",
"description": "动画帧数。默认值:10。最小值:2,最大值:50。"
},
"gif_frames_per_second": {
"type": "integer",
"description": "输出 GIF 的帧/秒。默认值:20。最小值:1,最大值:50。"
},
"num_interpolation_steps": {
"type": "integer",
"description": "动画帧之间插入的步数。默认值:5。最小值:1,最大值:50。"
}
},
"required": [
"prompt_end",
"prompt_start"
],
"x-apifox-orders": [
"width",
"height",
"prompt_end",
"prompt_start",
"gif_ping_pong",
"output_format",
"guidance_scale",
"prompt_strength",
"film_interpolation",
"intermediate_output",
"num_inference_steps",
"num_animation_frames",
"gif_frames_per_second",
"num_interpolation_steps"
]
}
},
"x-apifox-orders": [
"version",
"input"
]
},
"examples": [
{
"value": "{\n \"version\": \"andreasjansson/stable-diffusion-animation:ca1f5e306e5721e19c473e0d094e6603f0456fe759c10715fcd6c1b79242d4a5\",\n \"input\": {\n \"width\": 512,\n \"height\": 512,\n \"prompt_end\": \"tall rectangular black monolith, a white room in the future with a bed, victorian details and a tall black monolith, a detailed matte painting by Wes Anderson, behance, light and space, reimagined by industrial light and magic, matte painting, criterion collection\",\n \"prompt_start\": \"tall rectangular black monolith, monkeys in the desert looking at a large tall monolith, a detailed matte painting by Wes Anderson, behance, light and space, reimagined by industrial light and magic, matte painting, criterion collection\",\n \"gif_ping_pong\": true,\n \"output_format\": \"mp4\",\n \"guidance_scale\": 7.5,\n \"prompt_strength\": 0.9,\n \"film_interpolation\": true,\n \"intermediate_output\": false,\n \"num_inference_steps\": 50,\n \"num_animation_frames\": 25,\n \"gif_frames_per_second\": 20,\n \"num_interpolation_steps\": 5\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": 181956644,
"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": 181956644,
"data": "{\n \"id\": \"8qnr2j4kynrj00crapbtfewwdg\",\n \"model\": \"andreasjansson/stable-diffusion-animation\",\n \"version\": \"ca1f5e306e5721e19c473e0d094e6603f0456fe759c10715fcd6c1b79242d4a5\",\n \"input\": {\n \"film_interpolation\": true,\n \"gif_frames_per_second\": 20,\n \"gif_ping_pong\": true,\n \"guidance_scale\": 7.5,\n \"height\": 512,\n \"intermediate_output\": false,\n \"num_animation_frames\": 25,\n \"num_inference_steps\": 50,\n \"num_interpolation_steps\": 5,\n \"output_format\": \"mp4\",\n \"prompt_end\": \"tall rectangular black monolith, a white room in the future with a bed, victorian details and a tall black monolith, a detailed matte painting by Wes Anderson, behance, light and space, reimagined by industrial light and magic, matte painting, criterion collection\",\n \"prompt_start\": \"tall rectangular black monolith, monkeys in the desert looking at a large tall monolith, a detailed matte painting by Wes Anderson, behance, light and space, reimagined by industrial light and magic, matte painting, criterion collection\",\n \"prompt_strength\": 0.9,\n \"width\": 512\n },\n \"logs\": \"\",\n \"output\": null,\n \"data_removed\": false,\n \"error\": null,\n \"status\": \"starting\",\n \"created_at\": \"2025-07-29T09:50:53.941Z\",\n \"urls\": {\n \"cancel\": \"https://api.replicate.com/v1/predictions/8qnr2j4kynrj00crapbtfewwdg/cancel\",\n \"get\": \"https://api.replicate.com/v1/predictions/8qnr2j4kynrj00crapbtfewwdg\",\n \"stream\": \"https://stream.replicate.com/v1/files/qoxq-lpghpenswbt2fqhz7xaggbmesoqxvt4h3ralq47fkfdcsgf2jmuq\",\n \"web\": \"https://replicate.com/p/8qnr2j4kynrj00crapbtfewwdg\"\n }\n}",
"description": "",
"oasKey": "",
"oasExtensions": "",
"id": "019fd25e-4bea-77ac-9aa4-42c48427b4e7"
}
],
"codeSamples": [],
"projectId": 8662722,
"moduleId": 8310462,
"folderId": 92436086,
"ordering": 48,
"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.181956644"
],
"visibility": "INHERITED",
"securityScheme": {},
"callbacks": ""
}