Skip to main content
API referencespec 2.0.06 Kasada SDK profiles

POST /Solver/solve

One HTTP call turns a served ips.js body into a passing /tl payload; a second call, POST /Solver/cd, makes the proof-of-work for protected actions. Zero headless Chromium on your side.

Overview

What the solver does

Kasada gates a page or app with an ips.js challenge and a /fp probe. You forward the served challenge to us; we build the response Kasada expects and hand back a /tl payload plus its headers. You base64-decode the payload and POST the bytes, re-probe, and you are through. In the kasadaRequest envelope the profile is inferred from the version prefix (j- Chrome web · i- native iOS · a- Android) and site; in the flat shape you may set engine yourself (default chrome). The API never contacts the site: you fetch ips.js and send /tl yourself.

—our API p50 (measured)
6engines
1http call
Auth

Authentication & base URL

Send your key as x-api-key: ksk_… on every request. The base URL is https://kasadaapi.catmouse.ai — not the raw ALB or API Gateway. Keys are scoped: usage, balance and metrics are all per-key.

every request
x-api-key: ksk_YOUR_KEY…
content-type: application/json
Host: kasadaapi.catmouse.ai

No key yet? Get one → Sending the wrong or a missing key returns 401.

Schema

OpenAPI 3.1 Specification

We publish a machine-readable OpenAPI 3.1.0 JSON schema documenting the solve request (flat shape, kasadaRequest envelope and the PScript-only mode) and response, the cd route, the account, balance and billing routes, signup, tlOutcome and the status endpoint. Internal fleet and admin routes are deliberately omitted. You can import this definition directly into Postman, Insomnia, or code-generation pipelines (openapi-generator, fern, or stainless).

Download OpenAPI 3.1 JSON Specification
GET https://catmouse.ai/openapi.json
view openapi.json
Engines

Supported engines

Six Kasada device profiles across three SDK families, selected by the engine value. You send the version the served ips.js declares — never a hard-coded stale pin —.

EnginePrefixSurface / hostsx-kpsdk-vUser-Agent
chromej-Web (desktop Chrome). Default, and the fallback for an unknown engine valuej-1.2.xMozilla/5.0 (Windows NT 10.0; Win64; x64) … Chrome/…
snkrsi-Native iOS: SNKRS app (aliases snkrs-ios, ios-snkrs, ios)i-1.18.xSNKRS/8.5.0 (iOS 26.x; iPhone…)
fli-Native iOS: Foot Locker app (aliases fl-ios, footsites, footsites-ios)i-1.18.xFootLocker/9.8.0 iOS/26.x
wkwj-iOS WKWebView (aliases accounts-wkw, accounts-wkwebview, wkwebview)j-1.2.xMozilla/5.0 (iPhone; … Version/26.x … Safari/604.1)
whatnot-iosi-Native iOS: Whatnot app (aliases whatnot_ios, ios-whatnot, whatnot-native)i-x(app user agent)
androida-Native Android, for example Whatnot and Chipotle apps (aliases whatnot, chipotle, android-webview)a-x(app device token)
Flow

The solve flow

Every engine follows the same five beats: probe /fp, pull ips.js, solve, submit /tl, re-probe. Where they differ — Client Hints, UA authority, cd source — is called out per engine below.

  client (your egress IP)          our API (kasadaapi.catmouse.ai)        Kasada / site edge
  ─────────────────────────        ──────────────────────────────        ─────────────────
  1. GET  /fp                 ──────────────────────────────────────▶   429 + x-kpsdk-ct
  2. GET  /ips.js             ──────────────────────────────────────▶   200 (ips body, UTF-8)
  3. POST /Solver/solve   ───▶  build chrome bag from
       {ips, site, version(j-), ctHeader, ipsUrl, UA+Client-Hints}
                                  ◀── { payload, ctHeader, dtHeader, imHeader,
                                         genPath:"offline-chrome", mapped }
  4. POST /tl  (payload + x-kpsdk-ct/dt)  ────────────────────────────▶   200 + x-kpsdk-r  ✔
  5. sleep ~10s, GET /fp      ──────────────────────────────────────▶   200 + body = PASS
  6. protected action (e.g. addToCart)  needs  x-kpsdk-cd (PoW) ───────▶  200  (cd from POST /Solver/cd)

Desktop / mobile Chrome surfaces (nike, scheels, footlocker.*, arcteryx, ticketmaster…). Client Hints (sec-ch-ua*) are sent. A protected POST action (add-to-cart, checkout) additionally needs an x-kpsdk-cd proof-of-work, which the solver computes from the site /p.js.

