Lemon Slice Logo

API Dashboard

Please log in to view your API dashboard.

API Documentation

Generate video

Generate a video from a single image and audio file (or text input). Image and audio files must be provided via a publicly accessible URL. Maximum video length is 1 hour.

Code Samples

curl --request POST \
  --url https://lemonslice.com/api/v2/generate \
  --header 'accept: application/json' \
  --header 'authorization: Bearer YOUR_API_TOKEN' \
  --header 'content-type: application/json' \
  --data '
{
  "img_url": "https://6ammc3n5zzf5ljnz.public.blob.vercel-storage.com/inf2-defaults/cool_man-AZGi3AIjUGN47rGxA8xdHMBGr1Qqha.png",
  "audio_url": "https://6ammc3n5zzf5ljnz.public.blob.vercel-storage.com/cool_man-eUP4h3ET8OHCP2ScZvei5CVnQUx2Mi.mp3"
}
'

Parameters

NameTypeRequiredDescription
img_urlstringYesA publicly accessible URL to the input image file.
audio_urlstringNoA publicly accessible URL to the input audio file. If not provided, user must provide both voice_id AND text.
voice_idstringNoUnique identifier to select the desired voice. Refer to table below for available options.
textstringNoThe desired transcript for the character to speak.
modelstringNoThe desired model to use. Available options: 'V2', 'V2.5'. Defaults to 'V2.5'.
resolutionstringNoThe desired resolution of the output video. Available options: '320', '512', or '640' for V2; '256' or '512' for V2.5. Defaults to '512'.
crop_headbooleanNoIf true, the video will be cropped to focus on the head region. Defaults to False.
whole_body_modebooleanNo[V2.5 model only] If true, the model will only inpaint the face. This is the same as using 'Animate face only' in Studio. Defaults to False. This parameter will eventually be deprecated ('animation_style' should be used instead). If True, overrides 'animation_style' and 'crop_head'.
animation_stylestringNo[V2.5 model only] Controls inpainting behavior. Available options: 'autoselect', 'face_only', 'entire_image'. Defaults to 'autoselect'. 'face_only' will only animate the face (recommended only for zoomed-out images). 'entire_image' will animate the entire image (recommended only for close-ups of the face). 'autoselect' will switch between the two modes based on what works best for the input image.
expressivenessfloatNoFloat ranging from 0 to 1 (inclusive). Higher values result in more emotion / movement. Default value of 1.

Available Voices for Text-to-Speech

Voice NameDescriptionVoice IDPreview

Get generation with Job ID

Retrieve the status and video URL for a submitted generate job.

Code Samples

curl --request GET \
  --url https://lemonslice.com/api/v2/generations/be32c40e-4fb5-4c62-8ba1-bce223e6bf42 \
  --header 'authorization: Bearer YOUR_API_TOKEN'

List all video generations

Returns no more than 50 generations per request. Use limit and offset query parameters to paginate over results.

Code Samples

curl --request GET \
  --url https://lemonslice.com/api/v2/generations?limit=10&offset=10 \
  --header 'authorization: Bearer YOUR_API_TOKEN'