josh
05/16/2024, 6:33 PMVapi Support
05/16/2024, 6:33 PMVapi Support
05/16/2024, 6:33 PMOP
05/16/2024, 6:41 PMpy
import requests
api_key = 'YOUR_API_KEY'
url = 'https://api.11labs.com/v1/voices'
headers = {
'Authorization': f'Bearer {api_key}',
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
if response.status_code == 200:
print('API key is valid and the connection is successful.')
print('Available voices:', response.json())
else:
print('Failed to connect to the API.')
print('Status code:', response.status_code)
print('Response:', response.json())
josh
05/16/2024, 6:44 PMOP
05/16/2024, 6:45 PMVapi Support
05/16/2024, 7:01 PMSahil
05/16/2024, 7:04 PM