gcui-art / suno-api

Use API to call the music generation AI of suno.ai, and easily integrate it into agents like GPTs.
https://suno.gcui.ai
GNU Lesser General Public License v3.0
1.25k stars 288 forks source link

Getting an error when running the test code #25

Closed alxgt1000 closed 5 months ago

alxgt1000 commented 6 months ago

I write because I'm having trouble implementing it into my code. As context, I have the Suno pro version and https:///api/get_limit works well.

First I was getting an error in the return response.json() line ( error: "JSONDecodeError: Expecting value: line 1 column 1 (char 0)")

And now im getting this: https://drive.google.com/file/d/1R4EvkilCZ9Y8F0O6KV9uMiVUoxmW_tF1/view?usp=drivesdk

I would appreciate if you could let me know how to solve this issue, or if this is some kind of block from Suno (I don't think so as https:///api/get_limit is working but just checking)

GitPusher99 commented 6 months ago

The interface should be fine

image

Do we get any results from this test?

curl -X 'GET' \
  'http://{your host}/api/get_limit' \
  -H 'accept: application/json'

@alxgt1000

alxgt1000 commented 6 months ago

I get invalid syntax error

image

alxgt1000 commented 6 months ago

But if I put it in chrome it works image @GitPusher99

GitPusher99 commented 5 months ago

@alxgt1000

curl -X 'GET' \
  'https://suno-api-cyan.vercel.app/api/get_limit' \
  -H 'accept: application/json'

This is my temporary test service, you try it, will there be such a problem?

alxgt1000 commented 5 months ago

@GitPusher99 Thanks for the test, unfortunately I still get the same issue in the terminal "SyntaxError: invalid syntax"

image

Any advice based on the image? It seems it doesn't recognize the variables/parameters

Also If I paste the code in google collab is not working image

GitPusher99 commented 5 months ago

Can you test it with postman? @alxgt1000

alxgt1000 commented 5 months ago

Yes, It works here!

image

How could I integrate code like this to create songs for my saas apps?

@GitPusher99

blueeon commented 5 months ago

@alxgt1000 We will utilize it as a microservice to create music for our SaaS.