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

# @alibi/sdk-node/core

> Middleware — generated from packages/sdk-node/src/core.ts.

Alibi Express middleware — record & verify modes (parity with Python SDK).

*Source:* [`packages/sdk-node/src/core.ts`](https://github.com/valid22/alibi-ai/blob/main/packages/sdk-node/src/core.ts)

## `AlibiInitOptions`

| Property | Type |
| - | - |
| `project` | `string` |
| `plugins?` | `AlibiPlugin[]` |
| `controlPlaneUrl?` | `string` |
| `sandboxHeader?` | `string` |
| `sessionId?` | `string` |
| `runId?` | `string` |
| `caseId?` | `string` |
| `sandboxId?` | `string` |
| `failClosed?` | `boolean` |
| `redact?` | `boolean` |

## `AlibiHandle`

| Property | Type |
| - | - |
| `init` | `init(options: AlibiInitOptions): void;` |
| `middleware` | `middleware(): RequestHandler;` |
| `getMode` | `getMode(req?: Request): AlibiMode;` |
| `resetVerifyState` | `resetVerifyState(): void;` |
| `client` | `client(): ControlPlaneClient \| null;` |
| `captureBaseline` | `captureBaseline(opts?: \{ label?: string; \}): Promise<Record<string, SnapshotHandle>>;` |
| `options` | `AlibiInitOptions \| null` |

## `Alibi`

### `options`

```ts theme={null}
options: AlibiInitOptions | null
```

### `init`

```ts theme={null}
init(options: AlibiInitOptions): void
```

**Parameters**

| Name | Type |
| - | - |
| `options` | `AlibiInitOptions` |

### `resetVerifyState`

```ts theme={null}
resetVerifyState(): void
```

### `getMode`

```ts theme={null}
getMode(req?: Request): AlibiMode
```

**Parameters**

| Name | Type |
| - | - |
| `req` | `Request` |

### `client`

```ts theme={null}
client(): ControlPlaneClient | null
```

### `resolveSandbox`

```ts theme={null}
async resolveSandbox(
    sandboxId: string | undefined,
  ): Promise<SandboxBinding | undefined>
```

**Parameters**

| Name | Type |
| - | - |
| `sandboxId` | `string \| undefined` |

### `middleware`

```ts theme={null}
middleware(): RequestHandler
```

### `captureBaseline`

```ts theme={null}
async captureBaseline(opts?: {
    label?: string;
  }): Promise<Record<string, SnapshotHandle>>
```

**Parameters**

| Name | Type |
| - | - |
| `opts` | `\{ label?: string; \}` |


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