POST
/
invocations
import Kernel from '@onkernel/sdk';

const client = new Kernel({
  apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted
});

const invocation = await client.invocations.create({
  action_name: 'analyze',
  app_name: 'my-app',
  version: '1.0.0',
});

console.log(invocation.id);
{
  "id": "rr33xuugxj9h0bkf1rdt2bet",
  "status": "queued",
  "status_reason": "Invocation queued for execution",
  "output": "{\"result\":\"success\",\"data\":\"processed input\"}"
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Invocation parameters

The body is of type object.

Response

200
application/json

Invocation created successfully

The response is of type object.