Files
keychecker/MakerSuite.py
T
2024-01-18 09:14:54 +10:00

19 lines
566 B
Python

import aiohttp
import APIKey
async def check_makersuite(key: APIKey):
async with aiohttp.ClientSession() as session:
async with session.get(f"https://generativelanguage.googleapis.com/v1beta/models?key={key.api_key}") as response:
if response.status != 200:
return
return True
def pretty_print_makersuite_keys(keys):
print('-' * 90)
print(f'Validated {len(keys)} MakerSuite keys:')
for key in keys:
print(f'{key.api_key}')
print(f'\n--- Total Valid MakerSuite Keys: {len(keys)} ---\n')