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
Name | Type | Required | Description |
---|---|---|---|
img_url | string | Yes | A publicly accessible URL to the input image file. |
audio_url | string | No | A publicly accessible URL to the input audio file. If not provided, user must provide both voice_id AND text. |
voice_id | string | No | Unique identifier to select the desired voice. Refer to table below for available options. |
text | string | No | The desired transcript for the character to speak. |
model | string | No | The desired model to use. Available options: 'V2', 'V2.5'. Defaults to 'V2.5'. |
resolution | string | No | The desired resolution of the output video. Available options: '320', '512', or '640' for V2; '256' or '512' for V2.5. Defaults to '512'. |
crop_head | boolean | No | If true, the video will be cropped to focus on the head region. Defaults to False. |
whole_body_mode | boolean | No | [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_style | string | No | [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. |
expressiveness | float | No | Float ranging from 0 to 1 (inclusive). Higher values result in more emotion / movement. Default value of 1. |
Available Voices for Text-to-Speech
Voice Name | Description | Voice ID | Preview |
---|
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'