Open lkyuier opened 5 months ago
给你一段参考代码, 出 403 肯定是你的访问网络有问题吧。 你去确认一下访问的整个网络链路是不是存在那里有问题,或者调试一下吧。
I also got the 403 error when calling locally
I was able to call the api normally by installing the latest docker and using port 8000
Could you show the all Headers in the picture? @acinmavi
@xxp912 ,actually nothing special about the header , here is it :
I could give you curl also for more clear `curl --location 'http://127.0.0.1:8000/v1/audio/speech' \ --header 'Content-Type: application/json' \ --data '{ "input" : "hah hah hah", "voice" : "8051", "prompt" : "开心", "language" : "zh_us", "speed" :1, "response_format" : "mp3", "model" : "emoti-voice"
}'`
If you deploy using Docker, you need to expose 8000 ports and then access them http://ip:8000/v1/audio/speech
我已经部署起来了,能访问了,如图
但是,当我去curlcurl -X GET "http://192.168.1.228:8501/v1/docs" -H "Content-Type: application/json" -H "Accept: application/json"
curl -X GET "http://192.168.1.228:8501/api/doc" -H "Content-Type: application/json" -H "Accept: application/json"
curl -X GET "http://192.168.1.228:8501/v1/audio/speech" -H "Content-Type: application/json" -H "Accept: application/json" 总是出错,
responsezong'shi总是403, 请问是为什么?