Skip to main content
kasadaprotocolarchitecture8 min readBy Catmouse Engineering

Kasada x-kpsdk-v Script Rotations and Handling reload:true on /tl

Last reviewed
Short answer

A Kasada x-kpsdk-v rotation is an edge update where the protected target switches to a newer SDK build (such as j-1.2.864 to j-1.2.899) and answers stale /tl submissions with {"reload":true}. Below: how to detect rotations, parse kpsdkV dynamically from ips.js, and recover cleanly via POST /Solver/solve.

Who this is for

Security researchers and automation engineers running authorized HTTP clients against Kasada-protected origins who want to prevent script-caching bugs and handle {"reload":true} responses deterministically.

On this page
  1. What happens during a Kasada x-kpsdk-v script rotation?
  2. Why does the /tl endpoint return {"reload":true} without x-kpsdk-r?
  3. How should your client extract ipsUrl and kpsdkV dynamically?
  4. How do you implement a reload:true recovery loop with POST /Solver/solve?
  5. Key takeaways
  6. Conclusion and scope
  7. Evidence and sources
  8. Frequently asked questions

What happens during a Kasada x-kpsdk-v script rotation?

During a rotation, the target edge updates the query string on its challenge script URL and requires telemetry compiled against the new script body.

When a client requests the Kasada challenge bootstrap page (typically a path ending in /fp), the HTML response contains a script reference to ips.js that carries two query parameters: x-kpsdk-v (the SDK version identifier, such as j-1.2.864 or j-1.2.899) and x-kpsdk-im. In addition to rotating the per-script VM bytecode and encryption constants on a regular cadence, protected origins periodically roll out a new SDK version string across their edge fleet.

In contrast to a static API key header, x-kpsdk-v must match the exact script build that produced the /tl payload. If an HTTP client caches an older ips.js file on disk or hardcodes "kpsdkV": "j-1.2.864" after the target has moved to j-1.2.899, the header and payload version diverge from what the target edge expects.

How do x-kpsdk-v prefixes map to SDK families in the Solver API?

As documented in the Catmouse OpenAPI 3.1 specification and the API reference, the prefix of kpsdkV identifies which SDK family the target served:

j- or v- (Web SDK)
Browser JavaScript SDK served on web origins (for example, j-1.2.864 or j-1.2.899). Paired with a browser engine such as chrome, firefox, safari, or edge.
i- (Native iOS SDK)
Native iOS mobile SDK version string. Passing an i- prefix to POST /Solver/solve overrides a browser engine value so the solver uses the iOS telemetry profile.
a- (Native Android SDK)
Native Android mobile SDK version string. Like i-, an a- prefix selects the corresponding mobile SDK profile.
ipsUrl and x-kpsdk-im
The full URL of the ips.js request from the /fp HTML. The solver reads x-kpsdk-im directly from ipsUrl and returns it as imHeader when present.

Why does the /tl endpoint return {"reload":true} without x-kpsdk-r?

A {"reload":true} JSON body on POST /<path>/tl indicates that the edge rejected the telemetry submission and requires a fresh challenge bootstrap.

In a passing Kasada handshake over a trusted TLS session, your client posts the decoded binary payload from POST /Solver/solve to the target's /tl endpoint along with the returned x-kpsdk-* headers. When the target accepts the telemetry, it responds with HTTP 200 OK (per RFC 9110), a JSON body of {"reload":false}, an updated x-kpsdk-ct session token header, and an x-kpsdk-r timing header.

Alternatively, when the submission fails validation, the target still returns HTTP 200 OK on many deployments, but changes the body to {"reload":true} and omits x-kpsdk-r. Treating every HTTP 200 on /tl as a passing solve without inspecting the JSON body is one of the most common causes of subsequent HTTP 429 (RFC 6585) or 403 errors on protected API routes.

Comparing a passing /tl response versus a reload:true response

Checking both the parsed JSON body and the response headers on /tl distinguishes a usable session from an instruction to re-bootstrap:

Table 1. Passing /tl response versus reload:true rejection on Kasada targets
Signal on POST /<path>/tlPassing solve (reload: false)Rejected or stale solve (reload: true)
Response JSON body{"reload":false}{"reload":true}
x-kpsdk-ct response headerRefreshed session token ready for protected callsAbsent or unverified; cannot be used on protected routes
x-kpsdk-r response headerPresent (carries st and rst timing anchors)Absent
Required client actionHold for holdMs if returned, then call protected routeEvict cached ips.js, fetch fresh /fp + ips.js, solve again
Four-step recovery flow for Kasada x-kpsdk-v rotations: 1. Client reuses a cached ips.js with a retired version such as j-1.2.864 after the edge rotated to j-1.2.899. 2. POST /tl returns reload:true with no x-kpsdk-r header. 3. Client evicts its script cache and fetches a fresh /fp and ips.js URL containing x-kpsdk-v=j-1.2.899. 4. Client calls POST /Solver/solve with the matching ipsBody and kpsdkV, and the next /tl returns reload:false.
Figure 1. Detecting a Kasada x-kpsdk-v rotation via {"reload":true} on /tl and re-bootstrapping /fp and ips.js. Diagram by Catmouse Engineering.

How should your client extract ipsUrl and kpsdkV dynamically?

Always parse the ips.js URL and its x-kpsdk-v query parameter directly from the latest /fp response rather than storing version strings in configuration files.

