Create a new computer instance
client.computers.create(ComputerCreateParams { auto_kill, context_id, display, 9 more } body?, RequestOptionsoptions?): ComputerResponse { id, auto_kill, created_at, 9 more }
POST/computers
Create a new automation session. Set kind to "browser" for web automation or "desktop" for OS-level automation. Defaults to "browser" if not specified. max_lifetime_seconds controls max lifetime, inactivity_timeout_seconds controls idle timeout, and idle_timeout_enabled (default true) controls whether idle timeout is enforced (max lifetime always applies). The deprecated fields timeout_seconds and auto_kill are still accepted but will be removed after 2026-06-06.
Parameters
Returns
Create a new computer instance
import Lightcone from '@tzafon/lightcone';
const client = new Lightcone({
apiKey: process.env['TZAFON_API_KEY'], // This is the default and can be omitted
});
const computerResponse = await client.computers.create();
console.log(computerResponse.id);{
"id": "id",
"auto_kill": true,
"created_at": "created_at",
"endpoints": {
"foo": "string"
},
"expires_at": "expires_at",
"idle_expires_at": "idle_expires_at",
"idle_timeout_enabled": true,
"inactivity_timeout_seconds": 0,
"kind": "kind",
"last_activity_at": "last_activity_at",
"max_lifetime_seconds": 0,
"status": "status"
}Returns Examples
{
"id": "id",
"auto_kill": true,
"created_at": "created_at",
"endpoints": {
"foo": "string"
},
"expires_at": "expires_at",
"idle_expires_at": "idle_expires_at",
"idle_timeout_enabled": true,
"inactivity_timeout_seconds": 0,
"kind": "kind",
"last_activity_at": "last_activity_at",
"max_lifetime_seconds": 0,
"status": "status"
}