11# Kernel TypeScript API Library
22
3- [ ![ NPM version] ( < https://img.shields.io/npm/v/@onkernel /sdk.svg?label=npm%20(stable) > )] ( https://npmjs.org/package/@onkernel /sdk ) ![ npm bundle size] ( https://img.shields.io/bundlephobia/minzip/@onkernel /sdk )
3+ [ ![ NPM version] ( < https://img.shields.io/npm/v/@kernel /sdk.svg?label=npm%20(stable) > )] ( https://npmjs.org/package/@kernel /sdk ) ![ npm bundle size] ( https://img.shields.io/bundlephobia/minzip/@kernel /sdk )
44
55This library provides convenient access to the Kernel REST API from server-side TypeScript or JavaScript.
66
@@ -11,7 +11,7 @@ It is generated with [Stainless](https://www.stainless.com/).
1111## Installation
1212
1313``` sh
14- npm install @onkernel /sdk
14+ npm install @kernel /sdk
1515```
1616
1717## Usage
@@ -20,7 +20,7 @@ The full API of this library can be found in [api.md](api.md).
2020
2121<!-- prettier-ignore -->
2222``` js
23- import Kernel from ' @onkernel /sdk' ;
23+ import Kernel from ' @kernel /sdk' ;
2424
2525const client = new Kernel ({
2626 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
3838
3939<!-- prettier-ignore -->
4040``` ts
41- import Kernel from ' @onkernel /sdk' ;
41+ import Kernel from ' @kernel /sdk' ;
4242
4343const client = new Kernel ({
4444 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
6262
6363``` ts
6464import fs from ' fs' ;
65- import Kernel , { toFile } from ' @onkernel /sdk' ;
65+ import Kernel , { toFile } from ' @kernel /sdk' ;
6666
6767const client = new Kernel ();
6868
@@ -227,7 +227,7 @@ The log level can be configured in two ways:
2272272 . Using the ` logLevel ` client option (overrides the environment variable if set)
228228
229229``` ts
230- import Kernel from ' @onkernel /sdk' ;
230+ import Kernel from ' @kernel /sdk' ;
231231
232232const client = new Kernel ({
233233 logLevel: ' debug' , // Show all log messages
@@ -255,7 +255,7 @@ When providing a custom logger, the `logLevel` option still controls which messa
255255below the configured level will not be sent to your logger.
256256
257257``` ts
258- import Kernel from ' @onkernel /sdk' ;
258+ import Kernel from ' @kernel /sdk' ;
259259import pino from ' pino' ;
260260
261261const logger = pino ();
@@ -324,7 +324,7 @@ globalThis.fetch = fetch;
324324Or pass it to the client:
325325
326326``` ts
327- import Kernel from ' @onkernel /sdk' ;
327+ import Kernel from ' @kernel /sdk' ;
328328import fetch from ' my-fetch' ;
329329
330330const client = new Kernel ({ fetch });
@@ -335,7 +335,7 @@ const client = new Kernel({ fetch });
335335If 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.)
336336
337337``` ts
338- import Kernel from ' @onkernel /sdk' ;
338+ import Kernel from ' @kernel /sdk' ;
339339
340340const client = new Kernel ({
341341 fetchOptions: {
@@ -352,7 +352,7 @@ options to requests:
352352<img src =" https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg " align =" top " width =" 18 " height =" 21 " > ** Node** <sup >[[ docs] ( https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch )] </sup >
353353
354354``` ts
355- import Kernel from ' @onkernel /sdk' ;
355+ import Kernel from ' @kernel /sdk' ;
356356import * as undici from ' undici' ;
357357
358358const proxyAgent = new undici .ProxyAgent (' http://localhost:8888' );
@@ -366,7 +366,7 @@ const client = new Kernel({
366366<img src =" https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg " align =" top " width =" 18 " height =" 21 " > ** Bun** <sup >[[ docs] ( https://bun.sh/guides/http/proxy )] </sup >
367367
368368``` ts
369- import Kernel from ' @onkernel /sdk' ;
369+ import Kernel from ' @kernel /sdk' ;
370370
371371const client = new Kernel ({
372372 fetchOptions: {
@@ -378,7 +378,7 @@ const client = new Kernel({
378378<img src =" https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg " align =" top " width =" 18 " height =" 21 " > ** Deno** <sup >[[ docs] ( https://docs.deno.com/api/deno/~/Deno.createHttpClient )] </sup >
379379
380380``` ts
381- import Kernel from ' npm:@onkernel /sdk' ;
381+ import Kernel from ' npm:@kernel /sdk' ;
382382
383383const httpClient = Deno .createHttpClient ({ proxy: { url: ' http://localhost:8888' } });
384384const client = new Kernel ({
0 commit comments