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_urlstring"about:blank"The initial URL that is set in the browser. If unset, and a profile is loaded, tabs from the profile are restored
kioskbooleanfalseFlag to enable kiosk mode, which hides the browser navigation UI
offline_timeoutnullable,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_defaultbooleanfalseIf true, users cannot control the browser by default, and need to be manually granted access by an admin user
regionstring"NA"The server region:
"NA" → North America
"EU" → Europe
"AS" → Asia
profile.loadstringunsetID 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.savebooleanunsetprofile.save = true → Save profile
ublockbooleanfalseFlag to install the UBlock Origin extension on the cloud browser
extension.fieldstringunsetField of the multipart form that contains the path to your custom Chrome extension. See “Install custom Chrome extension” below (Max Size 1MB)
webglbooleanfalseEnables WebGL. Some games and interactive activities require WebGL
widthnumber1280Width 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
heightnumber720Height 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
fpsnumber24Integer frame rate of the browser. Must be in the range [24, 60]
hide_cursorbooleanfalseHides 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_idstring""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