Skip to main content

x-kpsdk-ct and x-kpsdk-cd headers

Header/Kasada

Also known as kpsdk, x-kpsdk-ct, x-kpsdk-cd

x-kpsdk-ct and x-kpsdk-cd are request headers used on Kasada-protected sites. x-kpsdk-ct carries a token issued after Kasada's challenge is solved; x-kpsdk-cd carries a proof-of-work value that has to be generated fresh for every request.

How to recognize it

How to recognize it
Header
x-kpsdk-ct
Header
x-kpsdk-cd
Status code
429 from a Kasada path ending in /fp, with a page that loads an ips.js script
Request
A POST to a path ending in /tl whose response returns x-kpsdk-ct
Cookie
tkrm_alpekz_s1.3

x-kpsdk-ct and x-kpsdk-cd compared

The two headers do different jobs, and most failures come from treating them the same way.

x-kpsdk-ct, the client token

  • Where it comes from: the response headers of the POST to Kasada's /tl endpoint, after the challenge has been solved.
  • How long it lasts: until a newer one arrives. Later responses, including responses from protected endpoints, can return a fresh x-kpsdk-ct. Only the most recent value works.
  • When to send it: on requests to protected endpoints, if the browser sends it there. Some sites expect it as a header, others only check Kasada's cookies.

x-kpsdk-cd, the proof of work

  • Where it comes from: it is computed for each request, using the latest x-kpsdk-ct and the x-kpsdk-st timestamp that /tl returned.
  • How long it lasts: one request. A value that has been sent once is spent.
  • When to send it: on every protected request where the browser sends it, generated immediately before the request.

Where the headers come from

On most Kasada sites the flow looks like this in a capture:

  1. The page loads Kasada's p.js. The SDK version in that script becomes the x-kpsdk-v value.
  2. A background GET to a path ending in /fp answers with status 429 and a small page that loads ips.js. The 429 here is Kasada's challenge, not a rate limit.
  3. The browser runs the challenge and POSTs the result as a binary body to the matching /tl path.
  4. The /tl response sets Kasada's cookies (tkrm_alpekz_s1.3 and tkrm_alpekz_s1.3-ssn) and returns x-kpsdk-ct and x-kpsdk-st as response headers.
  5. Requests to protected endpoints carry the cookies and, where the site expects them, x-kpsdk-ct and a fresh x-kpsdk-cd.

Some sites skip the background /fp call and serve the challenge on the first page load instead. The /tl step and the headers and cookies that come out of it are the same. The site then reloads the page with the new cookies.

The other x-kpsdk headers

You will see more x-kpsdk-* names in a capture. They are part of the same flow:

  • x-kpsdk-v: the SDK version, sent on the /fp request.
  • x-kpsdk-st: a timestamp returned by /tl. It is an input for every x-kpsdk-cd.
  • x-kpsdk-im and x-kpsdk-dt: sent on the /tl request itself, next to an x-kpsdk-ct that the API returns with the payload.
  • x-kpsdk-fc and x-kpsdk-h: returned by an extra /mfc call on some sites. fc feeds the proof of work; h may be required on protected requests.

Why copied headers fail

Copying both headers from a browser session into a script works for one request at most:

  • x-kpsdk-cd is single-use. Reusing it fails immediately.
  • x-kpsdk-ct goes stale. Once a response returns a newer token, the old one stops working, and every new proof of work has to use the newer token.
  • The cookies expire. In the example in the Hyper Solutions docs, the Kasada cookies carry a Max-Age of 86400 seconds.
  • A 429 on a protected endpoint usually means the session has to solve the challenge again.
  • The client does not match. As with every anti-bot system, a TLS fingerprint or header order that is not Chrome's gets the session flagged before the headers matter. Recording a browser session in a HAR file shows exactly which of these headers the site expects.

Kasada and Vercel BotID

Applications on Vercel can use Vercel BotID, whose Deep Analysis mode is powered by Kasada. There, protected endpoints expect an x-is-human header. It comes from its own c.js script, not from /tl. A site can also run standard Kasada next to BotID, so check which headers the browser sends.

The full flow is in the Kasada fingerprint-endpoint docs. The Hyper Solutions Kasada API generates the /tl payload and every x-kpsdk-cd, so your client only has to send them in the right order.

Questions

What is x-kpsdk-ct?

x-kpsdk-ct is Kasada's client token. It is returned in the response headers of the /tl request once the challenge is solved, and later responses can replace it with a newer value. Protected requests have to carry the latest one if the site expects it.

What is the difference between x-kpsdk-ct and x-kpsdk-cd?

x-kpsdk-ct is a token that is reused until a newer one arrives. x-kpsdk-cd is a proof of work that has to be generated fresh for every request, using the latest x-kpsdk-ct and the x-kpsdk-st timestamp.

Why does a Kasada site return 429?

On Kasada sites a 429 from a path ending in /fp is the challenge itself, not a rate limit. The response loads ips.js; solving it and posting the result to /tl returns the tokens and cookies the session needs. A 429 on a protected endpoint later means the challenge has to be solved again.

Can I reuse an x-kpsdk-cd value?

No. Each x-kpsdk-cd is valid for one request. Generate a new one immediately before every protected request.

Where does x-kpsdk-v come from?

It is the Kasada SDK version read from the site's p.js script. It is sent as a query parameter and header on the /fp request.

Further reading

Technical review: Hyper Solutions engineering, Nov 18, 2026