> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anchorbrowser.io/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Anchor Browser is cloud browser infrastructure for AI agents and automation: browser sessions you control over CDP or REST, natural-language web tasks, versioned automation tasks, managed authentication into third-party web apps (identities with MFA), persistent volumes and profiles, recordings, live view, batch sessions, webhooks, and network options including residential proxies, extra stealth, and captcha solving for sites that block standard browsers. AI agents should start at https://docs.anchorbrowser.io/for-agents, then create an API key at https://app.anchorbrowser.io/api-keys. Read the for-agents page before authentication or API calls.

# Dedicated Sticky IP

> Reserve a fixed IP address for a specific profile.

A **Dedicated Sticky IP** ensures that a specific profile uses by default the same IP address, reserved exclusively for that profile. This is helpful when IP consistency is required across sessions.

> [!NOTE]
>
> [Extra Stealth](https://docs.anchorbrowser.io/essentials/stealth.md) mode is automatically enabled for all sessions using a Dedicated Sticky IP profile.

**1. Create a profile with a dedicated sticky IP**

Use the [Create Profile API](https://docs.anchorbrowser.io/api-reference/profiles/create-profile.md?playground=open) to create a profile with a dedicated sticky IP by setting `dedicated_sticky_ip` to `true`:

```javascript node.js theme={null}
import { client, Profiles } from 'anchorbrowser';

client.setConfig({ auth: () => process.env.ANCHOR_API_KEY });

const profile = await Profiles.createProfile({
  body: {
    name: 'my-sticky-profile',
    dedicated_sticky_ip: true,
  },
});

console.log('Profile created:', profile.data);
```

```python python theme={null}
from anchorbrowser import Anchorbrowser
import os

anchor_client = Anchorbrowser(api_key=os.getenv("ANCHOR_API_KEY"))

profile = anchor_client.profiles.create_profile(
    name="my-sticky-profile",
    dedicated_sticky_ip=True,
)

print("Profile created:", profile.data)
```

This allocates a dedicated IP that is not shared with other profiles.

**2. Start a session using the profile**

Start a browser session with the profile. Set `persist` to `true` so the browser state (cookies, localStorage, etc.) is saved when the session ends.

```javascript node.js theme={null}
import { client, Sessions } from 'anchorbrowser';

client.setConfig({ auth: () => process.env.ANCHOR_API_KEY });

const session = await Sessions.createSession({
  body: {
    browser: {
      profile: {
        name: 'my-sticky-profile',
        persist: true,
      },
    },
  },
});

console.log('Session created:', session.data);
```

```python python theme={null}
from anchorbrowser import Anchorbrowser
import os

anchor_client = Anchorbrowser(api_key=os.getenv("ANCHOR_API_KEY"))

session = anchor_client.sessions.create_session(
    browser={
        "profile": {
            "name": "my-sticky-profile",
            "persist": True,
        }
    }
)

print("Session created:", session.data)
```

The session will automatically use the reserved sticky IP and Extra Stealth mode.

**3. Do your work in the session**

Connect to the session via live view, CDP, or the session view in the dashboard. Log in to accounts, configure settings, or perform any actions you need.

When you're done, close the session. The profile state (cookies, localStorage, etc.) will be persisted automatically because `persist` was set to `true`.

**4. Start future sessions with the same profile**

Any new session started with this profile will use the same dedicated sticky IP and have all the saved browser state from previous sessions.

**5. Override the IP with your own proxy (optional)**

To override the default sticky IP, set the `proxy` field when using the [Start Browser Session API](https://docs.anchorbrowser.io/api-reference/browser-sessions/start-browser-session.md). See [Bring Your Own Proxy](https://docs.anchorbrowser.io/advanced/bring-your-own-proxy.md) for configuration details.

## Mac hardware

Sessions that run on Mac hardware (`session.hardware: "mac"`) can use a profile with a dedicated sticky IP once the capability is enabled for your project. Nothing changes in the request: the session restores the profile before it is ready, routes through the profile's dedicated IP, and persists the profile when it ends.

> [!NOTE]
>
> On Mac hardware the saved state is written when the session ends (`DELETE` the session, let it time out, or close the browser over CDP). `GET /v1/profiles/{name}` reports `status: "ready"` once the new state is stored; poll it before starting the next session on the same profile if you depend on the latest state. Until the capability is enabled for your project, Mac sessions that use a profile answer `400` with `browser.profile is not available on hardware 'mac'`, preceded by `profile-managed sticky proxies are not available on hardware 'mac'` when the profile has a dedicated sticky IP; the `(set by your project's enforced configuration)` suffix only says the refused setting came from your project's enforced configuration.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.