Using the Command Line

Run the following commands in the terminal to start a virtual computer session running Chromium

curl -X POST -H 'Authorization: Bearer <your-api-key>' \

You will get a response similar to the one below.

  "session_id": "52f968cb-6739-4197-83d7-2305fe5d6f54",
  "embed_url": "",
  "admin_token": "51JOZEEcMp4trCwbpTS3jjQc0lSmeAZpPfxioDqe73U"

You can visit the embed_url in your browser to access the virtual computer.

To manage the session, you can end a virtual computer session or list all active sessions.

Creating a Simple Application

Below is a simple application featuring a NodeJS backend that hits the REST API to start the virtual computer, and a frontend that leverages the NPM package to programmatically control it.

Check out our hello-world example on GitHub for the full example.

Server-Side Code

const express = require("express");
const axios = require("axios");
const app = express();
let computer;

// Get a virtual computer object. If no object exists, create it.
app.get("/computer", async (req, res) => {
  if (computer) {
  const resp = await
      headers: { Authorization: `Bearer ${process.env.HB_API_KEY}` },
  computer =;
app.listen(8080, () => console.log("Server start at http://localhost:8080"));

Client-Side Code

<div style="font-family: sans-serif">
  <button id="gotoYouTubeBtn">Open</button>
  <p>Current website: <span id="currentSite"></p>
<div id="virtualComputerDiv" style="height:720px;width:1280px"></div>
<script type="module">
  import Hyperbeam from ""
  const resp = await fetch("/computer")
  const data = await resp.json()
  const hb = await Hyperbeam(virtualComputerDiv, data.embed_url)
  gotoYouTubeBtn.addEventListener("click", () => {
    hb.tabs.update({ url: "" }) // Programmatic navigation
  hb.tabs.onUpdated.addListener((tabId, changeInfo) => {
    if (changeInfo.title)
      currentSite.innerText = changeInfo.title // Listen to tab changes