Request

Request envelope

Two body shapes are accepted: the flat shape (first example) and the production kasadaRequest envelope (second example). Both need your egress time zone: tz/tzOffset in the flat shape, Timezone/TimezoneOffset in the envelope. A solve without them is a 400 missing geo (the gate defaults on; whether production keeps it on is unverified). The body may itself be gzip/zstd/br-compressed.

POST /Solver/solve (flat)
POST /Solver/solve HTTP/1.1
Host: kasadaapi.catmouse.ai
x-api-key: ksk_...
content-type: application/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.661&x-kpsdk-im=ZXhhbXBsZQ",
  "ctToken": "<x-kpsdk-ct response header of the /fp request>",
  "kpsdkV": "j-1.2.661",
  "tz": "America/New_York",
  "tzOffset": 240,
  "acceptLanguage": "en-US",
  "engine": "chrome"
}
POST /Solver/solve (envelope)
POST /Solver/solve HTTP/1.1
Host: kasadaapi.catmouse.ai
x-api-key: ksk_...
content-type: application/json

{
  "mode": 0,
  "kasadaRequest": {
    "site":       "www.example.com",         // challenge host (recommended; derived from ipsUrl when omitted)
    "version":    "j-1.2.661",               // the served x-kpsdk-v (dynamic!)
    "ips":        "<base64 ips.js body>",    // raw UTF-8 bytes, base64
    "ipsUrl":     "https://.../ips.js?...",  // recommended (host source)
    "ctHeader":   "<x-kpsdk-ct from /fp>",
    "userAgent":  "Mozilla/5.0 ...",
    "language":   "en-US",
    "Timezone":   "America/New_York",        // MUST match your egress geo
    "TimezoneOffset": 240
  }
}
FieldTypeReq.Notes
sitestringyesThe challenge host — e.g. www.scheels.com. Enough on its own to route the engine; you never send an internal host_src.
versionstringyesThe x-kpsdk-v the served ips.js declares (j-/i-/a-). DYNAMIC — send the current one, never a hard-coded stale pin.
ipsbase64yesThe ips.js body as raw UTF-8 bytes, base64-encoded. Never charset-decode it first.
ipsUrlstringrec.The full ips.js URL. Recommended: it is a secondary source for the challenge host.
ctHeaderstringyesThe x-kpsdk-ct returned by the initial /fp 429.
userAgentstringrec.Your client UA. Optional — an absent value falls back to a fixed per-engine default baked into the solver (engine-coherent, not your device). Send your real UA: on native (i-/a-) surfaces it is the primary device-identity signal, since there is no window.location or Client Hints to derive one from instead.
languagestringnoAccept-Language value, e.g. en-US.
TimezonestringyesIANA tz, e.g. America/New_York, derived from a /locate lookup through the SAME proxy used for the solve. REQUIRED in production: KS_REQUIRE_GEO is fail-closed and defaults ON, so a request missing this returns 400 missing geo before any solving happens. Must match your egress geo, or the bag ships geo-incoherent and is silently declined downstream (EMPTY_R).
TimezoneOffsetnumberyesMinutes offset from UTC (JS getTimezoneOffset sign), e.g. 240. REQUIRED alongside Timezone under the same fail-closed gate — see above. Must be coherent with Timezone.
Response

Response

On success you get the /tl payload and the three headers to replay it with.

200 OK
{
  "success":  true,
  "payload":  "<base64 /tl body — decode, then POST the bytes>",
  "ctHeader": "<x-kpsdk-ct — send on /tl>",
  "dtHeader": "<x-kpsdk-dt — send on /tl>",
  "imHeader": "<x-kpsdk-im>",
  "genPath":  "offline-chrome",
  "mapped":   "431/431",
  "cost":     0.003            // USD, present only on a billed (external-key) solve
}
FieldTypeNotes
successbooltrue when a bag was generated.
payloadbase64The /tl body, base64-encoded. Base64-decode it and POST the decoded bytes as the raw body to the site /tl.
ctHeaderstringSend back as x-kpsdk-ct on /tl.
dtHeaderstringSend back as x-kpsdk-dt on /tl.
imHeaderstringx-kpsdk-im header value.
genPathstringWhich builder ran: offline-chrome / offline-ios / offline-android.
mappedstringProbe coverage, e.g. 431/431 — how many challenge probes were resolved.
costnumberUSD charged for this solve. Present only on success AND only when the request is billed to an external customer key — absent (never 0) on first-party/internal or unattributed traffic. A refused or errored solve is never charged and carries no cost field. See Pricing & balance below for how the price is set.
the whole thing, in one curl
solve.sh — bash
$ curl -s https://kasadaapi.catmouse.ai/Solver/solve \
-H "x-api-key: $CATMOUSE_KEY" \
-H "content-type: application/json" \
-d @request.json | jq '.payload, .mapped'
"<base64 /tl body>"
"431/431"
Headers / tokens

