Installation
Add @mozaik-ai/core to your project and configure provider credentials.
Package
Install the published core library:
npm install @mozaik-ai/coreyarn add @mozaik-ai/corepnpm add @mozaik-ai/coreThe npm package is scoped as @mozaik-ai/core. The latest API surface follows the Mozaik repository on GitHub; pin a version in production as you normally would.
Environment
Mozaik picks a provider from the model name you pass to runInference, and each provider's SDK reads its credential from the environment. Set the keys for the providers you use:
# .env
OPENAI_API_KEY=your-openai-key-here
ANTHROPIC_API_KEY=your-anthropic-key-here
GEMINI_API_KEY=your-gemini-key-hereDeepSeek models run through the OpenAI-compatible chat-completions endpoint, so they use an OpenAI-style credential and base URL (OPENAI_API_KEY / OPENAI_BASE_URL) pointed at DeepSeek.
Place these in a .env file at your project root (or configure the environment in your host) so server-side code can read them securely. Do not commit secrets.
TypeScript
Mozaik is written in TypeScript. Make sure your tsconfig uses a modern moduleResolution (e.g. "bundler", "node16", or "nodenext") so package imports resolve cleanly.