castai-rate-limits

Featured

Handle CAST AI API rate limits with backoff and request queuing. Use when hitting 429 errors, optimizing API call patterns, or implementing rate-aware batch operations. Trigger with phrases like "cast ai rate limit", "cast ai 429", "cast ai throttle", "cast ai API limits".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# CAST AI Rate Limits ## Overview The CAST AI REST API enforces rate limits per API key. The autoscaler agent communicates cluster state at 15-second intervals. For custom API integrations, implement exponential backoff and request queuing to avoid hitting limits. ## Prerequisites - CAST AI API key configured - Understanding of the API endpoints you call ## Rate Limit Behavior | Aspect | Value | |--------|-------| | Rate limit scope | Per API key | | Response on limit | HTTP 429 with `Retry-After` header | | Agent sync interval | Every 15 seconds | | Recommended polling | No more than once per 30 seconds | ## Instructions ### Step 1: Detect Rate Limits from Response Headers ```typescript async function castaiRequest(path: string): Promise<Response> { const response = await fetch(`https://api.cast.ai${path}`, { headers: { "X-API-Key": process.env.CASTAI_API_KEY! }, }); // Log rate limit headers for monitoring const remaining = response.headers.get("X-RateLimit-Remaining"); const reset = response.headers.get("X-RateLimit-Reset"); if (remaining) { console.log(`Rate limit remaining: ${remaining}, resets: ${reset}`); } if (response.status === 429) { const retryAfter = parseInt(response.headers.get("Retry-After") ?? "5"); throw new RateLimitError(retryAfter); } return response; } class RateLimitError extends Error { constructor(public retryAfterSeconds: number) { super(`Rate limited. Retry after ${retryAfterSeconds}s`); } } `...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category