vastai-rate-limits

Solid

Handle Vast.ai API rate limits with backoff and request optimization. Use when encountering 429 errors, implementing retry logic, or optimizing API request throughput. Trigger with phrases like "vastai rate limit", "vastai throttling", "vastai 429", "vastai retry", "vastai backoff".

AI & Automation 2,266 stars 315 forks Updated today 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

# Vast.ai Rate Limits ## Overview Handle Vast.ai REST API rate limits gracefully. The API at `cloud.vast.ai/api/v0` returns HTTP 429 when request limits are exceeded. Most operations (search, show) are read-heavy and rarely hit limits, but automated scripts doing rapid provisioning or polling can trigger throttling. ## Prerequisites - Vast.ai CLI or REST API client - Understanding of exponential backoff ## Instructions ### Step 1: Rate-Limited HTTP Client ```python import requests import time class RateLimitedVastClient: BASE_URL = "https://cloud.vast.ai/api/v0" def __init__(self, api_key, min_delay=0.5, max_retries=5): self.session = requests.Session() self.session.headers["Authorization"] = f"Bearer {api_key}" self.min_delay = min_delay self.max_retries = max_retries self.last_request = 0 def request(self, method, endpoint, **kwargs): # Enforce minimum delay between requests elapsed = time.time() - self.last_request if elapsed < self.min_delay: time.sleep(self.min_delay - elapsed) for attempt in range(self.max_retries): self.last_request = time.time() resp = self.session.request(method, f"{self.BASE_URL}{endpoint}", **kwargs) if resp.status_code == 429: retry_after = int(resp.headers.get("Retry-After", 2 ** attempt)) print(f"Rate limited. Waiting {retry_after}s (attempt {attempt+1})") ti...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

instantly-rate-limits

Implement Instantly.ai rate limiting, backoff, and request throttling patterns. Use when handling 429 errors, implementing retry logic, or building high-throughput Instantly integrations. Trigger with phrases like "instantly rate limit", "instantly 429", "instantly throttle", "instantly backoff", "instantly retry".

2,266 Updated today
jeremylongshore
AI & Automation Featured

castai-rate-limits

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".

2,266 Updated today
jeremylongshore
AI & Automation Featured

apollo-rate-limits

Implement Apollo.io rate limiting and backoff. Use when handling rate limits, implementing retry logic, or optimizing API request throughput. Trigger with phrases like "apollo rate limit", "apollo 429", "apollo throttling", "apollo backoff", "apollo request limits".

2,266 Updated today
jeremylongshore
AI & Automation Featured

apify-rate-limits

Handle Apify API rate limits with proper backoff and request queuing. Use when hitting 429 errors, optimizing API request throughput, or implementing rate-aware client wrappers. Trigger: "apify rate limit", "apify throttling", "apify 429", "apify retry", "apify backoff", "too many requests apify".

2,266 Updated today
jeremylongshore
AI & Automation Featured

customerio-rate-limits

Implement Customer.io rate limiting and backoff. Use when handling high-volume API calls, implementing retry logic, or hitting 429 errors. Trigger: "customer.io rate limit", "customer.io throttle", "customer.io 429", "customer.io backoff", "customer.io too many requests".

2,266 Updated today
jeremylongshore