Suno-API icon indicating copy to clipboard operation
Suno-API copied to clipboard

Issue in Renewing Token

Open gamedevCloudy opened this issue 1 year ago • 6 comments

I think Suno has hardened the security. Thus it is throwing an error that CAPTCHA verification is required. Here's a log:

INFO:SunoAI:Renew Token ♻️
INFO:SunoAI:{'errors': [{'message': 'CAPTCHA verification is required', 'long_message': 'CAPTCHA verification is required', 'code': 'requires_captcha'}], 'clerk_trace_id': 'd183cf9c4d9e760a7a1f166efec7769a'}
INFO:SunoAI:'jwt'

Please let me know if some fix is available. We have an app in production and thus need help to resolve this quickly.

gamedevCloudy avatar Nov 19 '24 11:11 gamedevCloudy

If I hardcode the jwt from the web browser. Further error is show while using generate

INFO:SunoAI:Generating Audio...
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): studio-api.suno.ai:443
DEBUG:urllib3.connectionpool:https://studio-api.suno.ai:443 "POST /api/generate/v2/ HTTP/11" 401 None
DEBUG:SunoAI:{"detail": "Unauthorized"}
ERROR:SunoAI:Audio Generate Failed ⁉️
ERROR:app:Error generating song: Error response: {"detail": "Unauthorized"}
ERROR:app:Exception on /api/v1/songs [POST]
Traceback (most recent call last):
  File "/app/api/v1/routes.py", line 53, in post
    songs = generate_song(
  File "/app/services/song_generator.py", line 49, in generate_song
    clips = client.generate(
  File "/.venv/lib/python3.10/site-packages/suno/suno.py", line 146, in generate
    raise Exception(f"Error response: {response.text}")
Exception: Error response: {"detail": "Unauthorized"}

gamedevCloudy avatar Nov 19 '24 11:11 gamedevCloudy

I see a request being consistently made in the application (ie when using suno.com)

POST /v1//rgstr?k=client-DaZjubWc7zwnZ5o2EEJhqt4UYRzYRoUuHbTQcIH9Ybq&st=javascript-client-react&sv=3.1.0&t=1732016453483&sid=ef7d2f39-ded9-4c62-8347-626d1289ddbb&ec=1 undefined
Host: s.prod.suno.com

gamedevCloudy avatar Nov 19 '24 11:11 gamedevCloudy

Damn it! Just noticed the same issue. Also for us this is critical. Would be highly interested in a fix.

StephanSchuster avatar Nov 21 '24 10:11 StephanSchuster

Is there anything I could do or test to try to resolve this. Currently I am clueless how to proceed.

StephanSchuster avatar Nov 21 '24 19:11 StephanSchuster

Is there anything I could do or test to try to resolve this. Currently I am clueless how to proceed.

We've temporarily moved to Udio API Pro.

I couldn't work something out in time so we moved to this. Their implementation was broken too. But now it takes around 5-10 minutes to get a song. And some requests still fail.

Suno themselves are working on an API so this seems like an effort to cut off projects like this one. They are currently planning to do a beta.

gamedevCloudy avatar Nov 22 '24 06:11 gamedevCloudy

Udioapi team said the longer times are due to the new model release. They are working to improve on that.

gamedevCloudy avatar Nov 22 '24 06:11 gamedevCloudy