First commit

This commit is contained in:
Dita Aji Pratama 2025-02-13 22:47:01 +07:00
commit 9f44a7cfa4

14
synthesai.py Normal file
View File

@ -0,0 +1,14 @@
import requests
def generate(auth, payload):
url = "https://api.synthesia.io/v2/videos"
headers = { "Authorization" : auth, "accept" : "application/json", "content-type" : "application/json" }
response = requests.post(url, json=payload, headers=headers)
return response
def retrieve(auth, video_id):
url = f"https://api.synthesia.io/v2/videos/{video_id}"
headers = { "Authorization": auth, "accept": "application/json" }
response = requests.get(url, headers=headers)
return response