Skip to main content

Starting a session

Hyperbeam virtual computers can run numerous applications:

Chromium
Android emulators
Console emulators (NES)

Want to run something else? Contact us at [email protected].


Chromium#

POST/vm

cURL#

curl -X POST -H 'Authorization: Bearer <your-api-key>' \    https://engine.hyperbeam.com/v0/vm \    -d '{"start_url": "https://youtube.com", "offline_timeout": 300, "profile":{"load": "<session id>", "save": true}}'

Example response#

{  "session_id": "52f968cb-6739-4197-83d7-2305fe5d6f54",  "embed_url": "https://vwdrccwgpv181powg61ggyvy.hyperbeam.com/Uvloy2c5QZeD1yMF_l1vVA?token=c8iw3SmQglOU0ugfLr3dWY2LalSKI_WOGUldEt8knbw",  "admin_token": "51JOZEEcMp4trCwbpTS3jjQc0lSmeAZpPfxioDqe73U"}

Request body#

PropertyOptionalTypeDefaultDescription
start_url✅string"about:blank"The initial URL that is set in the browser. If unset, and a profile is loaded, tabs from the profile are restored
kiosk✅booleanfalseFlag to enable kiosk mode, which hides the browser navigation UI
offline_timeout✅nullable,number3600The seconds after which the session will close when no users are connected. If set to null, the session will never time out. Must be greater than 60
control_disable_default✅booleanfalseIf true, users cannot control the browser by default, and need to be manually granted access by an admin user
region✅string"NA"The server region:
"NA" → North America
"EU" → Europe
"AS" → Asia
profile.load✅stringunsetID of the session you want to load in the cloud browser (a profile is encrypted browser state from a previous session, with the profile ID being its session_id, see response body). If start_url is unset, tabs from the profile are restored
profile.save✅booleanunsetprofile.save = true → Save profile
ublock✅booleanfalseFlag to install the UBlock Origin extension on the cloud browser
extension.field✅stringunsetField of the multipart form that contains the path to your custom Chrome extension. See “Install custom Chrome extension” below (Max Size 1MB)
webgl✅booleanfalseEnables WebGL. Some games and interactive activities require WebGL
width✅number1280Width of the browser in pixels. If set, height must be set as well. Width must be: - Divisible by 4 - Greater than or equal 540 The max number of pixels (width height) is capped at 1920 1080
height✅number720Height of the browser in pixels. If set, width must be set as well. Height must be: - Divisible by 4 - Greater than or equal 540 The max number of pixels (width height) is capped at 1920 1080
fps✅number24Integer frame rate of the browser. Must be in the range [24, 60]
hide_cursor✅booleanfalseHides the system cursor. Useful if you want to implement a multi-cursor user interface.

Response body#

PropertyTypeDescription
session_idstringThe ID of the cloud computer session
embed_urlstringA URL you can load into an iframe on your website
admin_tokenstringA token that grants access to an exclusive subset of the client-side iframe API. Needed for setting permissions and programmatic navigation.

Android emulator#

POST/android

cURL#

curl -X POST -H 'Authorization: Bearer <your-api-key>' \    https://engine.hyperbeam.com/v0/android \    -d '{"app_id": "com.androbaby.game2048"}'

Example response#

{  "session_id": "52f968cb-6739-4197-83d7-2305fe5d6f54",  "embed_url": "https://vwdrccwgpv181powg61ggyvy.hyperbeam.com/Uvloy2c5QZeD1yMF_l1vVA?token=c8iw3SmQglOU0ugfLr3dWY2LalSKI_WOGUldEt8knbw",  "admin_token": "51JOZEEcMp4trCwbpTS3jjQc0lSmeAZpPfxioDqe73U"}

Request body#

PropertyOptionalTypeDefaultDescription
app_id❌string""The Google playstore application ID. If app_id is not set, then the home screen will be loaded.

Response body#

PropertyTypeDescription
session_idstringfalse
embed_urlstring""
admin_tokenstringfalse

Console emulators#

POST/console

cURL#

curl -X POST -H 'Authorization: Bearer <your-api-key>' \    https://engine.hyperbeam.com/v0/console \    -d '{"type": "nes", "rom_url": "<link-to-a-legal-rom>"}'

Example response#

{  "session_id": "52f968cb-6739-4197-83d7-2305fe5d6f54",  "embed_url": "https://vwdrccwgpv181powg61ggyvy.hyperbeam.com/Uvloy2c5QZeD1yMF_l1vVA?token=c8iw3SmQglOU0ugfLr3dWY2LalSKI_WOGUldEt8knbw",  "admin_token": "51JOZEEcMp4trCwbpTS3jjQc0lSmeAZpPfxioDqe73U"}

Request body#

PropertyOptionalTypeDefaultDescription
type
❌
string""The console type. nes, snes, n64, and ps1 are supported.
rom_url
❌
string""URL to a legal ROM file, which will be downloaded and loaded into the emulator.
auth
✅
object{"auth": {"type": "token"}}The authentication system for the cloud computer. See the “cloud computer authentication” section for more info.

Response body#

PropertyTypeDescription
session_idstringfalse
embed_urlstring""
admin_tokenstringfalse