Because the Catmouse Solver API (POST /Solver/solve) is an offline solver that never contacts the target on your behalf, your HTTP client controls the entire network lifecycle against the protected host. Depending on how your client caches challenge scripts, three integration mistakes commonly trigger {"reload":true} during a rotation:

  1. Hardcoded kpsdkV with a live ipsBody: Your client downloads the newest ips.js (now on j-1.2.899), but sends a hardcoded "kpsdkV": "j-1.2.864" in the JSON body to POST /Solver/solve.
  2. Cached ipsBody without version keying: Your client caches the UTF-8 text of ips.js in memory for too long without checking whether the x-kpsdk-v or x-kpsdk-im query parameters in the /fp HTML changed.
  3. Ignoring holdMs on timeline-anchored scripts: When POST /Solver/solve returns an integer holdMs field in its response, submitting POST /tl immediately without waiting holdMs milliseconds can also cause the target edge to reject the telemetry.

How do you implement a reload:true recovery loop with POST /Solver/solve?

Parse x-kpsdk-v from the ips.js URL via standard URL parsing (WHATWG URL Standard) and pass that exact value as kpsdkV to POST /Solver/solve.

The Python snippet below shows how to pass a freshly fetched ips.js body and its parsed kpsdkV string (j-1.2.899) to POST https://kasadaapi.catmouse.ai/Solver/solve:

import os
import requests

r = requests.post(
    "https://kasadaapi.catmouse.ai/Solver/solve",
    headers={"x-api-key": os.environ["CATMOUSE_KEY"]},
    json={
        "ipsBody": "<contents of the ips.js response, as UTF-8 text>",
        "ipsUrl": "https://www.example.com/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/ips.js?x-kpsdk-v=j-1.2.899&x-kpsdk-im=ZXhhbXBsZQ",
        "ctToken": "<x-kpsdk-ct response header of the /fp request>",
        "kpsdkV": "j-1.2.899",
        "tz": "America/New_York",
        "tzOffset": 240,
        "acceptLanguage": "en-US",
        "engine": "chrome",
    },
    timeout=60,
)
print(r.status_code, r.text)

When your client decodes the base64 payload field from the solve response and posts those raw bytes to the target's /tl URL alongside the returned headers map, inspect the target's response before issuing any downstream API requests:

  • If the /tl response JSON contains "reload": false and a fresh x-kpsdk-ct header, store that new x-kpsdk-ct token (and x-kpsdk-r if you call POST /Solver/cd next).
  • If the /tl response JSON contains "reload": true, discard the current ctToken and any cached ips.js body, fetch a fresh /fp page and ips.js script from the target, and run the solve step again with bounded backoff.

Key takeaways

  • Never hardcode kpsdkV: Extract x-kpsdk-v and ipsUrl dynamically from the /fp HTML on every bootstrap so SDK rotations (such as j-1.2.864 to j-1.2.899) are picked up automatically.
  • Inspect the /tl JSON body: HTTP 200 OK on /tl does not mean the token was accepted; check for {"reload":false} and the presence of a refreshed x-kpsdk-ct header.
  • Evict cached scripts on reload:true: Never re-submit the same /tl payload after {"reload":true}; re-fetch /fp and ips.js first.
  • Respect holdMs: When the solve response includes holdMs, wait that duration before posting to /tl.

Conclusion and scope

Treating x-kpsdk-v as a dynamic protocol field parsed from each /fp challenge page and checking /tl responses for {"reload":true} eliminates self-inflicted failures when a target rotates its Kasada SDK version.

Scope and limitations. This article explains how the kpsdkV, ipsUrl, ipsBody, and holdMs fields in the Catmouse OpenAPI contract (/openapi.json) interact with target /fp and /tl endpoints as of 2026-10-22. It publishes no pass-rate, latency, or throughput figures, and vendors can change challenge behavior without notice. Apply these techniques only against systems you own or have explicit written authorization to test.

Evidence and sources

Every protocol field and status code discussed in this post is grounded in the primary sources below:

Methodology and limits. Documented: the Catmouse POST /Solver/solve contract and observed /fp and /tl response shapes during SDK version transitions. Not claimed: vendor-internal source code or numerical benchmark figures. Reviewed 2026-10-22.

Frequently asked questions

What does {"reload":true} on a Kasada /tl response mean?

When the target's /tl endpoint returns {"reload":true} and omits the x-kpsdk-r response header, the submitted telemetry payload was rejected and the target is instructing the client to reload the challenge bootstrap (/fp and ips.js) rather than proceeding with the session.

Why does hardcoding kpsdkV or caching ips.js across sessions fail?

Protected origins periodically rotate the served SDK version string (for example, from j-1.2.864 to j-1.2.899) and change the bytecode and constants inside ips.js. If your client sends a stale ipsBody or a mismatched kpsdkV field to POST /Solver/solve, the resulting payload will not match what the target edge expects.

How does the prefix of x-kpsdk-v affect engine selection in POST /Solver/solve?

Per the Catmouse OpenAPI specification (/openapi.json), the kpsdkV prefix identifies the SDK family: j- or v- for web browsers, i- for native iOS, and a- for Android. Sending an i- or a- prefix overrides a web engine selection so the solver emits telemetry matching that SDK family.

Should my client retry the same /tl payload when it receives reload:true?

No. Re-sending the identical /tl body will fail again. Your client should evict any cached ips.js text, request a fresh /fp challenge page to obtain a new x-kpsdk-ct header and the current ips.js URL, fetch that ips.js body, and call POST /Solver/solve with the newly parsed kpsdkV.

Does POST /Solver/solve fetch the rotated ips.js from the target automatically?

No. POST /Solver/solve is a pure offline solver and never makes outbound connections to the target. Your HTTP client fetches /fp and ips.js over its own network exit and passes ipsBody, ipsUrl, ctToken, and kpsdkV in the JSON request body.