# WaveSpeed.ai autoreg Automated account registration on [wavespeed.ai](https://wavespeed.ai) via GitHub OAuth, with API-key extraction and trial-credit harvesting. ## What it does One account = one pass of the pipeline: 1. **GitHub login** — direct egress (datacenter IP triggers `sessions/verified-device`, residential/hosted-but-trusted IPs do not). 2. **WaveSpeed sign-in hop** — `GET /center/default/github/login?cf-turnstile-response=`. The page is protected by Cloudflare Turnstile (sitekey `0x4AAAAAADkE2yCxK2sRF0Q4`, action `login`), solved through 2captcha `TurnstileTaskProxyless` (~$0.003 per account, ~15-25 s). 3. **OAuth authorize + callback** → dashboard session cookies. 4. **Balance read** from `/dashboard` (`Current credit balance`) and **API key creation** via `POST /center/default/api/v1/accesskey/create` with `{"name": "..."}`. 5. Result appended to `bank.jsonl`: `{gh_login, balance, key, cookies, egress, secs}`. ## Measured behaviour (2026-11-01) | metric | value | |---|---| | accounts processed | 170 | | API keys created | 120 | | keys with `$1` trial balance | 7 (4 unique accounts) | | `$0` balance | 113 | | no-callback (GitHub side blocked) | 50 | | time per account | 20-80 s | | cost per account | ~$0.003 (captcha) | Key findings: - **The `$1` trial is granted probabilistically** (~3-8%), not by IP, subnet, geo or timing. Same egress IP produced both `$1` and `$0` accounts minutes apart, and a second signup from an already-used IP sometimes still got `$1`. Volume is the only lever. - **Turnstile is mandatory** — without a valid token the hop endpoint returns non-302. 2captcha `TurnstileTaskProxyless` is accepted; solving inside headless Camoufox is not. - **Key creation has no gate** — a key is issued even with `$0` balance, but every call then fails with `403 Insufficient balance` (LLM) or `400 Insufficient credits` (media). ## API surface of an issued key ``` LLM : https://llm.wavespeed.ai/v1/models https://llm.wavespeed.ai/v1/chat/completions (130 models) Media : https://api.wavespeed.ai/api/v3/ e.g. wavespeed-ai/flux-schnell ``` Cheapest models (price per 1M tokens, input/output): | model | input | output | |---|---|---| | qwen/qwen3.7-flash | $0.03 | $0.13 | | openai/gpt-5-nano | $0.05 | $0.40 | | anthropic/claude-haiku-5.5 | $0.10 | $0.50 | | openai/gpt-6-luna | $0.10 | $0.50 | $1 of trial credit ≈ 33M input tokens on qwen3.7-flash. ## Usage ```bash pip install -r requirements.txt export WS_TWOCAP_KEY=<2captcha key> export WS_PROXY=http://user:pass@host:8888 # egress for the WaveSpeed leg export WS_GH_POOL=/path/to/gh_pool.json # [{"login","password","totp"}, ...] export WS_BANK=bank.jsonl export WS_USED=used_gh.txt python wavespeed/ws_autoreg.py 25 # process 25 fresh accounts WS_KEYS=keys.txt python wavespeed/ws_keycheck.py ``` `gh_pool.json` is a list of GitHub accounts with `login`, `password` and `totp` secret. The script skips logins already listed in `WS_USED`. ## Files ``` wavespeed/ws_autoreg.py registration pipeline (GitHub OAuth + Turnstile + key creation) wavespeed/ws_keycheck.py key validation: catalogue, chat completion, media generation ``` ## Notes / pitfalls - `verified-device` on the GitHub login means the account needs an e-mail code — use another egress for the GitHub leg or a verified account, retrying does not help. - GitHub returns `422` on `/login/oauth/authorize` when the login session is not actually established (the earlier redirect chain was cut short) — always verify the login URL before the OAuth hop. - Console output must stay ASCII: Windows `cp1252` raises `UnicodeEncodeError` and kills the worker mid-wave. - Relative steps of the pipeline are independent: a failure at the callback stage still burns the GitHub login, so log every attempt to `WS_USED`. ## License MIT — see `LICENSE`.