diff --git a/udio_wrapper/__init__.py b/udio_wrapper/__init__.py index d4ed8fe..57aa924 100644 --- a/udio_wrapper/__init__.py +++ b/udio_wrapper/__init__.py @@ -220,3 +220,25 @@ def download_song(self, song_url, song_title, folder="downloaded_songs"): except requests.exceptions.RequestException as e: print(f"Failed to download the song. Error: {e}") + + +import requests + +def generate_proxy(): + headers = { + "Authorization": f"Bearer {your_token_here}", + "Content-Type": "application/json" + } + try: + response = requests.post( + "https://www.udio.com/api/generate-proxy", + headers=headers, + json={ + "token": "your_token_here" + } + ) + print("Proxy generated successfully.") + return response.json() + except requests.exceptions.RequestException as e: + print(f"Error generating proxy: {e}") + return None \ No newline at end of file