> ## 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.

# Cybr Labs

> Implement Cybr Labs how you like: with Hosted Lab Pages, the SDK, or the REST API.

Cybr Labs provides your learners with isolated cloud environments for hands-on exercises. We manage the entire lifecycle of those labs, from creation to cleanup. This lets you offer practical training without building and maintaining the underlying lab infrastructure.

We offer three ways to implement Cybr Labs. Hosted Lab Pages provide a ready-made interface from Cybr. The SDK and REST API let you build your own. The SDK handles common tasks such as API requests, retries, and checking when a lab is ready. With the REST API, you write that code yourself.

The right approach depends on how much you want to customize and how much engineering time you want to invest.

## Choose your implementation approach

| Option | What you build | Engineering effort | Control over the interface |
| - | - | - | - |
| **Hosted Lab Pages** | A signed launch-link integration from your platform | Least work. Cybr supplies the lab page and built-in learner features. | Your platform simply generates a link to Cybr's lab page and we handle the rest. |
| **SDK** | Your own lab screens and server integration | The SDK handles a lot of complexity for you but still requires some engineering effort to implement in your own platform. | You design the lab experience inside of your product. Our SDK gives you ready-to-use methods to launch labs, track status, verify answers, and record completion. |
| **REST API** | Your own lab screens, server integration, and HTTP request handling | Your code handles all of the requests, errors, retries, etc. This is the most amount of work but the most flexibility. | The same interface freedom as the SDK, but you have to write the code that calls the API and handles responses, errors, retries, and polling. |

Both the SDK and REST API let you build the lab experience how you want. The SDK handles much of the API code for you. With the REST API, you write and control that code yourself.

## Hosted Lab Pages: use a ready-made lab interface

Your platform creates a signed launch link and sends the learner to a Cybr-hosted lab page. This option requires minimal engineering.

Cybr provides and maintains the lab page, including:

* **Lab controls and abuse prevention:** Launch and end controls, access limits, and lab status.
* **Environment access:** Connection details and optional web terminal access.
* **Learning content:** Lab guides, diagrams, and Q\&A.
* **Progress and verification:** Completion tracking and CTF flag verification.
* **Learner engagement:** Comments, discussions, and thumbs-up or thumbs-down feedback.
* **Custom branding:** Branding options for your organization.

Your integration identifies the learner and generates a signed link. We handle the rest. The [Hosted Lab Pages guide](/hosted/overview) explains the setup and learner experience.

<Frame caption="A Hosted Lab Page with sample data. Custom branding is available, with built-in Q&A, comments and discussions, diagrams, and optional web terminal access.">
  <img src="https://mintcdn.com/cybr-805cd2d2/TdVae3Ph_GnKHeaJ/images/hosted-lab-example.png?fit=max&auto=format&n=TdVae3Ph_GnKHeaJ&q=85&s=0f9298e6f74bc77d8877cea3c79a9924" alt="Cybr Hosted Lab Page with a guide, connection details, timer, end action, and web terminal." width="1440" height="1000" data-path="images/hosted-lab-example.png" />
</Frame>

## SDK or REST API: make labs part of your own product

With the SDK or REST API, learners access labs directly inside your website, course, or application. You decide how the lab experience looks and fits into their learning journey.

We manage the same lab lifecycle whichever approach you choose. Your application can access lab guides, connection details, CTF verification, and completion records through the SDK or API.

Compared with Hosted Lab Pages, you get more control and take on more engineering work:

* **Your own experience:** Design the layout, navigation, and interactions around your product, beyond the branding options of Hosted Lab Pages.
* **Your own learning flow:** Put a lab alongside a lesson, use completion to unlock content, or connect results to your progress tracking.
* **Your choice of features:** Show the guides, discussions, and other available lab features that fit your platform. You build the interface for each feature you include.
* **More to build and maintain:** Your team develops, tests, and maintains the lab interface and integration. Cybr continues to manage the lab environments.

This approach fits teams that want labs to feel like part of their product and can invest in development. Hosted Lab Pages gets learners into labs with less engineering and a lab interface that Cybr maintains.

### SDK: less API code for JavaScript and TypeScript

The public SDK package is coming soon. We will add installation details to the [SDK quickstart](/getting-started/quickstart#install-the-sdk) when it is available.

For JavaScript and TypeScript applications, our SDK gives you methods to launch labs, check their status, and track completion. It handles requests, retries, and waiting for labs to become ready, so you can focus on the experience inside your platform.

If you want web terminal access, the [terminal helper](/reference/terminal) manages the connection. Your application supplies the terminal view.

Start with the [SDK quickstart](/getting-started/quickstart).

### REST API: direct HTTP requests from your chosen language

The REST API gives you direct access to the same lab capabilities from your preferred language. It fits applications outside JavaScript and TypeScript, or teams that want to manage their own API integration.

You control how your application sends requests, handles errors, and waits for labs to become ready. That flexibility comes with more code to write and maintain. You can also combine direct REST requests with the SDK.

Start with the [REST API guide](/api-reference/overview) and its OpenAPI specification.

## Example of launching a lab with the SDK and with the API

These examples request the same deployment. Both run on a server and use the same organization API key.

`apiKey` represents a key from secure server configuration. It is not a browser value.

<Tabs>
  <Tab title="SDK">
    ```ts theme={null}
    import { CybrLabs } from '@cybr/labs-sdk'

    const cybr = CybrLabs.init({ key: apiKey })
    const deployment = await cybr.deployments.launch({
      labId: 'lab_id',
      learnerId: 'learner_uuid',
      membership: 'free'
    })
    ```
  </Tab>

  <Tab title="REST API">
    ```ts theme={null}
    const response = await fetch('https://api.cybr.com/api/v2/deployments', {
      method: 'POST',
      headers: {
        'X-API-Key': apiKey,
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        labId: 'lab_id',
        learnerId: 'learner_uuid',
        membership: 'free'
      })
    })

    if (!response.ok) {
      throw new Error(`Lab launch failed: ${response.status}`)
    }

    const deployment = await response.json()
    ```
  </Tab>
</Tabs>

The launch returns a deployment ID. Your application then waits for readiness before it shows the connection details.

The SDK provides `deployment.waitUntilReady()` for that wait. A direct REST integration polls the deployment status endpoint.

## Start with your chosen option

<CardGroup cols={3}>
  <Card title="Hosted Lab Pages" icon="window" href="/hosted/overview">Connect your platform to a Cybr-provided lab interface.</Card>
  <Card title="SDK quickstart" icon="rocket" href="/getting-started/quickstart">Build your interface with JavaScript or TypeScript.</Card>
  <Card title="REST API" icon="code" href="/api-reference/overview">Build your interface with direct HTTP requests.</Card>
</CardGroup>

Questions about setup or need help deciding the best approach for you? Contact [support@cybr.com](mailto:support@cybr.com).
