Skip to main content

Installation

Install the Respectify SDK for your language and set up authentication.

Installation​

npm install @respectify/client

Or with yarn:

yarn add @respectify/client

Requirements: Node.js 18+

Getting Your API Key​

  1. Sign up at respectify.ai and verify your email
  2. Open your dashboard: your first API key is created and shown once, and brings 200 free comments with it

There is no card to add. The free plan allows one API key and 30 requests a minute until you add credit; once you do, you can create more keys at API Keys and the same first key keeps working.

Security

Treat your API key like a password. Never hardcode it in source code. Use environment variables or a secrets manager.

Client Setup​

import { RespectifyClient } from "@respectify/client";

const client = new RespectifyClient({
email: process.env.RESPECTIFY_EMAIL!,
apiKey: process.env.RESPECTIFY_API_KEY!,
});

All methods are async and return promises.

Verifying Credentials​

Test that your credentials work and check that your account can make calls. This call is free. active is true when the account has free comments left or a balance above $0; status says which, and plan_name describes it in words:

statusactiveplan_nameMeaning
free_plantrueFree plan: 37 of 200 comments usedOn the free plan, with comments left
free_plan_exhaustedfalseFree plan used up: all 200 comments used. Add credit to continue.All 200 free comments used and no credit; moderation has stopped
activetrueCredit Balance: $12.34Paid account with balance
no_creditfalseCredit Balance: $0.00The balance has run out (an account that used up its free comments and then its balance reports free_plan_exhausted instead)

An account that has used its free comments and then added credit reports active, like any paid account.

const result = await client.checkUserCredentials();
console.log(`Active: ${result.active}`);
console.log(`Status: ${result.status}`);
console.log(result.plan_name); // e.g. "Credit Balance: $12.34"