Skip to main content

Configuration

SDK.create()

The factory method is async because it dynamically imports axios when no custom HTTP client is provided.

SdkParams

Example — full configuration

Example — minimal configuration (no API key)


Custom HTTP client

By default, SDK ships with an axios-based HTTP client. You can swap it out for any client that implements the HttpClient interface — useful for environments without Node.js (e.g. Cloudflare Workers, Deno, React Native).

HttpClient interface

Example — using native fetch

Example — custom axios instance (with interceptors, retries, etc.)

Note: When using a custom axios instance, make sure the response interceptor unwraps res.data — otherwise the SDK will receive the full axios response object instead of the API response body.