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

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

const deployment = await client.apps.deployments.create({
  entrypoint_rel_path: 'src/app.py',
  file: fs.createReadStream('path/to/file'),
});

console.log(deployment.apps);
{
  "status": "succeeded",
  "status_reason": "App deployed successfully",
  "apps": [
    {
      "id": "rr33xuugxj9h0bkf1rdt2bet",
      "name": "my-app",
      "actions": [
        {
          "name": "analyze"
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Body

multipart/form-data

App deployment data

The body is of type object.

Response

201
application/json

App deployed successfully

The response is of type object.