| name | assemblyai-security-basics |
| description | Apply AssemblyAI security best practices for API keys, PII, and access control.
Use when securing API keys, implementing PII redaction,
or configuring temporary tokens for browser-side streaming.
Trigger with phrases like "assemblyai security", "assemblyai secrets",
"secure assemblyai", "assemblyai API key security", "assemblyai PII".
|
| allowed-tools | Read, Write, Grep |
| version | 1.5.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","ai","speech-to-text","assemblyai","transcription","security"] |
| compatibility | Designed for Claude Code |
AssemblyAI Security Basics
Overview
Security best practices for AssemblyAI: API key management, temporary tokens for browser clients, PII redaction, and data retention policies.
Prerequisites
assemblyai package installed
- Understanding of environment variables
- AssemblyAI dashboard access
Instructions
Step 1: API Key Management
ASSEMBLYAI_API_KEY=your-api-key-here
.env
.env.local
.env.*.local
const client = new AssemblyAI({ apiKey: 'sk_abc123...' });
import { AssemblyAI } from 'assemblyai';
const client = new AssemblyAI({
apiKey: process.env.ASSEMBLYAI_API_KEY!,
});
Step 2: Temporary Tokens for Browser Streaming
Never expose your API key in frontend code. Use temporary tokens for browser-side streaming:
import { AssemblyAI } from 'assemblyai';
const client = new AssemblyAI({
apiKey: process.env.ASSEMBLYAI_API_KEY!,
});
export async function () {
token = client..({
: ,
});
.({ token });
}