Create a new computer instance
client.computers.create(ComputerCreateParams { auto_kill, context_id, display, 7 more } body?, RequestOptionsoptions?): ComputerResponse { id, auto_kill, created_at, 8 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. timeout_seconds controls max lifetime, inactivity_timeout_seconds controls idle timeout, and auto_kill disables only the idle timeout (max lifetime still applies).
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",
"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",
"inactivity_timeout_seconds": 0,
"kind": "kind",
"last_activity_at": "last_activity_at",
"max_lifetime_seconds": 0,
"status": "status"
}