How to Setup the Zerocost SDK

How to Set Up the Zerocost SDK

This guide explains how to integrate the Zerocost SDK into your application and start monetizing without charging users.

Official docs: https://zerocost.app/docs

What is Zerocost?

Zerocost is a monetization SDK that enables apps to generate revenue through:

It works without paywalls, subscriptions, or invasive tracking, allowing developers to monetize while keeping products free.


1. Install the SDK

Run the automated setup command:

npx @zerocost/sdk

This installs and configures the SDK automatically.


2. Initialize the SDK

Create a file like src/zerocost.ts:

import { ZerocostSDK } from '@zerocost/sdk';

export const zc = new ZerocostSDK({
  appId: "your_app_id",
  apiKey: "your_api_key",
  appName: "your_app_name",
  log: true,

  llm: {
    llmPath: "/chat"
  },

  consent: {
    showSettingsButton: true
  }
});

zc.init();

3. Add SDK to Your App

Import the setup file into your app root:

import "../zerocost";

Place this in:


4. Enable Monetization Streams

From the Zerocost dashboard, you can enable:

Ads (Product 1)

Data (Product 2)

Recordings (Product 3)


5. Configure User Consent

Zerocost requires explicit user opt-in before monetization activates.

consent: {
  showSettingsButton: true
}

6. Customize Ads

From the dashboard, you can:


7. Test Integration

Before deploying:


8. Go Live

After deployment:


9. Monitor Performance

Track from dashboard:


10. Update SDK

npm install @zerocost/sdk@latest

Summary

Typical setup time: ~1–5 minutes


Zerocost enables monetization without paywalls, while keeping products free and privacy-first.