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 implementedreject with anErroruntil the correspondingoperationIdlands. 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}`);TypeScript SDK reference
Auto-generated symbol reference for @sonnylabs/sdk — every public class, method, options bag, error subclass, and helper, rendered from the JSDoc on the source.
SonnyLabsClientOptions
Constructor options bag for SonnyLabsClient — apiKey, baseUrl, apiVersion, timeoutMs, maxRetries, and the fetch / userAgent overrides.