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

> ## Agent Instructions
> These docs cover learner integrations through Hosted Lab Pages, the SDK, and the REST API. Content management is outside this integration scope.
> Read the setup page for the chosen approach before implementing it. Keep organization API keys and hosted mint secrets on the server.
> The public SDK is coming soon. Check the SDK quickstart for current availability. Do not invent installation commands or direct readers to a private package.
> Cybr provides completion tracking and CTF verification. The integrating platform decides whether to award points.

# SDK quickstart

> Preview the SDK integration flow and check public package availability.

The server SDK supports JavaScript and TypeScript with ESM or CommonJS imports. The examples show how your server launches and manages a lab.

## Requirements

The examples require:

* An organization account with Cybr Labs
* An organization API key
* A server runtime with `fetch`, such as Node.js 18 or later.

## Install the SDK

<Note>
  The public SDK package is coming soon. We will add installation instructions here when the package is available.
</Note>

The examples use the intended `@cybr/labs-sdk` import. They document the integration flow without assuming that you can install the package yet.

For a direct HTTP integration, see the [REST API quickstart](/api-reference/quickstart).

## Create a server client

Read the API key from secure server configuration. Pass that value as `apiKey`:

```ts theme={null}
import { CybrLabs } from '@cybr/labs-sdk'

const cybr = CybrLabs.init({ key: apiKey })
```

The configuration source depends on your server runtime. The examples do not require a particular hosting provider.

## Launch a lab

1. List the available labs:

```ts theme={null}
const labs = await cybr.labs.list()
```

2. Select an activated lab from your catalog.
3. Resolve the learner ID from your server session.
4. Launch the lab:

```ts theme={null}
const deployment = await cybr.deployments.launch({
  labId,
  learnerId,
  membership: 'free'
})
```

5. Store `deployment.id` with the learner session.
6. Wait for the environment:

```ts theme={null}
const ready = await deployment.waitUntilReady({
  onProgress: (status) => console.log(status.status)
})
```

7. Return the required connection details from `ready.outputs` to that learner.

Outputs can contain passwords or other secrets. They do not belong in application logs or analytics.

## End the lab

When the learner selects your end action, call `destroy()`:

```ts theme={null}
await deployment.destroy()
```

Cybr also ends the environment at its time limit. An ended environment does not count as learner completion.

## Next steps

The [launch guide](/guides/launching-labs) covers saved deployments and outputs. The [terminal guide](/guides/terminals) adds a browser terminal.

The [completion guide](/guides/completion-and-scoring) explains completion and CTF verification.