The headers, and who issues them

Five x-kpsdk-* headers appear in a full integration. Four of them make one round trip — the challenge issues a token, the solver hands it back, you replay it on /tl. The fifth, x-kpsdk-cd, does not travel that path at all and has its own rules.

HeaderIssued byIn our responseYou send it onWhat it is
x-kpsdk-ctthe /fp 429returned as ctHeaderx-kpsdk-ct on POST /tlClient/session token. Pairs the payload you submit to the session the challenge opened.
x-kpsdk-dtthe solverreturned as dtHeaderx-kpsdk-dt on POST /tlDevice token derived from the bag we built. Always send it with the matching payload.
x-kpsdk-imthe solverreturned as imHeaderx-kpsdk-im on POST /tlIntegrity marker for the same submission.
x-kpsdk-rthe site—nothing — you receive itWhat /tl answers with on success. Its presence is how you know the submission landed.
x-kpsdk-cdthe solver, per requesta fresh solve, every timethe protected POST onlyProof-of-work. Single-use and short-lived — see the section below.

x-kpsdk-ct — the session / client token

This is Kasada's client token, and it is what ties a submitted payload to a session. The challenge issues it: your first request to a protected path comes back 429 carrying an x-kpsdk-ct response header.

Pass that value into POST /Solver/solve as ctHeader, and the solve response returns ctHeader back to you. Send it as the x-kpsdk-ct request header on your /tl POST, alongside the payload and x-kpsdk-dt. The payload is only valid for the session that token names — pairing a payload with a different ct fails.

ct.round-trip
# 1 — the challenge issues the token
GET https://shop.example.com/fp
→ 429
  x-kpsdk-ct: 01JQ7Z…8fA        # <- session/client token

# 2 — hand it to the solver, get it back as ctHeader
POST https://kasadaapi.catmouse.ai/Solver/solve
  { "kasadaRequest": { "ctHeader": "01JQ7Z…8fA", "ips": "…", … } }
→ 200
  { "payload": "…", "ctHeader": "01JQ7Z…8fA", "dtHeader": "…", "imHeader": "…" }

# 3 — replay it on /tl with the payload it belongs to
POST https://shop.example.com/tl
  x-kpsdk-ct: <ctHeader>        # same token, same session
  x-kpsdk-dt: <dtHeader>
  x-kpsdk-im: <imHeader>
  <payload>                      # base64-decoded bytes as the raw body
→ 200  x-kpsdk-r: …             # submission accepted
Integration

Steps, end to end

  1. 1Fetch /fp from the site → 429 + x-kpsdk-ct. Then fetch the ips.js body — keep the raw UTF-8 bytes, never charset-decode.
  2. 2POST /Solver/solve with the flat body or the kasadaRequest envelope (fields below): site, the current version, base64 ips, ipsUrl, ctHeader, your userAgent/language, and Timezone/TimezoneOffset matching your egress geo.
  3. 3Take the response payload and base64-decode it and POST the decoded bytes as the raw body to the site /tl, sending the returned ctHeader/dtHeader back as x-kpsdk-ct/x-kpsdk-dt.
  4. 4A passing /tl returns 200 with an x-kpsdk-r token. Re-probe /fp after ~10s → 200 + body = solved.
  5. 5For a protected POST action (add-to-cart, checkout), call POST /Solver/cd with host, platform and ct immediately before the request and send the returned cd as x-kpsdk-cd.
  6. 6Egress matters: use a clean residential IP coherent with the site geo, and always send the current served version. A stale version or a mismatched tz/IP is declined (EMPTY_R) even with a correct payload.
Proof-of-work

Protected actions — x-kpsdk-cd

A gated POST action — add-to-cart, checkout, register — needs an x-kpsdk-cd proof-of-work in addition to a solved session. It is a per-action token, not a session token: unlike x-kpsdk-ct, it does not persist and it does not travel the /tl round trip. You get it from a separate call, POST /Solver/cd (body below), not from /Solver/solve; attach the returned cd to the protected request. The cd route needs the cd service on your key (403 service_not_enabled otherwise), has its own quota, supports platform web and ios (android is refused with 422 cd_platform_unproven), and answers 503 pjs_warming with Retry-After while the host's script is warming.

