Skip to content

Create Task andreasjansson/stable-diffusion-animation

POST https://www.kkiai.com/replicate/v1/predictions

Official documentation: https://replicate.com/andreasjansson/stable-diffusion-animation

Request Parameters

Authorization

Add the Authorization parameter to the Header. Its value is the Token concatenated after Bearer.

Example: Authorization: Bearer ********************

Header Parameters

ParameterTypeRequiredDescriptionExample
AuthorizationstringOptionalBearer {{YOUR_API_KEY}}

Body Parameters (application/json)

ParameterTypeRequiredDescription
versionstringOptional
inputobjectOptional
  └ widthintegerOptionalWidth of the output image. Default: 512.
  └ heightintegerOptionalHeight of the output image. Default: 512.
  └ prompt_endstringRequiredPrompt at the end of the animation. You can use | (pipe symbol) to separate multiple prompts and include multiple prompts.
  └ prompt_startstringRequired
  └ gif_ping_pongbooleanOptionalWhether to reverse the animation and return to the beginning before looping. Default: false
  └ output_formatstringOptionalOutput file format. Default: "gif".
  └ guidance_scalenumberOptionalGuidance strength. Default: 7.5. Min: 1, Max: 20.
  └ prompt_strengthnumberOptionalLower prompt strength generates more coherent gifs, higher prompt strength generates more but may jump. Default: 0.8.
  └ film_interpolationbooleanOptionalWhether to use FILM for frame interpolation (film-net.github.io). Default: true
  └ intermediate_outputbooleanOptionalWhether to display intermediate output during generation. Default: false
  └ num_inference_stepsintegerOptionalNumber of denoising steps. Default: 50. Min: 1, Max: 500.
  └ num_animation_framesintegerOptionalNumber of animation frames. Default: 10. Min: 2, Max: 50.
  └ gif_frames_per_secondintegerOptionalFrames per second of the output GIF. Default: 20. Min: 1, Max: 50.
  └ num_interpolation_stepsintegerOptionalNumber of steps to interpolate between animation frames. Default: 5. Min: 1, Max: 50.

Request Example

json
{
    "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
    }
  }

cURL Example

bash
curl --location --request POST 'https://www.kkiai.com/replicate/v1/predictions' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "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
    }
  }'

Response

🟢 200 Success

Response Body

ParameterTypeRequiredDescription
idstringRequired
modelstringRequired
versionstringRequired
inputobjectRequired
  └ aspect_ratiostringRequired
  └ input_imagestringRequired
  └ output_formatstringRequired
  └ promptstringRequired
  └ prompt_upsamplingbooleanRequired
  └ safety_toleranceintegerRequired
logsstringRequired
outputnullRequired
data_removedbooleanRequired
errornullRequired
statusstringRequired
created_atstringRequired
urlsobjectRequired
  └ cancelstringRequired
  └ getstringRequired
  └ streamstringRequired
  └ webstringRequired

Response Example

json
{
    "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"
    }
}