import requests # Define the API URL url = "https://api.puter.com/signup" # Define the headers (including all the details you provided) headers = { "accept": "*/*", "accept-encoding": "gzip, deflate, br, zstd", "accept-language": "en-US,en;q=0.9", "connection": "keep-alive", "content-length": "130", # This will be automatically calculated by `requests` "content-type": "application/json", "host": "api.puter.com", "origin": "https://dooratre-yjytjyjtyjtyjtjytj.static.hf.space", "referer": "https://dooratre-yjytjyjtyjtyjtjytj.static.hf.space/", "sec-ch-ua": '"Chromium";v="134", "Not:A-Brand";v="24", "Google Chrome";v="134"', "sec-ch-ua-mobile": "?0", "sec-ch-ua-platform": '"Windows"', "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "cross-site", "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36", "x-requested-with": "XMLHttpRequest" } # Define the payload (request body) payload = { "username": "tdpf6hhhhhtrgrtghhhhhhhQtGu9g", "email": "ehsavregergtgrisea@gmail.com", "password": "jH%K7RQz7t4@C", "send_confirmation_code": True, "p102xyzname": "" } # Send the POST request response = requests.post(url, headers=headers, json=payload) # Check if the request was successful (status code 200) if response.status_code == 200: try: # Parse and print the JSON response print("Response JSON:") print(response.json()) except ValueError: print("The response is not valid JSON.") else: # Print an error message if the status code is not 200 print(f"Request failed with status code: {response.status_code}") print(f"Response text: {response.text}")