Skip to main content
The Rapida SDK lets you quickly integrate voice, chat, and AI-powered workflows into your applications. This guide covers installation and authentication for different languages. For detailed API references, see the API Reference.

Prerequisites

Node.js and React: Please install Node.js (version 16.0.0 or higher) before proceeding.
Go: Please install Go (version 1.19 or higher) before proceeding.
Python: Please install Python (version 3.8 or higher) before proceeding.
You can check your installed versions:
node --version

Installation

# React (choose one)
npm install @rapidaai/react      # npm
yarn add @rapidaai/react         # yarn
pnpm add @rapidaai/react         # pnpm
# Other languages: see tabs

Authentication

You can connect to Rapida using either Personal Tokens (for administration APIs) or Project API Keys (for typical app integration).

Administration

Personal tokens are used for APIs that require write or administrative access. These tokens are essential for managing users, roles, projects, and performing create or update operations that need authentication.

Implementation Example:

import {
  ConnectionConfig,
} from "@rapidaai/react";
let connectionCfg = ConnectionConfig.DefaultConnectionConfig(
  ConnectionConfig.WithPersonalToken({
    Authorization: "AUTH_TOKEN",
    AuthId: "AUTH_ID",
    ProjectId: "PROJECT_ID",
  })
);

console.log("Rapida SDK initialized successfully!");

Project Credentials

Use this for typical integrations inside your apps and servers.
import {
  ConnectionConfig,
} from "@rapidaai/react";
let connectionCfg = ConnectionConfig.DefaultConnectionConfig(
  ConnectionConfig.WithSDK({
    ApiKey: "YOUR_API_KEY_PLACEHOLDER",
  })
);
// Your Rapida integration code here
console.log("Rapida SDK initialized successfully!");

Environment Variables

Create a .env file in your project root and add your Rapida credentials:
# For Personal Token authentication
RAPIDA_PERSONAL_TOKEN=your_personal_token_here
RAPIDA_USER_ID=your_user_id_here
RAPIDA_PROJECT_ID=your_project_id_here

# For SDK API Key authentication
RAPIDA_API_KEY=your_api_key_here
You can find your credentials in the Rapida dashboard under Settings → API Keys.

Quick Start Example

Here’s a simple example to verify your installation:
import {
  ConnectionConfig,
} from "@rapidaai/react";
let connectionCfg = ConnectionConfig.DefaultConnectionConfig(
  ConnectionConfig.WithSDK({
    ApiKey: "YOUR_API_KEY_PLACEHOLDER",
  })
);
// Your Rapida integration code here
console.log("Rapida SDK initialized successfully!");

Recipes

Here are some repositories with example projects:

Troubleshooting

This may be due to an incorrect package name or version.Solution:
  1. Verify you’re using the correct package name for your platform
  2. Check that you have the minimum required version of Node.js, Go, or Python
  3. Try reinstalling the package
This usually indicates invalid or missing credentials.Solution:
  1. Verify your API keys are correct in your .env file
  2. Check that your environment variables are being loaded properly
  3. Ensure you’re using the right authentication method (Personal Token vs SDK API Key)
If you encounter Go module or dependency issues.Solution:
  1. Ensure Go modules are enabled: go mod init your-project-name
  2. Run go mod tidy to clean up dependencies
  3. Check that you’re using Go 1.19 or higher
If you encounter issues with Node.js compatibility.Solution:
  1. Upgrade to Node.js 16.0.0 or higher
  2. Clear your npm cache: npm cache clean --force
  3. Remove node_modules and reinstall: rm -rf node_modules && npm install

Next Steps