curl --location "https://randomseed.lol/v1/animate-diffusion" \
  --header "Content-Type: application/json" \
  --header "Authorization: Bearer $RANDOMSEED_API_KEY" \
  --data '{
    "animate_diffusion": {
      "prompt": "cute dog",
      "negative_prompt": "ugly, out of frame",
      "steps": "20",
      "model_name": "realistic_vision_v5.1",
      "sampler_name": "Euler a",
      "webhook": "...", //replace with your own
      "track_id": 1,
      "motion_model_name": "mm_sd_v15_v2.ckpt",
      "fps": 8,
      "format": "MP4",
      "video_length": 16
    }
  }'
{
  "message": "animate diffusion in progress"
}

API key

Create your account on RandomSeed & grab your api key

Headers

Authorization
string

Your API key. This is required by most endpoints to access our API programatically. You can get your api key by clicking on ‘API reference’ tab under your profile icon.

Body

prompt
string
required

This is the text prompt to specify the things you want to see in a generated video. You can use loras to control the camera’s direction. You can activate it by adding <lora:LORA_NAME:weight> at the front of your prompt. Here’s a list of all the supported loras.

negative_prompt
string
default:""

This is the text prompt describing what you don’t want to see in the video.

width
string
default:"512"

This is the width of the video

height
string
default:"512"

This is the height of the video

steps
string
default:"50"

This is the number of the denoising steps used by the AI model when generating a video from the text prompt. A higher number results in a longer generation time, and does not necessarily guarantee higher video quality.

cfg_scale
float
default:"7.0"

This is the number of the number you specify to control how closely AI model should follow the text prompt. 7 or 7.5 usually works best. You can increase the value if the generated video doesn’t match your prompt. Increment it by 0.5.

sampler_name
string
required

This is the name of the sampler method you will be using to generate a video. Video output varies slightly depending on the method. You can pick one of the following methods

model_name
string
required

Specify the name of the base model you’d like to use. You can find the model names here

motion_model_name
string
required

Name of the motion model you’d like to use to animate. You can find the model names here

fps
integer
required

Frames per second. 8 is recommended. You can increase the length of the video by lowering fps.

format
string
required

Format of the video. Available values: MP4.

video_length
integer
required

Length of the video. 0-24 for mm_sd_v14.ckpt, mm_sd_v15.ckpt and 0-32 for mm_sd_v15_v2.ckpt. Total length of the video will be determined by video_length / fps.

webhook
string
required

This is the callback url where you want to receive your response.

track_id
string

You can specify any value here to track the request that’s received on your webhook’s end.

seed
string
default:"-1"

This is the value that determines the output of a random number generator. You can get ALMOST the same image if you provide the same parameters and the seed.

Response

message
string

animate diffusion in progress

curl --location "https://randomseed.lol/v1/animate-diffusion" \
  --header "Content-Type: application/json" \
  --header "Authorization: Bearer $RANDOMSEED_API_KEY" \
  --data '{
    "animate_diffusion": {
      "prompt": "cute dog",
      "negative_prompt": "ugly, out of frame",
      "steps": "20",
      "model_name": "realistic_vision_v5.1",
      "sampler_name": "Euler a",
      "webhook": "...", //replace with your own
      "track_id": 1,
      "motion_model_name": "mm_sd_v15_v2.ckpt",
      "fps": 8,
      "format": "MP4",
      "video_length": 16
    }
  }'
{
  "message": "animate diffusion in progress"
}