众扬汇 AI 开放平台 API 文档

创建任务-lucataco/animate-diff

OpenAPI Specification

通过 Replicate 兼容路径提交 lucataco/animate-diff 任务,返回任务 ID 与状态;结果查询请使用对应的查询接口。为个性化的文生图扩散模型制作动画。

请求方式:POST

接口地址

text
https://api.allyang.cn/replicate/v1/predictions

请求头

  • Content-Type(必填):请求体类型,按本页标注填写。(示例:application/json)
  • Authorization(可选):鉴权头,使用控制台创建的令牌,格式为 Bearer + 令牌。(示例:Bearer {{YOUR_API_KEY}})

请求参数(application/json)

  • version(string,必填)
  • input(object,必填)
    • seed(integer,必填)
    • image(string,必填)
    • steps(integer,必填)
    • prompt(string,必填)
    • cfg_scale(integer,必填)
    • scheduler(string,必填)
    • sampler_name(string,必填)
    • negative_prompt(string,必填)
    • denoising_strength(number,必填)
    • outpaint_direction(string,必填)
    • overlay_original_img(boolean,必填)

请求示例

json
{
  "version": "beecf59c4aee8d81bf04f0381033dfa10dc16e845b4ae00d281e2fa377e48a9f",
  "input": {
    "path": "toonyou_beta3.safetensors",
    "seed": 255224557,
    "steps": 25,
    "prompt": "masterpiece, best quality, 1girl, solo, cherry blossoms, hanami, pink flower, white flower, spring season, wisteria, petals, flower, plum blossoms, outdoors, falling petals, white hair, black eyes",
    "n_prompt": "badhandv4, easynegative, ng_deepnegative_v1_75t, verybadimagenegative_v1.3, bad-artist, bad_prompt_version2-neg, teeth",
    "motion_module": "mm_sd_v14",
    "guidance_scale": 7.5
  }
}

返回:HTTP 200 表示成功,响应体字段待补(以实测为准)。

使用提示:需要先明确模型版本或模型路径;任务完成后的产物地址存在有效期,建议及时转存。