Sonny Labs Docs
SDK ReferenceTypeScript

SonnyLabsClient

The main @sonnylabs/sdk client class — constructor, scan methods, identity and API-key endpoints, and the underlying openapi-fetch escape hatch.

SonnyLabsClient is the main entry point exported from @sonnylabs/sdk. It wraps openapi-fetch against the v1 OpenAPI schema, layers in authentication, idempotency, retry-on-429/503, and translates application/problem+json responses into the typed error hierarchy.

import { SonnyLabsClient } from "@sonnylabs/sdk";

const client = new SonnyLabsClient({ apiKey: process.env.SONNY_API_KEY! });

The full set of constructor options lives on its own page: SonnyLabsClientOptions.

Members

Prop

Type

Methods listed as not implemented reject with an Error until the corresponding operationId lands. Track progress on the support@sonnylabs.ai.

SDK_VERSION

SDK_VERSION is a string constant exported alongside the client. Useful for surfacing the SDK version in your own logs and User-Agent strings.

import { SDK_VERSION } from "@sonnylabs/sdk";

console.log(`@sonnylabs/sdk ${SDK_VERSION}`);

On this page