11# Kernel TypeScript API Library
22
3- [ ![ NPM version] ( https://img.shields.io/npm/v/@kernel /sdk.svg )] ( https://npmjs.org/package/@kernel /sdk ) ![ npm bundle size] ( https://img.shields.io/bundlephobia/minzip/@kernel /sdk )
3+ [ ![ NPM version] ( https://img.shields.io/npm/v/@onkernel /sdk.svg )] ( https://npmjs.org/package/@onkernel /sdk ) ![ npm bundle size] ( https://img.shields.io/bundlephobia/minzip/@onkernel /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 @kernel /sdk
14+ npm install @onkernel /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 ' @kernel /sdk' ;
23+ import Kernel from ' @onkernel /sdk' ;
2424
2525const client = new Kernel ({
2626 apiKey: process .env [' KERNEL_API_KEY' ], // This is the default and can be omitted
@@ -45,7 +45,7 @@ This library includes TypeScript definitions for all request params and response
4545
4646<!-- prettier-ignore -->
4747``` ts
48- import Kernel from ' @kernel /sdk' ;
48+ import Kernel from ' @onkernel /sdk' ;
4949
5050const client = new Kernel ({
5151 apiKey: process .env [' KERNEL_API_KEY' ], // This is the default and can be omitted
@@ -76,7 +76,7 @@ Request parameters that correspond to file uploads can be passed in many differe
7676
7777``` ts
7878import fs from ' fs' ;
79- import Kernel , { toFile } from ' @kernel /sdk' ;
79+ import Kernel , { toFile } from ' @onkernel /sdk' ;
8080
8181const client = new Kernel ();
8282
@@ -235,7 +235,7 @@ The log level can be configured in two ways:
2352352 . Using the ` logLevel ` client option (overrides the environment variable if set)
236236
237237``` ts
238- import Kernel from ' @kernel /sdk' ;
238+ import Kernel from ' @onkernel /sdk' ;
239239
240240const client = new Kernel ({
241241 logLevel: ' debug' , // Show all log messages
@@ -263,7 +263,7 @@ When providing a custom logger, the `logLevel` option still controls which messa
263263below the configured level will not be sent to your logger.
264264
265265``` ts
266- import Kernel from ' @kernel /sdk' ;
266+ import Kernel from ' @onkernel /sdk' ;
267267import pino from ' pino' ;
268268
269269const logger = pino ();
@@ -333,7 +333,7 @@ globalThis.fetch = fetch;
333333Or pass it to the client:
334334
335335``` ts
336- import Kernel from ' @kernel /sdk' ;
336+ import Kernel from ' @onkernel /sdk' ;
337337import fetch from ' my-fetch' ;
338338
339339const client = new Kernel ({ fetch });
@@ -344,7 +344,7 @@ const client = new Kernel({ fetch });
344344If 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.)
345345
346346``` ts
347- import Kernel from ' @kernel /sdk' ;
347+ import Kernel from ' @onkernel /sdk' ;
348348
349349const client = new Kernel ({
350350 fetchOptions: {
@@ -361,7 +361,7 @@ options to requests:
361361<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 >
362362
363363``` ts
364- import Kernel from ' @kernel /sdk' ;
364+ import Kernel from ' @onkernel /sdk' ;
365365import * as undici from ' undici' ;
366366
367367const proxyAgent = new undici .ProxyAgent (' http://localhost:8888' );
@@ -375,7 +375,7 @@ const client = new Kernel({
375375<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 >
376376
377377``` ts
378- import Kernel from ' @kernel /sdk' ;
378+ import Kernel from ' @onkernel /sdk' ;
379379
380380const client = new Kernel ({
381381 fetchOptions: {
@@ -387,7 +387,7 @@ const client = new Kernel({
387387<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 >
388388
389389``` ts
390- import Kernel from ' npm:@kernel /sdk' ;
390+ import Kernel from ' npm:@onkernel /sdk' ;
391391
392392const httpClient = Deno .createHttpClient ({ proxy: { url: ' http://localhost:8888' } });
393393const client = new Kernel ({
0 commit comments