single use
Regenerate it for every request. A cd is consumed by the request that carries it. Two protected actions means two solves — never cache one, never replay one, never share one across a retry.
~1s ttl
It expires in about a second. Generate the cd immediately before the protected request and submit it at once. Anything queued, batched, or held while you do other work arrives stale and is rejected.
POST /Solver/cd
POST /Solver/cd HTTP/1.1
Host: kasadaapi.catmouse.ai
x-api-key: ksk_...
content-type: application/json

{
  "host": "www.example.com",
  "platform": "web",
  "ct": "<x-kpsdk-ct of the session, at least 16 characters>"
}

// 200: { "success": true, "host": "www.example.com", "platform": "web", "cd": "<value for x-kpsdk-cd>" }
cd.lifetime
# WRONG: cd generated once and reused, or held for later
cd = POST /Solver/cd {host, platform, ct}
addToCart(cd)          # ok
checkout(cd)           # rejected: already used
sleep(2); reorder(cd)  # rejected: expired

# RIGHT: one /Solver/cd call per protected request, submitted immediately
cd = POST /Solver/cd; addToCart(cd)     # generate then send, back to back
cd = POST /Solver/cd; checkout(cd)

The seed differs by platform (from the repository notes; not all of it is exposed by the API):

Enginecd sourceSeed
chrome web/p.jsfuses ct, appends per-host lhw
native iOS/mfc["tp-v2-input", workTime, id].join(", ")
native Android/p.jsPOST /Solver/cd refuses platform android (422 cd_platform_unproven)
Endpoints

Endpoints

MethodPathPurpose
POST/Solver/solveTurn a fetched ips.js body + challenge into a passing /tl payload and headers.
POST/Solver/cdGenerate a fresh x-kpsdk-cd proof-of-work for one protected action (platform web or ios). Alias: POST /cd.
GET/Solver/getBalanceYour USD balance (balanceUsd, balanceMicroUsd, unlimited), plus the effective per-solve / per-1,000-solve price for your key.
GET/v1/client/balanceBalance, rates and top-up info for the key. Also /api/v1/client/balance; accepts x-api-key or Authorization: Bearer.
GET/key/statusYour key: USD balance, usage count, effective price, last-used, status.
GET/key/metricsYour usage over time + per-engine + per-host breakdown (?step=hour|day&from&to).
POST/key/billing/create-checkoutCreate a 0xProcessing hosted payment session for crypto top-ups (USDT, BTC, ETH); minimum 3 USD.
GET/key/billing/walletsRetrieve your permanent static deposit crypto addresses.
POST/key/billing/create-walletGenerate a dedicated static crypto deposit address (USDT on TRC20, Solana or Polygon).
POST/key/billing/binance-payCreate an instant zero-gas Binance Pay deposit order with QR code.
POST/Solver/tlOutcomeOptional: report the outcome of your /tl request as telemetry. Always answers 202; the key header is optional.
POST/signupRequest an API key (public). Records the request; a person issues the key.
GET/status.jsonMeasured operator check results (public).
GET/openapi.jsonFormal OpenAPI 3.1 machine-readable specification in JSON format.
Pricing

Pricing & balance

Price is set per key, stored as an integer number of micro-USD per solve (1 USD = 1,000,000 micro-USD) so it never accumulates float error at solve counts in the millions. A key that carries no explicit override uses the platform default rate, which we quote when we issue the key (see the pricing page for the bands). Cost per solve and cost per 1,000 solves are the SAME stored number presented two ways; there is never a second price to disagree with the first.

a USD wallet
A key holds a USD balance, nothing else. Top-ups add dollars; every solve, cd proof and hCaptcha token is charged in dollars at that service’s price on your key. balanceUsd and balanceMicroUsd are the spendable balance. The only exception is a key that is explicitly unlimited.
GET /Solver/getBalance
GET /Solver/getBalance HTTP/1.1
Host: kasadaapi.catmouse.ai
x-api-key: ksk_...
200 OK
{
  "unlimited":        false,
  "balanceUsd":       12.345,
  "balanceMicroUsd":  12345000,
  "costPerSolveUsd":  0.003,
  "costPer1kUsd":     3.0,
  "usageCount":       885
}
FieldTypeNotes
unlimitedbooltrue only for a key that is explicitly unlimited. balanceUsd and balanceMicroUsd are null in that case — never -1 or a very large number.
balanceUsdnumber|nullThe spendable USD balance of the key, in dollars. Every solve is charged to it at the per-service price. null when unlimited.
balanceMicroUsdinteger|nullThe same balance in micro-USD (1 USD = 1,000,000), exact. null when unlimited.
costPerSolveUsdnumberThe effective price per solve for this key — its own override if one was set, else the platform default rate.
costPer1kUsdnumberThe same price times 1,000. Always the same stored number presented two ways, never a second price.
usageCountnumberSolves counted on this key, lifetime. A history counter: nothing is charged or limited by it.

