API Reference
Build accessible applications with Caption Glass™ APIs. Real-time captioning, translation, and more.
Getting Started
1. Get API Key
Apply for developer access and get your API key from the Caption Cloud™ dashboard
API_KEY=your_api_key_here
2. Install SDK or CLI
Install our official SDK for JavaScript, Python, Swift, or Android. Or use our CLI for quick testing.
npm install @caption-glass/sdk
or install the CLI:
npm install -g @caption-glass/cli
3. Make Your First Call
Initialize the SDK and start streaming captions in just a few lines of code
const caption = new CaptionGlass({
apiKey: 'value'
});
const stream = await caption.startStream();
API Endpoints
Streaming API
Stream audio data and receive real-time captions with <150ms latency
Translation API
Translate captions to 100+ languages in real-time
Analytics API
Track API usage, caption accuracy, and user engagement metrics
Webhook API
Receive real-time events and notifications
Device API
Manage Caption Glass™ devices and settings
Code Examples
JavaScript/Node.js
Build web applications with real-time captioning using our JavaScript SDK
import { CaptionGlass } from '@caption-glass/sdk';
const caption = new CaptionGlass({ apiKey: 'your-api-key' });
// Start real-time captioning
const stream = await caption.createStream({
language: 'en-US',
mode: 'value'
});
stream.on('caption', (data) => {
console.log(data.text, data.confidence);
});
Python
Integrate Caption Glass™ into your Python applications and AI models
from caption_glass import CaptionGlass
caption = CaptionGlass(api_key='your-api-key')
# Start streaming with translation
stream = caption.create_stream(
language='en-US',
translate_to=["es', 'fr", 'asl']
)
for caption_data in stream:
print(f"{caption_data.text} ({caption_data.confidence}%)")
Swift/iOS
Create accessible iOS apps with our native Swift SDK
import CaptionGlass
let caption = CaptionGlass(apiKey: "your-api-key")
// Configure caption display
let config = CaptionConfig(
fontSize: .large,
position: .bottom,
backgroundColor: .black.withAlphaComponent(0.8)
)
caption.startCaptioning(config: config) { result in
switch result {
case .success(let caption):
print("Caption: (caption.text)")
case .failure(let error):
print("Error: (error)")
}
}
CLI Commands
Use our CLI for quick testing and development
# Start a live caption stream
caption-glass stream --language en-US
# Test translation capabilities
caption-glass translate --from en --to es "Hello world"
# Check device status
caption-glass device status
# Upload audio file for batch processing
caption-glass process audio.wav --output captions.srt
Rate Limits & Best Practices
Rate Limits
Free tier: 1,000 minutes/month
Pro: 10,000 minutes/month
Enterprise: Unlimited
Error Handling
Implement exponential backoff for retries
Handle network interruptions gracefully
Cache captions for offline access
Performance Tips
Use WebSockets for lowest latency
Enable edge caching for global performance
Batch requests when possible
Security
Never expose API keys in client code
Use environment variables for keys
Enable IP whitelisting for production
Coming to App Stores
In addition to our APIs and SDKs, we're developing native applications for iOS and Android app stores to make Caption Glass™ technology accessible to everyone.
iOS App Store
Native iOS app with seamless Caption Glass™ integration
Expected Q2 2026
Google Play Store
Android companion app with full device control
Expected Q2 2026
Web Platform
Browser-based Caption Glass™ dashboard and controls
Available now
Ready to build?
Start integrating Caption Glass™ into your applications today with our SDK, CLI, or wait for our app store releases.