- Requirements
- Installation
- Getting Started
- Async
- Raw HTTP Response
- Reference
synclabs.animate.animate
synclabs.animate.animate_cost
synclabs.animate.get_animation
synclabs.lipsync.get_lipsync
synclabs.lipsync.lip_sync
synclabs.lipsync.lipsync_cost
synclabs.speak.get_speech
synclabs.speak.speak
synclabs.speak.speak_cost
synclabs.translate.get_translation
synclabs.translate.translate
synclabs.translate.translation_cost
synclabs.video.cost
synclabs.video.get_lip_sync_job
synclabs.video.lip_sync
synclabs.voices.voices
Python >=3.7
from pprint import pprint
from sync_labs_python_sdk import SyncLabs, ApiException
synclabs = SyncLabs(
api_key="YOUR_API_KEY",
)
try:
animate_response = synclabs.animate.animate(
video_url="string_example",
transcript="string_example",
voice_id="string_example",
model="sync-1.5.0",
max_credits=3.14,
webhook_url="string_example",
)
print(animate_response)
except ApiException as e:
print("Exception when calling AnimateApi.animate: %s\n" % e)
pprint(e.body)
pprint(e.headers)
pprint(e.status)
pprint(e.reason)
pprint(e.round_trip_time)
async
support is available by prepending a
to any method.
import asyncio
from pprint import pprint
from sync_labs_python_sdk import SyncLabs, ApiException
synclabs = SyncLabs(
api_key="YOUR_API_KEY",
)
async def main():
try:
animate_response = await synclabs.animate.aanimate(
video_url="string_example",
transcript="string_example",
voice_id="string_example",
model="sync-1.5.0",
max_credits=3.14,
webhook_url="string_example",
)
print(animate_response)
except ApiException as e:
print("Exception when calling AnimateApi.animate: %s\n" % e)
pprint(e.body)
pprint(e.headers)
pprint(e.status)
pprint(e.reason)
pprint(e.round_trip_time)
asyncio.run(main())
To access raw HTTP response values, use the .raw
namespace.
from pprint import pprint
from sync_labs_python_sdk import SyncLabs, ApiException
synclabs = SyncLabs(
api_key="YOUR_API_KEY",
)
try:
animate_response = synclabs.animate.raw.animate(
video_url="string_example",
transcript="string_example",
voice_id="string_example",
model="sync-1.5.0",
max_credits=3.14,
webhook_url="string_example",
)
pprint(animate_response.body)
pprint(animate_response.body["id"])
pprint(animate_response.body["transcript_url"])
pprint(animate_response.body["status"])
pprint(animate_response.body["video_url"])
pprint(animate_response.body["audio_url"])
pprint(animate_response.headers)
pprint(animate_response.status)
pprint(animate_response.round_trip_time)
except ApiException as e:
print("Exception when calling AnimateApi.animate: %s\n" % e)
pprint(e.body)
pprint(e.headers)
pprint(e.status)
pprint(e.reason)
pprint(e.round_trip_time)
Generates audio given inputted text and voice and synchronizes with the given video.
animate_response = synclabs.animate.animate(
video_url="string_example",
transcript="string_example",
voice_id="string_example",
model="sync-1.5.0",
max_credits=3.14,
webhook_url="string_example",
)
A url to the video file to be synchronized -- must be publicly accessible
A string of text to be spoken by the AI
The voice to use for audio generation
The model to use for video generation
Maximum number of credits to use for audio generation. If job exceeds this value, the job will be aborted
A url to send a notification to upon completion of audio generation
AnimateDto
Required data for animating video. Includes video URL, transcript, voice, and optional parameters for webhook integration and credit limits.
/animate
post
synclabs.animate.animate_cost(
transcript="string_example",
transcript_url="string_example",
)
A string of text to be spoken by the AI
A url pointing to a file of text to be spoken by the AI
/animate/cost
get
Use the ID from the POST request to check status. Keep checking until status is 'completed' and a download URL is provided.
get_animation_response = synclabs.animate.get_animation(
id="id_example",
)
/animate/{id}
get
Use the video ID from the POST request to check video status. Keep checking until status is 'completed' and a download URL is provided.
get_lipsync_response = synclabs.lipsync.get_lipsync(
id="id_example",
)
/lipsync/{id}
get
Submit a set of urls to publically hosted audio and video files or to YouTube videos. Our synchronizer will sync the video's lip movements to match the audio and return the synced video.
lip_sync_response = synclabs.lipsync.lip_sync(
audio_url="string_example",
video_url="string_example",
synergize=True,
max_credits=3.14,
webhook_url="string_example",
model="sync-1.5.0",
)
A url to the audio file to be synchronized -- must be publicly accessible
A url to the video file to be synchronized -- must be publicly accessible
A flag to enable / disable post-processing
Maximum number of credits to use for video generation. If job exceeds this value, the job will be aborted
A url to send a notification to upon completion of video generation
The model to use for video generation
LipsyncDto
The audio + video data to be synced. Set synergize = false to skip our synergizer post-processor for a 10x speedup, but w/ a degredation in output quality.
/lipsync
post
synclabs.lipsync.lipsync_cost(
audio_url="audioUrl_example",
video_url="videoUrl_example",
)
A url to the audio file to be synchronized -- must be publicly accessible
A url to the video file to be synchronized -- must be publicly accessible
/lipsync/cost
get
Use the video ID from the POST request to check video status. Keep checking until status is 'completed' and a download URL is provided.
get_speech_response = synclabs.speak.get_speech(
id="id_example",
)
/speak/{id}
get
speak_response = synclabs.speak.speak(
transcript="string_example",
voice_id="string_example",
max_credits=3.14,
webhook_url="string_example",
)
A string of text to be spoken by the AI
The voice to use for audio generation
Maximum number of credits to use for audio generation. If job exceeds this value, the job will be aborted
A url to send a notification to upon completion of audio generation
/speak
post
synclabs.speak.speak_cost(
transcript="string_example",
transcript_url="string_example",
)
A string of text to be spoken by the AI
A url pointing to a file of text to be spoken by the AI
/speak/cost
get
Use the video ID from the POST request to check video status. Keep checking until status is 'completed' and a download URL is provided.
get_translation_response = synclabs.translate.get_translation(
id="id_example",
)
/translate/{id}
get
Translates and synchronizes the given video to the specified target language.
translate_response = synclabs.translate.translate(
video_url="string_example",
target_language="string_example",
max_credits=3.14,
webhook_url="string_example",
model="sync-1.5.0",
)
A url to the video file to be translated and synchronized -- must be publicly accessible
Target language to translate the video to
Maximum number of credits to use for video generation. If job exceeds this value, the job will be aborted
A url to send a notification to upon completion of video generation
The model to use for video generation.
TranslateDto
Required data for translating and synchronizing video. Includes video URL, target language, and optional parameters for model selection, webhook integration, and credit limits.
/translate
post
synclabs.translate.translation_cost(
video_url="videoUrl_example",
)
A url to the video file to be synchronized -- must be publicly accessible
/translate/cost
get
synclabs.video.cost(
audio_url="audioUrl_example",
video_url="videoUrl_example",
)
A url to the audio file to be synchronized -- must be publicly accessible
A url to the video file to be synchronized -- must be publicly accessible
/video/cost
get
[Deprecated] Use the video ID from the POST request to check video status. Keep checking until status is 'completed' and a download URL is provided.
get_lip_sync_job_response = synclabs.video.get_lip_sync_job(
id="id_example",
)
/video/{id}
get
[Deprecated] Submit a set of urls to publically hosted audio and video files or to YouTube videos. Our synchronizer will sync the video's lip movements to match the audio and return the synced video.
lip_sync_response = synclabs.video.lip_sync(
audio_url="string_example",
video_url="string_example",
synergize=True,
max_credits=3.14,
webhook_url="string_example",
model="sync-1.5.0",
)
A url to the audio file to be synchronized -- must be publicly accessible
A url to the video file to be synchronized -- must be publicly accessible
A flag to enable / disable post-processing
Maximum number of credits to use for video generation. If job exceeds this value, the job will be aborted
A url to send a notification to upon completion of video generation
The model to use for video generation
CreateVideoDto
The audio + video data to be synced. Set synergize = false to skip our synergizer post-processor for a 10x speedup, but w/ a degredation in output quality.
/video
post
Get all voices
synclabs.voices.voices()
/voices
get
This Python package is automatically generated by Konfig