speak-rate-limits
Manages Speak API request rates using exponential backoff and queuing strategies.
Install
mkdir -p .claude/skills/speak-rate-limits && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/7127" && unzip -o skill.zip -d .claude/skills/speak-rate-limits && rm skill.zipInstalls to .claude/skills/speak-rate-limits
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Handle Speak API rate limits with exponential backoff, request queuing,Key capabilities
- →Implement exponential backoff for rate limit errors
- →Queue requests to optimize API throughput
- →Verify Speak API integration
How it works
The client wraps API calls with a throttle mechanism and a retry loop that monitors for 429 status codes. It uses the Retry-After header to calculate wait times before re-attempting requests.
Inputs & outputs
When to use speak-rate-limits
- →Implement request throttling for API calls
- →Handle rate limit errors with retry logic
- →Queue requests to avoid 429 errors
About this skill
Speak Rate Limits
Overview
Handle Speak API rate limits with exponential backoff, request queuing, and optimization strategies.
Prerequisites
- Completed
speak-install-authsetup - Valid API credentials configured
- Understanding of Speak API patterns
Instructions
Rate Limit Overview
| Tier | Assessments/min | Conversations/min | Audio upload/min |
|---|---|---|---|
| Free | 10 | 5 | 10 |
| Pro | 60 | 30 | 60 |
| Enterprise | 300 | 150 | 300 |
Rate-Limited Client
class RateLimitedSpeakClient {
private lastRequest = 0;
private minDelay: number;
constructor(private client: SpeakClient, requestsPerMinute: number = 60) {
this.minDelay = 60000 / requestsPerMinute;
}
private async throttle() {
const elapsed = Date.now() - this.lastRequest;
if (elapsed < this.minDelay) {
await new Promise(r => setTimeout(r, this.minDelay - elapsed));
}
this.lastRequest = Date.now();
}
async assessPronunciation(config: PronunciationConfig) {
await this.throttle();
return this.retryOn429(() => this.client.assessPronunciation(config));
}
private async retryOn429<T>(fn: () => Promise<T>, maxRetries = 3): Promise<T> {
for (let i = 0; i < maxRetries; i++) {
try {
return await fn();
} catch (err: any) {
if (err.response?.status === 429 && i < maxRetries - 1) {
const wait = parseInt(err.response.headers['retry-after'] || String(2 ** i));
console.log(`Rate limited. Waiting ${wait}s...`);
await new Promise(r => setTimeout(r, wait * 1000));
continue;
}
throw err;
}
}
throw new Error('Max retries exceeded');
}
}
Batch Assessment Queue
async function batchAssess(client: RateLimitedSpeakClient, recordings: Recording[]) {
const results = [];
for (const rec of recordings) {
const result = await client.assessPronunciation({
audioPath: rec.path, targetText: rec.text, language: rec.lang,
});
results.push({ ...rec, score: result.score });
console.log(`Assessed "${rec.text}": ${result.score}/100`);
}
return results;
}
Output
- Limits implementation complete
- Speak API integration verified
- Production-ready patterns applied
Error Handling
| Error | Cause | Solution |
|---|---|---|
| 401 Unauthorized | Invalid API key | Verify SPEAK_API_KEY environment variable |
| 429 Rate Limited | Too many requests | Wait Retry-After seconds, use backoff |
| Audio format error | Wrong codec/sample rate | Convert to WAV 16kHz mono with ffmpeg |
| Session expired | Timeout after 30 min | Start a new conversation session |
Resources
Next Steps
See speak-prod-checklist for production readiness.
Examples
Basic: Apply rate limits with default configuration for a standard Speak integration.
Advanced: Customize for production with error recovery, monitoring, and team-specific requirements.
When not to use it
- →When using invalid API credentials
- →When audio formats do not meet codec requirements
Prerequisites
Limitations
- →Max retries are limited to three attempts
- →Audio must be converted to WAV 16kHz mono
How it compares
This implementation adds automated request queuing and exponential backoff to standard API calls, preventing service disruption.
Compared to similar skills
speak-rate-limits side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| speak-rate-limits (this skill) | 1 | 27d | Review | Intermediate |
| fastapi-templates | 520 | 2mo | No flags | Intermediate |
| android-kotlin-development | 268 | 5mo | Review | Advanced |
| mcp-builder | 136 | 3mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by jeremylongshore
View all by jeremylongshore →You might also like
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
android-kotlin-development
aj-geddes
Develop native Android apps with Kotlin. Covers MVVM with Jetpack, Compose for modern UI, Retrofit for API calls, Room for local storage, and navigation architecture.
mcp-builder
anthropics
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
fastapi-pro
sickn33
Build high-performance async APIs with FastAPI, SQLAlchemy 2.0, and Pydantic V2. Master microservices, WebSockets, and modern Python async patterns. Use PROACTIVELY for FastAPI development, async optimization, or API architecture.
api-design-principles
wshobson
Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers. Use when designing new APIs, reviewing API specifications, or establishing API design standards.
telegram-bot-builder
davila7
Expert in building Telegram bots that solve real problems - from simple automation to complex AI-powered bots. Covers bot architecture, the Telegram Bot API, user experience, monetization strategies, and scaling bots to thousands of users. Use when: telegram bot, bot api, telegram automation, chat bot telegram, tg bot.