# Human Browser — full reference for agents > Cloud browser agent. You send a goal in plain English; a real Chromium on a residential IP in the country you pick does the work — logs in, clicks, fills forms, solves CAPTCHAs, uploads files, reads pages — and returns the answer plus a live viewer URL that a human can watch and take over. One Bearer token works for A2A, MCP and REST. Hosts: `https://agent.humanbrowser.cloud` (A2A, MCP, sessions) · `https://humanbrowser.cloud` (account, docs, price list). Last verified against the production server: 5 Oct 2026. Use it when a plain HTTP fetch is not enough: logged-in dashboards, sites behind Cloudflare / Turnstile / DataDome / PerimeterX, geo-restricted pages, multi-step forms, uploads. Do not use it for public APIs or static pages a fetch can read. Legitimate, user-authorized tasks only (https://humanbrowser.cloud/terms). --- ## 1. Token and money - Sign in at https://humanbrowser.cloud/account with Google or an email link. Your token is shown there: `hb_live__<32 hex>`. - Send it as `Authorization: Bearer hb_live_…` on every call. Never put it in a URL. - No free credit. The first top-up can be $1 (card, once per account) — about 4 typical tasks. Later top-ups from $5, card or crypto. Prepaid, no subscription, the balance never expires. - Balance: `GET https://agent.humanbrowser.cloud/api/balance` with the Bearer header → `{balance_usd, …}`. - Card top-up from code: `POST https://humanbrowser.cloud/api/topup` `{"token":"hb_live_…","amount_usd":20}` → `{checkout_url}` — a human opens it in a browser. Crypto: on /account. ## 2. Pricing (price list v2, live since 2026-10-01 09:26 UTC) | What | Price | |---|---| | Agent step (one look-and-act decision), LLM included | $0.02 | | Browser time | $0.10 per hour, billed per second; sessions under 30 s and human-takeover time are free | | Solved CAPTCHA | $0.005 | | Residential traffic | $4 per GB, metered per session | - If you pin a large model yourself and one step costs more than $0.02 in model tokens, that step is billed at its token cost × 1.3. It never fires on the default model. - Median successful customer task (Sep 2026, re-priced at v2): **$0.24** (p25 $0.12, p75 $0.39), about 8 agent steps. - Machine-readable: https://humanbrowser.cloud/api/plans · live session cost: `actions/get_cost_snapshot`. - Refused tasks (goal_rejected, circuit_open, credential-in-goal) are not billed. ## 3. Run a task over A2A (recommended) Endpoint: `POST https://agent.humanbrowser.cloud/a2a` — JSON-RPC 2.0, A2A v0.3 wire format (method names like `message/send`, parts carry `kind`). Agent card: `GET https://agent.humanbrowser.cloud/.well-known/agent-card.json` (public). ### 3.1 Send ```bash curl -s https://agent.humanbrowser.cloud/a2a \ -H "Authorization: Bearer $HB_TOKEN" -H 'Content-Type: application/json' \ -d '{"jsonrpc":"2.0","id":1,"method":"message/send","params":{"message":{"role":"user","messageId":"m1", "parts":[{"kind":"text","text":"Open https://news.ycombinator.com and return the top 3 story titles as JSON."}]}}}' ``` The reply comes back within seconds, as soon as the browser is up. The run continues in the background. ```json {"jsonrpc":"2.0","id":1,"result":{ "id":"t_27b88f806e7c28e6", "contextId":"ctx_…", "kind":"task", "status":{"state":"working","message":{"role":"agent","parts":[{"kind":"text","text":"Session s_… ready. Live viewer: https://humanbrowser.cloud/a/s_…?k=…"}]}}, "metadata":{"sessionId":"s_…","viewerUrl":"https://humanbrowser.cloud/a/s_…?k=…","profile":"ycombinator","profile_inferred":true,"cost":{"usd":0}}}} ``` Show `metadata.viewerUrl` to your user: they can watch live and take over the mouse. Treat it like a password — the `k=` key opens the session. If the task finishes or fails before the browser is reported up, you get the terminal Task directly. ### 3.2 Poll ```bash curl -s https://agent.humanbrowser.cloud/a2a -H "Authorization: Bearer $HB_TOKEN" -H 'Content-Type: application/json' \ -d '{"jsonrpc":"2.0","id":2,"method":"tasks/get","params":{"id":"t_27b88f806e7c28e6"}}' ``` - Poll every 3-5 seconds. `tasks/get` returns at once (no long-poll). - States: `submitted` → `working` → `completed` | `failed` | `canceled` | `input-required`. Only the last four are terminal. - `working` means it is running. Do not tell your user it failed or "got stuck on a CAPTCHA". `status.message` is a progress line like `Step 12/100 on example.com — Submit the search`; quote it as is. - Typical duration: 20-90 s on a warm profile, 3-8 min for a first login on a hostile site. - Instead of polling: `message/stream` (same params, SSE: the Task, then `status-update` / `artifact-update` events until a final one), or `metadata.callback_url` (https) to have the final Task POSTed to you. ### 3.3 Read the result ```json "status":{"state":"completed"}, "metadata":{ "outcome":{"success":true,"result":"{\"titles\":[\"…\",\"…\",\"…\"]}","step_count":1,"duration_ms":41000,"cost":{…},"blocks":[]}, "recordUrl":"https://humanbrowser.cloud/a/s_…?k=…&replay=1" } ``` - Answer: `metadata.outcome.result` (text, up to 4000 chars; ask for JSON in the goal if you want JSON). Also `artifacts[0].parts[0].text`; `artifacts[0].parts[1].data` has `success, step_count, cost, current_url, produced_files, record_url`. - Files the run downloaded: `kind:"file"` parts on the artifact and `metadata.outcome.produced_files` (`{name, bytes, mime, url}`). - `metadata.recordUrl` replays the run after it ended. - Finished tasks are kept for **30 minutes**, then `tasks/get` returns `-32001 Task not found`. Save what you need. - Cancel: `{"jsonrpc":"2.0","id":3,"method":"tasks/cancel","params":{"id":"t_…"}}`. ### 3.4 Optional metadata Put these in `params.metadata` or `message.metadata` (message wins). Leave them out unless you need them — the server picks engine, model, mode, proxy and CAPTCHA handling from the goal and per-site rules. | Key | Meaning | |---|---| | `country` | Exit country, ISO-2 lower case (`us`, `gb`, `de`, `jp`, `ru`, …). 75 residential countries; live list: `actions/list_countries` | | `profile` | Saved browser identity (cookies, logins). Default: inferred from the first domain in the goal (`cp.adsy.com` → `adsy`). Set it to keep several identities on one site | | `force_new` | `true` = fresh isolated browser instead of reusing the live one for this profile | | `mobile_ua` | `true` = iPhone Safari fingerprint and viewport | | `callback_url` | https URL; the final Task is POSTed there once | | `overrides` | `{"submit_max": 1-10, "allow_resubmit": true}` — loosen the submit guard after you verified a submission did not land | | `model`, `engine`, `mode`, `warmup` | Power-user overrides. Only with a measured reason (`actions/list_models`, `actions/list_engines`) | ### 3.5 Sessions, profiles, parallel work - Tasks on the same profile reuse the same live browser — still logged in — and queue behind each other (up to 20 waiting). Different profiles run in parallel. - Logins persist: the first task on a site logs in, later tasks on that profile land already authenticated. - Up to 10 concurrent sessions per token (free/trial plan: 2). - Hard limits per task: 2 hours, 100 agent steps. ## 4. Credentials and exact text Never put a password, OTP or card number in the goal text — the model reads the goal. Pass secrets in a DataPart marked sensitive, with **flat string values**, and refer to each key as `` in the goal: ```json {"jsonrpc":"2.0","id":1,"method":"message/send","params":{"message":{"role":"user","messageId":"m1","parts":[ {"kind":"text","text":"Log into https://app.example.com as with and return my last 5 invoices as JSON."}, {"kind":"data","metadata":{"sensitive":true},"data":{"email":"me@example.com","password":"S3cret!"}} ]}}} ``` - The real value is typed into the page at action time. It never reaches the model, the logs or the result. - Shape: `data` is a flat map of string → string. (A single wrapper like `{"sensitive":{…}}` is unwrapped too, but use the flat form.) - URLs are not substituted. Write URLs plainly in the goal. - A secret written straight into the goal text may be refused (`-32602`, detail `credential-in-goal`), and if it is not refused the model sees it. Use the DataPart. - Codes from email: add `hb_otp_imap_user`, `hb_otp_imap_pass` (and `hb_otp_imap_host`, default `imap.gmail.com`) to the same DataPart; the agent reads the code or magic link from that inbox itself. Use a mailbox you control (Gmail: an app password). - Text that must land character for character (a pitch, a comment): wrap it in the goal as `…`. The model only sees a placeholder, so it cannot rewrite it. - Non-secret structured input (form fields): a DataPart without `sensitive` — it is added to the goal as context. - REST `/run` (section 8): top-level `"sensitive_data": {"password": "…"}`. ## 5. When the agent needs you (input-required) The agent pauses when it needs something it cannot get itself: an OTP, a magic link, a choice, approval before paying. - The task goes to `input-required` (terminal for this response; an SSE stream closes). - `metadata.input_required` = `{req_id, question, kind, sensitive, timeout_s, deadline, choice, summary}`. The status message carries the question and a ready `resume_example`. - **Answer while it is still `input-required`** (before `deadline`): ```json {"jsonrpc":"2.0","id":7,"method":"message/send","params":{"message":{"role":"user","messageId":"m7", "referenceTaskIds":["t_…"], "metadata":{"in_reply_to":"req_…"}, "parts":[{"kind":"text","text":"493817"}]}}} ``` To decline: `"parts":[{"kind":"data","data":{"decline":true,"reason":"no access"}}]`. Also accepted: `message.taskId` set to the paused task, or a re-send on the same `contextId`. The task continues in the same browser; keep polling. - A human can also answer in the live viewer. First answer wins. - No answer by the deadline (`timeout_s`, 5-1800 s, chosen by the agent) → the question is declined and the agent finishes without it. - **If the task is already terminal, do not try to resume.** Start a new task whose goal carries the full context plus the answer, e.g. "Continue the order on example.com; the owner already approved paying $12.40; the code is ". ## 6. Errors | You get | Meaning | What to do | |---|---|---| | HTTP 401, JSON-RPC `-32001` `Unauthorized` / `Token revoked` | Missing, wrong or revoked token | Fix the header | | HTTP 402, `-32001` `Payment Required`, `data.reason:"balance-depleted"`, `data.topup_url` | Balance used up (a task needs at least $0.10 to start) | Top up | | `-32602` `Invalid params`, detail `goal_rejected (): …` | The goal is not an instruction: `empty_goal`, `no_instruction`, `junk_goal` (e.g. "undefined"), `unfilled_template` (`${name}` left in), `goal_is_code` (Selenium/Playwright code). Not billed | Rewrite the goal in plain language. Do not retry as is | | `-32602`, detail `credential-in-goal (kind=…)` | A secret in the goal text | Move it to a sensitive DataPart (section 4) | | Task `failed`, `metadata.error.code:"circuit_open"` (`host`, `class`, `failures`, `resets_at`, `billed:false`) | This token failed 3 times in 24 h on that host for the same non-retryable reason (account locked, wrong password …). Refused before launch | Fix the cause (credentials, unlock the account). Resets after a success or 24 h. Retrying changes nothing | | Task `failed`, `metadata.error.code:"session-cap"` | Too many concurrent sessions on this token | Wait for one to finish, or reuse a profile | | Task `failed`, `metadata.error.code:"capacity"` / `"proxy_unavailable"` | Server busy / exit pool degraded | Retry in 60-90 s | | Task `failed`, `metadata.error.code:"queue-full"` | 20 tasks already waiting on that session | Wait, or use another profile | | `-32601` `Method not found` | Custom actions need the prefix: `actions/list_countries`, not `list_countries` | Add `actions/` | | `-32001` `Task not found` | Unknown id, or the task ended more than 30 min ago | Start a new task | | `-32002` `Task not in input-required state` | You answered a task that is no longer paused | See section 5 | On a `failed` task, read before retrying: - `metadata.outcome.result` — what the agent said. - `metadata.outcome.blocks` — guard stops `{code, retryable, how_to_retry, url, step}`: `submit_guard` (retryable:false — check whether the submission landed before re-running with `overrides`), `repeat_action`, `no_effect_click`, `scroll_no_progress`, `navigate_loop`, `captcha_unsolved`, `input_not_binding`, `account_lockdown` (a human must clear a site checkpoint in this profile). - `metadata.postmortem` — arrives ~30 s after the failure: `{root_cause_category, observed_blockers, working_strategies, retry_recommendation}`. - `actions/get_page_diagnostics {"taskId":"t_…"}` — `verdict`: `ok` | `degraded` | `page_did_not_start` | `broken_by_us` (our side: change country or report it; retrying the same way will not help). Report what these say. Do not invent a cause such as "blocked by bot protection". ## 7. Custom actions (same endpoint, method `actions/`) | Method | Params | Returns | |---|---|---| | `actions/list_countries` | — | 75 exit countries with pool health | | `actions/list_models` / `actions/list_engines` / `actions/list_remote_providers` | — | What can be pinned (rarely needed) | | `actions/switch_proxy_country` | `taskId`, `country` | Relaunches the live session on a new exit (~5 s), keeps the profile | | `actions/get_cost_snapshot` | `taskId` | Cost so far + balance | | `actions/get_page_diagnostics` | `taskId` | Why a page looks broken (see section 6) | | `actions/get_screenshots` | `taskId`, `mode`: `highlights` (default) / `index` / `both` | Frame links (not bytes), `live_url`, `video_url`. Frames can show typed data — treat links like the viewer URL | | `actions/list_learned_apis` | `domain?` | Internal API endpoints your own sessions observed on a site | | `actions/call_site_api` | `taskId`, `url`, `method`, `body?` | Calls the site's own API from inside your logged-in page (same origin only) | | `actions/upload_file` | `taskId`, `source` (URL or base64), `selector?` / `label?` | Puts a file on a page's file input | | `actions/set_profile_name` | `taskId`, `name` | Display name for the profile | | `actions/discover_endpoints` → `actions/get_discovery_result` | `taskId`, `url`, … → `job_id` | XHR/fetch endpoints a page calls (no LLM, no step charge) | Example: `{"jsonrpc":"2.0","id":1,"method":"actions/list_countries","params":{}}` ## 8. Files - In: attach `{"kind":"file","file":{"name":"cover.jpg","mimeType":"image/jpeg","uri":"https://…"}}` next to the text part and say in the goal where to upload it. `uri` = public http(s) URL (up to 25 MB), or `bytes` = base64 (the whole request must stay under 8 MB). Max 8 files per message. Or just name a public URL in the goal — the agent can fetch it. - The agent cannot read your local disk. Give a URL or bytes, never a path. - Out: see 3.3 (`produced_files`). ## 9. MCP Remote server (nothing to install): `https://agent.humanbrowser.cloud/mcp`, Streamable HTTP, stateless. ```json {"mcpServers":{"humanbrowser":{"url":"https://agent.humanbrowser.cloud/mcp","headers":{"Authorization":"Bearer hb_live_…"}}}} ``` - Auth: Bearer token, or OAuth 2.1 for clients that do it themselves (authorization code + PKCE S256, dynamic client registration at `/register`, metadata at `/.well-known/oauth-authorization-server` and `/.well-known/oauth-protected-resource`, scopes `mcp:run mcp:read`; the 401 carries `resource_metadata`). - Tools: - `humanbrowser_run {goal, country?, profile?, sensitive_data?}` — returns within ~3 s with `task_id` and `viewer_url`; does not wait for the result. `sensitive_data` = flat map, referenced as `` in the goal (section 4). - `humanbrowser_status {task_id, wait_seconds?}` — state, `result` when completed, `error` / `error_detail` when failed. `wait_seconds` (0-60) long-polls for the next change. Call it in a loop until `completed` / `failed` / `canceled`. - `humanbrowser_viewer_url {task_id}` — just the live link. - `input-required` is forwarded to your client as an MCP elicitation when the client supports it; otherwise `humanbrowser_status` returns an error that names the question and the viewer URL. - 60 requests per minute per token. - Local stdio alternative: `npx -y @virixlabs/humanbrowser mcp` with env `HB_TOKEN=hb_live_…`. ## 10. REST (low level) A2A wraps this; use it only if you need direct session control. Same Bearer token. - `POST https://agent.humanbrowser.cloud/spawn` `{proxy_country?, profile?, mobile_ua?, force_new?}` → `{sessionId, password, base:"/s/", viewerUrl, profile, engine}` - `POST https://agent.humanbrowser.cloud/s//run?k=` `{goal, sensitive_data?, files?, priority?:"high", overrides?}` → 200 started, or 202 `{queued:true, task_id, position}` when the session is busy. Refusals: 400 `{error:"goal_rejected", reason, message, billed:false}`, 409 `{error:"circuit_open", host, class, failures, resets_at, billed:false}`, 400 `credential-in-goal`, 429 `queue-full`. - `GET /s//status?k=…` → `{state, task_id, queue_depth, step_count, last_result, last_success, session_billed_usd, blocks, …}` - `POST /s//input?k=…` answers a pending question; `POST /s//proxy/switch?k=…` `{country}`; `GET /s//diagnostics?k=…`; `GET /s//screenshot/highlights?k=…`. - Spawn refusals: 402 `balance-depleted`, 429 `session-cap`, 503 `capacity` / `proxy_unavailable` (with `Retry-After`). ## 11. Other clients - ChatGPT: custom GPT at https://humanbrowser.cloud/chatgpt - npm SDK + CLI + MCP: `@virixlabs/humanbrowser` — https://www.npmjs.com/package/@virixlabs/humanbrowser - OpenAPI (account endpoints + /a2a): https://humanbrowser.cloud/openapi.json ## 12. Contact - general@virixlabs.com · Telegram @virixlabs - Virix Ltd, 167-169 Great Portland Street, 5th Floor, London W1W 5PF, UK (Companies House 16325097) - Terms https://humanbrowser.cloud/terms · Privacy https://humanbrowser.cloud/privacy · Refunds https://humanbrowser.cloud/refund