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://infinity.ai/api/v2/generate \
  --header 'accept: application/json' \
  --header 'authorization: Bearer YOUR_API_TOKEN' \
  --header 'content-type: application/json' \
  --data '
{
  "resolution": "320",
  "crop_head": false,
  "expressiveness": 0.5,
  "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.
resolutionstringYesThe desired resolution of the output video. Available options: '320', '512', '640'.
crop_headbooleanYesIf true, the video will be cropped to focus on the head region. Set to false to use the original aspect ratio and zoom level of your input image.
whole_body_modebooleanNoIf true, the model will only inpaint the head. Use for whole-body or zoomed-out images. Setting to True overrides 'crop_head' and 'resolution' (we use your native image resolution). Default value of False.
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 Name / DescriptionVoice IDPreview
1920s Radioman41534e16-2966-4c6b-9670-111411def906
Adam - British maleNFG5qt843uXKj4pFvR7C
African American - FemaleCBHdTdZwkV4jYoCyMV1B
African American - MalegYr8yTP0q4RkX1HnzQfX
Alex - MaleLXVY607YcjqxFS3mcult
Amelia - British femaleZF6FPAbjXT4488VcRRnw
Announcer - British manNYC9WEgkq1u4jiqBseQ9
Archer - British maleL0Dsvb3SLTyegXwtm47J
Ava - American femaleZkXXWlhJO3CtSXof2ujN
Brittney - American femalekPzsL2i3teMYv0FxEYQ6
Chinese American - FemalengiiW8FFLIdMew1cqwSB
Chinese American - MalegAMZphRyrWJnLMDnom6H
CowboyqNkzaJoHLLdpvgh5tISm
Danielle - American femaleFVQMzxJGPUBtfz1Azdoy
Demon BartholomeusL5Oo1OjjHdbIvJDQFgmN
Demon MonstervfaqCOvlrKi4Zp7C2IAm
Femme Fetale - FemaleeVItLK1UvXctxuaRV2Oq
Frederick - British malej9jfwdrw7BRfcR43Qohk
French - Femaletxtf1EDouKke753vN8SL
French - MaleIHngRooVccHyPqB4uQkG
George - British maleJBFqnCBsd6RMkjVDRZzb
German - FemaleAnvlJBAqSLDzEevYr9Ap
Grandpa - AmericanNOpBlnGInO9m6vDvFkFC
Griffinc99d36f3-5ffd-4253-803a-535c1bc9c306
Indian - FemaleBY77WcifAQZkoI7EftFd
Indian - Malesiw1N9V8LmYeEWKyWBxv
Italian - FemaleBZc8d1MPTdZkyGbE9Sin
Italian - Malet3hJ92dgZhDVtsff084B
Ivan the MightypO3rCaEbT3xVc0h3pPoG
Ivy - American femalei4CzbCVWoqvD0P1QJCUL
Julian - British male7p1Ofvcwsv7UBPoFNcpI
Little Gaming Girlcccc21e8-5bcf-4ff0-bc7f-be4e40afc544
Maribeth - American femaleJEAgwU0JZFGxl2KjC3if
Merchant50d6beb4-80ea-4802-8387-6c948fe84208
Mia - Raspy American femalerCuVrCHOUMY3OwyJBJym
Neil - British maleFMQtISLdv5RvjpHBgf60
Nigerian - FemaleA8rwEcJwudjohY1gjPfa
Old Timey Radioman236bb1fb-dc41-4a2b-84d6-d22d2a2aaae1
Old WizardJoYo65swyP8hH6fVMeTO
Overlord224126de-034c-429b-9fde-71031fba9a59
Princess8f091740-3df1-4795-8bd9-dc62d88e5131
Robotic Male185c2177-de10-4848-9c0a-ae6315ac1493
Romanian - FemalegbLy9ep70G3JW53cTzFC
Rosie - Young girlLT7npgnEogysurF7U8GR
Sam - American maleZRwrL4id6j1HPGFkeCzO
Sophia - FemaleLtPsVjX1k0Kl4StEMZPK
Sophiebf0a246a-8642-498a-9950-80c35e9276b5
Southern Accent - MalesTgjlXyTKe3nwbzzjDAZ
Tex - American malehKUnzqLzU3P9IVhYHREu
The Oracled7862948-75c3-4c7c-ae28-2959fe166f49
Toddlerbn5HJAJ1igu4dFplCXkQ
Vallerie - Old British femalemLJVsC2pwqCmmrBUAzg6
Villain - FemaleflHkNRp1BlvT73UL6gyz
Villain - MaleINDKfphIpZiLCUiXae4o
Vivian - Australian FemaleluVEyhT3CocLZaLBps8v
Whispering - Femalenbk2esDn4RRk4cVDdoiE

Get generation with Job ID

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

Code Samples

curl --request GET \
  --url https://infinity.ai/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://infinity.ai/api/v2/generations?limit=10&offset=10 \
  --header 'authorization: Bearer YOUR_API_TOKEN'