Skip to main content

Package

The package is published as ESM and supports Node.js 20.11.0 or newer.

Peer dependencies

Provider SDKs are optional peer dependencies. Install the ones your app uses:

Runtime setup

Set your Margovia API key in the backend app that calls OpenAI, Anthropic, or another provider:
Then create the client:
You can also rely on environment variables:
For Margovia Cloud, you do not need to set MARGOVIA_BASE_URL. Set it only for local development, self-hosting, or a compatible receiver.

Server-only

The SDK reads backend secrets and uses Node APIs. Do not bundle it into browser code.