vercel-llm-api
vercel-llm-api copied to clipboard
Kasada Anti-Bot
During a reanalysis of Vercel AI's functionality, I came across two additional headers used in the HTTP requests of its generational endpoints, namely x-kpsdk-cd
, x-kpsdk-ct
, x-kpsdk-im
. After some research, I found that these headers are related to Kasada.
I've already done a bit of reverse engineering. Achieving the value of x-kpsdk-ct
and x-kpsdk-im
was relatively easy, but it seems x-kpsdk-cd
is challenging to figure out.
If the headers' values aren't in any way valid, the API will respond with a 429 error.
Yeah my previous utilization of this tool has been broken recently, I assume by this. Even using the retry until a response trick doesn't work anymore. Bummer because this is such a great way to test different models!
I found something: https://github.com/Pr0t0ns/Kasada-Reverse
Streamlink's Twitch plugin leverages CDP and simple script injection to bypass Kasada protections on Twitch. I suggest you have a look at the source code to see if you can get anything from it.
I've actually developed a Kasada solver myself, taking a bit of inspiration from their bypass concept.
But kpsdk-solver is entirely written in JavaScript, which makes this pretty much a no-go.
Maybe in gpt4free working?
https://github.com/xtekky/gpt4free/blob/main/g4f%2FProvider%2FVercel.py