You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library provides convenient access to the Kernel REST API from server-side TypeScript or JavaScript.
6
6
7
-
The REST API documentation can be found on [docs.onkernel.com](https://www.kernel.sh/docs/api-reference). The full API of this library can be found in [api.md](api.md).
7
+
The REST API documentation can be found on [kernel.sh](https://kernel.sh/docs). The full API of this library can be found in [api.md](api.md).
8
8
9
9
It is generated with [Stainless](https://www.stainless.com/).
10
10
11
11
## Installation
12
12
13
13
```sh
14
-
npm install @kernel/sdk
14
+
npm install @onkernel/sdk
15
15
```
16
16
17
17
## Usage
@@ -20,7 +20,7 @@ The full API of this library can be found in [api.md](api.md).
20
20
21
21
<!-- prettier-ignore -->
22
22
```js
23
-
importKernelfrom'@kernel/sdk';
23
+
importKernelfrom'@onkernel/sdk';
24
24
25
25
constclient=newKernel({
26
26
apiKey:process.env['KERNEL_API_KEY'], // This is the default and can be omitted
@@ -38,7 +38,7 @@ This library includes TypeScript definitions for all request params and response
38
38
39
39
<!-- prettier-ignore -->
40
40
```ts
41
-
importKernelfrom'@kernel/sdk';
41
+
importKernelfrom'@onkernel/sdk';
42
42
43
43
const client =newKernel({
44
44
apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted
@@ -62,7 +62,7 @@ Request parameters that correspond to file uploads can be passed in many differe
62
62
63
63
```ts
64
64
importfsfrom'fs';
65
-
importKernel, { toFile } from'@kernel/sdk';
65
+
importKernel, { toFile } from'@onkernel/sdk';
66
66
67
67
const client =newKernel();
68
68
@@ -227,7 +227,7 @@ The log level can be configured in two ways:
227
227
2. Using the `logLevel` client option (overrides the environment variable if set)
228
228
229
229
```ts
230
-
importKernelfrom'@kernel/sdk';
230
+
importKernelfrom'@onkernel/sdk';
231
231
232
232
const client =newKernel({
233
233
logLevel: 'debug', // Show all log messages
@@ -255,7 +255,7 @@ When providing a custom logger, the `logLevel` option still controls which messa
255
255
below the configured level will not be sent to your logger.
If you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)
0 commit comments