POST
/
browsers
/
{id}
/
process
/
spawn
JavaScript
import Kernel from '@onkernel/sdk';

const client = new Kernel({
  apiKey: 'My API Key',
});

const response = await client.browsers.process.spawn('id', { command: 'command' });

console.log(response.pid);
{
  "process_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "pid": 123,
  "started_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Browser session ID

Body

application/json

Request to execute a command synchronously.

Response

200
application/json

Spawned

Information about a spawned process.