Every successful /Solver/solve response also carries a cost field — the exact USD charged for that one solve, at the price in effect for the key at the moment it was charged. See Response above.

Errors

Errors

Statuses are dry and specific. Most non-2xx here mean egress, not payload. This is the common set you will actually hit integrating against /Solver/solve — not the complete status/cause matrix. For a case not listed here, check the response schema in the OpenAPI specification or write to support@catmouse.ai.

StatusMeaningAction
400Malformed or incomplete request — empty ipsBody (the PScript-only mode needs ipsBody sent as an empty string, not omitted), missing Timezone/TimezoneOffset (geo is required by default), or a truncated ips uploadFix the field the error text names — it says exactly which one.
401Missing or invalid x-api-keyCheck the key; contact us to (re)issue.
403The key exists but is disabled or expiredContact us to re-enable or renew it.
402The USD balance on this key is used up (error insufficient_balance: top up your USD balance) — NOT a rate limit; no per-key request-rate throttle exists.Top up your USD balance.
422The ips.js body could not be parsed or decoded — a genuine solve refusal, not a guessed answerCapture the exact ips.js and report it; the error text names the parse failure.
500Solver task panicked (solver task panicked, or pscript_panic in PScript-only mode)Retry; report if persistent.
504The solve timed out (solve timed out; pscript_timeout in PScript-only mode)Retry; report if persistent.
503Fleet is shedding load (queue full / concurrency ceiling / deadline infeasible; pscript_busy in PScript-only mode)Back off and retry — this is capacity, not a problem with your request.
200 + empty /tlThe SITE declined the bag downstream — no x-kpsdk-r (EMPTY_R). Not a status from our API.Use a clean residential egress IP coherent with the site geo; send the current served version.
403 (site)Cloudflare on the TARGET SITE blocked your direct /fp, ips.js or /tl call — not our APIEgress IP problem — rotate IP.
EMPTY_R is almost always egress.
A byte-exact payload still gets declined from a burned IP or a stale version. Clean residential egress + the current served version first, then talk to us.
need help? contact us
at a glance

API facts

base url
https://kasadaapi.catmouse.ai
auth header
x-api-key: your key, sent on every request. A missing or wrong key returns 401.
format
JSON request and response bodies (content-type: application/json).
main endpoint
POST /Solver/solve
machine-readable spec
openapi.json, OpenAPI 3.1.0, importable into Postman, Insomnia or a code generator.
engines
Six, across three SDK families; see Supported engines.
support
Contact page: support@catmouse.ai
questions

Common API questions

How do I authenticate?

Send your key in the x-api-key header on every request to https://kasadaapi.catmouse.ai. Keys are scoped: usage, balance and metrics are all per key.

Where is the machine-readable spec?

At /openapi.json on this site, as OpenAPI 3.1.0. It lists the endpoint paths, request bodies, challenge parameters and error types.

What does a 200 with an empty /tl mean?

The target site declined the payload downstream, so no x-kpsdk-r came back (EMPTY_R). It is not a status from our API. The usual cause is the egress IP or a stale served version, so use a clean residential IP that matches the site geo and send the current served version.

What does a 503 mean?

The fleet is shedding load: the queue is full, the concurrency ceiling was hit, or the deadline could not be met. It is a capacity signal rather than a problem with your request, so back off and retry.

What does a 422 mean?

The ips.js body could not be parsed or decoded. It is a genuine solve refusal, not a guessed answer. Capture the exact ips.js and report it; the error text names the parse failure.

How is price stored?

Per key, as an integer number of micro-USD per solve (1 USD = 1,000,000 micro-USD), so counts in the millions never accumulate float error.

Last reviewed by Catmouse Engineering. Catmouse is intended for authorized testing and research on systems you own or have permission to test; see the acceptable use policy. Capability descriptions are not guarantees: measured results are on the status page.