Skip to main content

Overview

The Recall class is the main entry point for the Recall AI SDK. It provides access to all SDK functionality through three primary properties: bot, auth, and calendar.

Constructor

Initialize a new Recall client instance with your API credentials.
constructor({ apiKey, region }: { apiKey: string; region: string })

Parameters

apiKey
string
required
Your Recall API key. Get your API key from the Recall dashboard.
region
string
required
The region for your API requests. Valid values include:
  • us.recall.ai - United States region
  • eu.recall.ai - European Union region

Example

import { Recall } from '@recall.ai/sdk';

const client = new Recall({
  apiKey: 'your-api-key',
  region: 'us.recall.ai'
});

Properties

bot

bot
Bot
Provides access to bot management operations including creating, listing, updating, and controlling meeting bots.
The bot property exposes methods for:
  • Creating and managing meeting bots
  • Retrieving bot status and information
  • Controlling bot behavior (leave call, stop recording, output audio)
  • Accessing bot transcripts and chat messages
  • Managing bot intelligence and logs
Example:
// Create a new bot
const bot = await client.bot.create({
  meeting_url: 'https://zoom.us/j/123456789',
  bot_name: 'My Bot'
});

// Retrieve bot information
const botInfo = await client.bot.retrieve({ id: bot.data.id });

// Get bot transcript
const transcript = await client.bot.getTranscript({ 
  id: bot.data.id,
  enhanced_diarization: true 
});

// List all bots
const bots = await client.bot.list({ 
  limit: 10,
  offset: 0 
});

auth

auth
Auth
Provides access to authentication operations for calendar integrations.
The auth property manages OAuth flows for calendar providers. It includes a google property for Google Calendar authentication. Example:
// Access Google authentication
const googleAuth = client.auth.google;

// Use the auth instance for OAuth flows
// (specific methods depend on the Google class implementation)

calendar

calendar
CalendarV2
Provides access to calendar management operations using the v2 API.
The calendar property exposes methods for:
  • Creating and managing calendar integrations
  • Listing calendar events
  • Updating calendar configurations
  • Deleting calendar connections
Example:
// Create a calendar integration
const calendar = await client.calendar.create({
  oauth_token: 'google-oauth-token',
  provider: 'google'
});

// List calendars
const calendars = await client.calendar.list({
  limit: 10,
  offset: 0
});

// Retrieve calendar details
const calendarInfo = await client.calendar.retrieve({ 
  id: calendar.data.id 
});

// Update calendar settings
const updated = await client.calendar.update({
  id: calendar.data.id,
  // update parameters
});

// Delete a calendar
await client.calendar.delete({ id: calendar.data.id });

Internal Properties

The Recall class maintains several internal properties for API communication:
  • apiKey (private): Stores your API authentication key
  • v1Url (private): Base URL for v1 API endpoints (https://{region}.recall.ai/api/v1)
  • v2Url (private): Base URL for v2 API endpoints (https://{region}.recall.ai/api/v2)
  • region (private): The selected API region
These properties are automatically configured based on the constructor parameters and should not be accessed directly.

Type Definition

class Recall {
  private apiKey: string;
  private v1Url: string;
  private v2Url: string;
  private region: string;
  
  bot: Bot;
  auth: Auth;
  calendar: CalendarV2;
  
  constructor({ apiKey, region }: { apiKey: string; region: string });
}

Complete Example

Here’s a complete example demonstrating initialization and basic usage:
import { Recall } from '@recall.ai/sdk';

// Initialize the client
const client = new Recall({
  apiKey: process.env.RECALL_API_KEY,
  region: 'us.recall.ai'
});

// Create a bot for a meeting
const bot = await client.bot.create({
  meeting_url: 'https://meet.google.com/abc-defg-hij',
  bot_name: 'Recording Bot',
  automatic_leave: {
    waiting_room_timeout: 600
  }
});

console.log('Bot created:', bot.data.id);

// Wait for the bot to join and start recording
// (in production, use webhooks to track bot status)

// Get the transcript when ready
const transcript = await client.bot.getTranscript({
  id: bot.data.id,
  enhanced_diarization: true
});

console.log('Transcript:', transcript.data);

// Clean up - leave the call
await client.bot.leaveCall({ id: bot.data.id });

Build docs developers (and LLMs) love