API
API endpoints
Launch a session
2min
Start a new game session in a specific region. Each session needs a unique ID, which you'll need to create yourself.
Each call to the API to launch a session must be a UUID to avoid any issues.
POST
Request
Body Parameters
id
required
String
The unique ID for the session. (use a UUID.)
location
required
String
The location or region that you'd prefer to host the game session in. (Check our regions and locations page.)
image
required
String
The name of the image for your game, hosted inside a container.
env
required
Object
The list of environment variables you want to feed the container when it starts. [can be left blank]
args
required
String
The list of program console arguments to feed to the application that's hosted inside the container. [can be left blank]
restart
required
Boolean
Tells us whether we must automatically restart this session if it fails to launch. (We won't restart if you manually shut it down.)
labels
optional
Object
Add your own metadata about the session that we'll store inside the configuration.
version
optional
String
Tag of the image that the session will run. This tag needs to be available
or it'll throw a 404. If you don't specify a priority, we'll run it with the highest priority.
enableMetrics
optional
String
Use this to collect details like CPU, memory and network information. Useful for debugging.
although not depicted in the API responses, 420 is still returned for sessions that failed to start.
Updated 10 Sep 2024
Did this page help you?