Javascript
import Kernel from '@onkernel/sdk'; const client = new Kernel({ apiKey: 'My API Key', }); const invocation = await client.invocations.create({ action_name: 'analyze', app_name: 'my-app', version: '1.0.0', }); console.log(invocation.id);
{ "id": "rr33xuugxj9h0bkf1rdt2bet", "action_name": "analyze", "status": "queued", "status_reason": "Invocation queued for execution", "output": "{\"result\":\"success\",\"data\":\"processed input\"}" }
Invoke an action.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Invocation parameters
The body is of type object.
object
Invocation created successfully
The response is of type object.