Documentation Index
Fetch the complete documentation index at: https://mintlify.com/sam-ayo/recall_sdk/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, make sure you have:
- Node.js 14 or higher installed
- A Recall AI API key (get one from Recall AI)
- Your API region (e.g.,
us-east-2)
Install the SDK
Install the Recall AI SDK using your preferred package manager: Initialize the client
Create a new Recall client with your API key and region:import { Recall } from 'recall_sdk';
const recall = new Recall({
apiKey: process.env.RECALL_API_KEY!,
region: 'us-east-2'
});
Store your API key securely using environment variables. Never commit API keys to version control.
Create your first bot
Send a bot to join a meeting:const result = await recall.bot.create({
meeting_url: 'https://meet.google.com/abc-defg-hij',
bot_name: 'My Meeting Bot'
});
if (result.error) {
console.error('Failed to create bot:', result.error);
} else {
console.log('Bot created:', result.data);
// Output: { id: 'bot_123...', meeting_url: {...}, join_at: '...' }
}
Check bot status
Monitor your bot’s status:const status = await recall.bot.retrieve({ id: result.data.id });
if (!status.error) {
console.log('Bot status:', status.data.status);
// Possible values: "ready", "joining_call", "in_call_recording",
// "recording_done", "done", etc.
}
Complete example
Here’s a complete example that creates a bot, waits for it to finish, and retrieves the transcript:
import { Recall } from 'recall_sdk';
const recall = new Recall({
apiKey: process.env.RECALL_API_KEY!,
region: 'us-east-2'
});
async function recordMeeting(meetingUrl: string) {
// Create bot
const createResult = await recall.bot.create({
meeting_url: meetingUrl,
bot_name: 'Transcript Bot',
transcription_options: {
provider: 'assembly_ai'
}
});
if (createResult.error) {
throw new Error(`Failed to create bot: ${createResult.error.message}`);
}
const botId = createResult.data.id;
console.log(`Bot created with ID: ${botId}`);
// Poll for completion
let status = 'ready';
while (!['done', 'fatal'].includes(status)) {
await new Promise(resolve => setTimeout(resolve, 5000)); // Wait 5 seconds
const retrieveResult = await recall.bot.retrieve({ id: botId });
if (!retrieveResult.error) {
status = retrieveResult.data.status;
console.log(`Current status: ${status}`);
}
}
// Get transcript
if (status === 'done') {
const transcriptResult = await recall.bot.getTranscript({
id: botId,
enhanced_diarization: true
});
if (!transcriptResult.error) {
console.log('Transcript:', transcriptResult.data);
return transcriptResult.data;
}
}
}
// Usage
recordMeeting('https://meet.google.com/abc-defg-hij')
.then(transcript => console.log('Meeting recorded successfully'))
.catch(error => console.error('Error:', error));
Advanced configuration
Real-time transcription
Stream transcripts in real-time to a webhook:
await recall.bot.create({
meeting_url: 'https://meet.google.com/abc-defg-hij',
real_time_transcription: {
destination_url: 'https://your-server.com/webhook/transcript',
partial_results: true,
enhanced_diarization: true
}
});
Stream audio and video in real-time:
await recall.bot.create({
meeting_url: 'https://meet.google.com/abc-defg-hij',
real_time_media: {
rtmp_destination_url: 'rtmp://your-server.com/live/stream',
websocket_audio_destination_url: 'wss://your-server.com/audio',
websocket_video_destination_url: 'wss://your-server.com/video'
}
});
Recording modes
Control how the bot records:
await recall.bot.create({
meeting_url: 'https://meet.google.com/abc-defg-hij',
recording_mode: 'speaker_view', // or 'gallery_view', 'audio_only'
recording_mode_options: {
participant_video_when_screenshare: 'hide'
}
});
Scheduled bots
Schedule a bot to join at a specific time:
await recall.bot.create({
meeting_url: 'https://meet.google.com/abc-defg-hij',
join_at: new Date('2024-03-15T14:00:00Z')
});
Bot control operations
Leave a call
Make the bot leave before the meeting ends:
await recall.bot.leaveCall({ id: botId });
Stop recording
Stop recording but stay in the call:
await recall.bot.stopRecording({ id: botId });
Output audio
Send audio to the bot (e.g., for announcements):
await recall.bot.outputAudio({
id: botId,
kind: 'tts',
b64_data: base64EncodedAudio
});
List chat messages
Retrieve chat messages from the meeting:
const messages = await recall.bot.listChatMessages({
id: botId,
ordering: '-created_at'
});
List and filter bots
Retrieve all bots with optional filters:
const bots = await recall.bot.list({
status: 'in_call_recording',
meeting_url: 'https://meet.google.com/abc-defg-hij',
page: 1
});
Next steps
Creating bots
Learn about advanced bot configuration options
Transcription
Work with transcripts and real-time streaming
Bot API
Explore the complete Bot API reference
Calendar integration
Automate bot deployment with calendar integration