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
  2. Go to your API Keys in the dashboard
  3. Create a new API key
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 has balance. This call is free. active is true when your balance is above $0, and plan_name reports the balance:

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"