First commit
This commit is contained in:
commit
9f44a7cfa4
14
synthesai.py
Normal file
14
synthesai.py
Normal 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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user