> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://platform.bctrl.ai/llms.txt.
> For full documentation content, see https://platform.bctrl.ai/llms-full.txt.

# CAPTCHA

> Configure browser runtimes to handle supported CAPTCHA challenges.

BCTRL can help browser runtimes handle supported CAPTCHA challenges during automation. Configure CAPTCHA behavior at runtime launch, then continue using your native browser framework over CDP.

## Enable CAPTCHA solving

CAPTCHA auto-solving defaults to `false`.

```ts
const runtime = await space.runtimes.browser.launch({
  name: "signup-flow",
  config: {
    captcha: {
      autoSolve: true,
    },
  },
});
```

Then connect normally.

```ts
const connection = await runtime.connections.create({
  protocol: "cdp",
});
```

If you are controlling the runtime through CDP, either enable `captcha.autoSolve` before creating the runtime or release the connection before starting a manual CAPTCHA invocation.

## Manual solve invocation

```ts
const invocation = await runtime.invocations.create({
  provider: "bctrl",
  method: "solveCaptcha",
  target: {
    type: "browser_page",
    page: "active",
  },
  input: {
    timeoutMs: 60_000,
  },
});
```

## Supported challenge families

Support can include common challenge types such as reCAPTCHA, hCaptcha, Cloudflare Turnstile, GeeTest, Arkose, and DataDome, depending on site behavior and solver availability.

## Observability

CAPTCHA attempts appear in run events when BCTRL can observe them. Use run events and artifacts to debug whether a challenge was detected, solved, skipped, or failed.

```ts
const run = await runtime.currentRun();

const { events } = await run.events.list({
  kind: ["captcha"],
});
```

## Related

* [Run Events](/sdk/observability/run-events)
* [Runs](/sdk/core-concepts/runs)
* [Browser Runtimes](/sdk/browser-runtimes/overview)