# powstepowita api docs solve roblox pow over https. one call per solve, thats it. works from any language, u dont need my .py file. base url: `https://powstepowita.com` auth: one header `X-Api-Key: pow_...` on every solve --- ## POST /v1/solve ``` POST https://powstepowita.com/v1/solve Content-Type: application/json X-Api-Key: pow_YOURKEY {"a": "1039200696199", "n": "1293934171...", "t": 400000} ``` fields: - `a` : string, base10 digits, max 1024 - `n` : string, base10 digits, max 1024 (challenge modulus) - `t` : number, 1 to the live difficulty cap. The current value is served as `max_t` by `GET /api/stats.json` and shown in the status line on the site -- read it there rather than hardcoding, it is an operational knob and it moves. Anything above the cap returns 400 and is never charged. 200 response: ```json {"result": "611907684108647...", "balance": 9995} ``` `result` = the answer, send it to the game exactly as it comes. `balance` = credits left after this solve. ### errors every error is `{"error": "..."}` - **400** bad body / not digits / t out of range. giant challenges (t over 10m) land here, we skip them instantly. not charged. just grab a new challenge from the game - **401** key missing or unknown - **402** out of credits or key expired - **403** key revoked - **429** too many reqs from ur ip, wait like 2-5s and retry. not charged - **503** all workers busy (happens under heavy load). retry after ~1s. not charged - **504** solve timed out. dont spam retry on this one, it mightve completed. check ur balance first, then retry once. not charged on timeout billing: 1 credit per SUCCESSFUL solve. nothing else ever charges. rejected, ratelimited, busy, timed out = all free. --- ## GET /key/ur_key (balance check) in a browser its a page. add `?format=json` (or Accept: application/json) for json: ```json {"id": "k_...", "note": "...", "original": 10000, "used": 5, "remaining": 9995, "revoked": false, "unlimited": false} ``` --- ## perf tips if ur writing ur own client - normal solve answers in 100-500ms. set timeout to 30s+ - REUSE the connection (keep alive / session object). new tcp+tls handshake per solve is the number one thing that makes wrappers slow - on 503/429 back off a bit (1-4s). dont hammer, the ip limit counts reqs - threads are fine - a and n MUST be strings (too big for js/luau ints). t is a number --- ## examples ### curl ```bash curl -X POST https://powstepowita.com/v1/solve \ -H "Content-Type: application/json" \ -H "X-Api-Key: pow_YOURKEY" \ -d '{"a":"1039200696199","n":"1293934171...","t":400000}' ``` ### python (no packages needed) ```python import json, urllib.request def pow_solve(key, a, n, t): req = urllib.request.Request( "https://powstepowita.com/v1/solve", data=json.dumps({"a": str(a), "n": str(n), "t": t}).encode(), headers={"Content-Type": "application/json", "X-Api-Key": key}, method="POST") with urllib.request.urlopen(req, timeout=30) as r: return json.loads(r.read()) out = pow_solve("pow_YOURKEY", 1039200696199, N, 400000) print(out["result"], out["balance"]) ``` ### javascript ```js const res = await fetch("https://powstepowita.com/v1/solve", { method: "POST", headers: { "Content-Type": "application/json", "X-Api-Key": KEY }, body: JSON.stringify({ a: String(a), n: String(n), t: t }), }); const data = await res.json(); if (!res.ok) throw new Error(res.status + ": " + data.error); console.log(data.result, data.balance); ``` ### luau (executor request) ```lua local HttpService = game:GetService("HttpService") local res = request({ Url = "https://powstepowita.com/v1/solve", Method = "POST", Headers = { ["Content-Type"] = "application/json", ["X-Api-Key"] = KEY }, Body = HttpService:JSONEncode({ a = tostring(a), n = tostring(n), t = t }), }) local data = HttpService:JSONDecode(res.Body) if res.StatusCode ~= 200 then error(res.StatusCode .. ": " .. tostring(data.error)) end return data.result, data.balance ``` --- ## tldr for wrapper devs 1. POST /v1/solve with X-Api-Key, body {a, n, t}. a/n strings, t max 10m 2. take result from the json, send it to the game 3. 503/429 = retry gently. 400 = giant challenge, get a new one 4. only good solves charge. thats the whole api