> ## Documentation Index
> Fetch the complete documentation index at: https://docs.randomseed.co/llms.txt
> Use this file to discover all available pages before exploring further.

# v1/animate-diffusion

> Animate an image

### API key

Create your account on [RandomSeed](https://randomseed.co/signup) & grab your [api key](https://randomseed.co/api-reference/integrate)

### Headers

<ParamField header="Authorization" type="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.
</ParamField>

### Body

<ParamField body="prompt" type="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](/documentation/animate-diffusion-loras) of all the supported loras.
</ParamField>

<ParamField body="negative_prompt" type="string" default="">
  This is the text prompt describing what you don't want to see in the video.
</ParamField>

<ParamField body="width" type="string" default="512">
  This is the width of the video
</ParamField>

<ParamField body="height" type="string" default="512">
  This is the height of the video
</ParamField>

<ParamField body="steps" type="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.
</ParamField>

<ParamField body="cfg_scale" type="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.
</ParamField>

<ParamField body="sampler_name" type="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](/documentation/sampler-methods)
</ParamField>

<ParamField body="model_name" type="string" required>
  Specify the name of the base model you'd like to use. You can find the model names [here](/api-reference/v1/models)
</ParamField>

<ParamField body="motion_model_name" type="string" required>
  Name of the motion model you'd like to use to animate. You can find the model names [here](/documentation/motion-models)
</ParamField>

<ParamField body="fps" type="integer" required>
  Frames per second. 8 is recommended. You can increase the length of the video by lowering fps.
</ParamField>

<ParamField body="format" type="string" required>
  Format of the video. Available values: `MP4`.
</ParamField>

<ParamField body="video_length" type="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.
</ParamField>

<ParamField body="webhook" type="string" required>
  This is the callback url where you want to receive your response.
</ParamField>

<ParamField body="track_id" type="string">
  You can specify any value here to track the request that's received on your webhook's end.
</ParamField>

<ParamField body="seed" type="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.
</ParamField>

### Response

<ResponseField name="message" type="string">
  animate diffusion in progress
</ResponseField>

<RequestExample>
  ```bash Example Request theme={null}
  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
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "message": "animate diffusion in progress"
  }
  ```
</ResponseExample>
