# camb-autoreg Autoreg for [studio.camb.ai](https://studio.camb.ai) — dubbing / TTS service with a refillable free plan. ## Economics (verified on live accounts, 2026-11-01) * Free product: **5000 credits**, `is_refill_based: true` (monthly refill). * Balance: `GET https://client.camb.ai/payments/credits/team/` -> `{"credits_left":5000.0,"is_free_plan":true}`. * Dub job (job_type 1) = 550 credits -> ~9 dubs per account. TTS phrase ~3 credits. * 100k credits pack = $50 -> 1 credit ~= $0.0005 -> free account ~= $2.5 of API value. ## Flow 1. `https://studio.camb.ai/public/onboarding` is the only signup entry (`/signup`, `/register` return 404 shells). 2. Form: `input[name=name]`, `input[type=email]`, `input[type=password]` (10+ chars, upper+lower+digit+symbol), consent checkbox (Radix `button[role=checkbox]` — click by bbox). 3. Turnstile sitekey `0x4AAAAAAB7HkZD89uSr-6VZ`, token lands in `input[name=cf-turnstile-response]` (~752 chars). Wait for it before submit. 4. `POST https://client.camb.ai/uservault/auth/signup` -> `200 {"payload":{"access_token":"..."}}`; token works before email verification. 5. Mail from `help@camb.ai`, subject `Email Verification`. **Code is 6 alphanumeric chars** (`LSQX01`), not digits. 6. `PATCH /uservault/users/verification/mail/verify?verification_code=` -> `{"verified": true}`. 7. Onboarding "Who are you?" -> Skip -> `/workspace//home`. 8. team_id: `POST /uservault/auth/refresh-token` (credentials include) -> `payload.access_token` -> `GET /v1/teams/` with bearer -> `payload.teams[0].id`. 9. Key: `/workspace//api-keys` -> Create New API Key -> `input[name=api-key-name]` -> Create Secret Key -> read 30+ char value. 10. Working call: `POST https://client.camb.ai/apis/tts-stream` with header `x-api-key` and body `{"text","language":"en-us","voice_id":147320,"speech_model":"mars-flash","output_configuration":{"format":"wav"}}`. Credits spent come back in `x-credits-required`. ## Pitfalls * No Turnstile token -> `400 "Turnstile token not found"` on both signup and login. Browser farm only. * Verification mail quota: `GET /uservault/users/verification/mail/quota-status` -> `can_send:false`, `block_type:"soft_block"`, ~2 min window. Do not hammer Resend. * Match the submit button by exact text `create account`; a loose "sign up" match hits the Google button. * Clear cookies AND localStorage before signup, otherwise the onboarding form may not render. * `pg.close()` on the last tab kills CDP Chrome; reattach with `ensure_chrome(port, prof)`. * Vercel Security Checkpoint: curl/curl_cffi get `429` + HTML stub; only real Chrome over CDP passes. The API host `client.camb.ai` is reachable directly — do recon there. ## Files * `farm.py` — worker: signup -> code via VPS mailbox -> verify -> team_id -> api key -> TTS check -> bank row. * `chr.py` — `ensure_chrome(port=9242)` CDP helper. * `camb_shim.py` — OpenAI-compatible `/v1/audio/speech` shim over the key pool (round-robin, dead-key blacklist, 429 cooldown). ## Env ``` CAMB_VPS=root@your-vps # ssh host able to read the mailbox CAMB_MAIL_READER=/root/camb_code.py CAMB_KEYS=/opt/camb-shim/camb_keys.json CAMB_SHIM_PORT=8822 ```