castai-sdk-patterns

Featured

Production-ready CAST AI REST API wrapper patterns in TypeScript and Python. Use when building reusable CAST AI clients, implementing retry logic, or wrapping the CAST AI API for team use. Trigger with phrases like "cast ai API patterns", "cast ai client wrapper", "cast ai TypeScript", "cast ai Python client".

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

# CAST AI SDK Patterns ## Overview CAST AI uses a REST API with `X-API-Key` header authentication. There is no official SDK -- build typed wrappers around `fetch` or `requests`. These patterns cover singleton clients, typed responses, retry with backoff, and multi-cluster management. ## Prerequisites - Completed `castai-install-auth` setup - TypeScript 5+ or Python 3.10+ - Familiarity with async/await patterns ## Instructions ### Step 1: TypeScript API Client ```typescript // src/castai/client.ts interface CastAIConfig { apiKey: string; baseUrl?: string; timeoutMs?: number; } interface CastAICluster { id: string; name: string; status: string; providerType: "eks" | "gke" | "aks"; agentStatus: string; createdAt: string; } interface CastAISavings { monthlySavings: number; savingsPercentage: number; currentMonthlyCost: number; optimizedMonthlyCost: number; } interface CastAINode { name: string; instanceType: string; lifecycle: "on-demand" | "spot"; allocatableCpu: string; allocatableMemory: string; zone: string; } class CastAIClient { private apiKey: string; private baseUrl: string; private timeoutMs: number; constructor(config: CastAIConfig) { this.apiKey = config.apiKey; this.baseUrl = config.baseUrl ?? "https://api.cast.ai"; this.timeoutMs = config.timeoutMs ?? 30000; } private async request<T>(path: string, options?: RequestInit): Promise<T> { const controller = new AbortController(); const tim...

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

clade-sdk-patterns

Production-ready Anthropic SDK patterns — client config, retries, timeouts, Use when working with sdk-patterns patterns. error handling, TypeScript types, and async patterns. Trigger with "anthropic sdk", "claude client setup", "anthropic typescript", "anthropic python patterns".

2,266 Updated today
jeremylongshore
AI & Automation Featured

apify-sdk-patterns

Production-ready patterns for Apify SDK and apify-client in TypeScript. Use when building Actors with Crawlee, managing datasets/KV stores, or implementing robust client wrappers with retry and validation. Trigger: "apify SDK patterns", "apify best practices", "apify client wrapper", "crawlee patterns", "idiomatic apify".

2,266 Updated today
jeremylongshore
AI & Automation Featured

instantly-sdk-patterns

Apply production-ready Instantly.ai API client patterns for TypeScript and Python. Use when building reusable API wrappers, implementing retry logic, or establishing coding standards for Instantly integrations. Trigger with phrases like "instantly SDK patterns", "instantly best practices", "instantly client wrapper", "instantly code patterns", "idiomatic instantly".

2,266 Updated today
jeremylongshore
AI & Automation Featured

attio-sdk-patterns

Production-ready patterns for the Attio REST API: typed client, retry with backoff, pagination iterators, and multi-tenant factory. Trigger: "attio SDK patterns", "attio best practices", "attio client wrapper", "idiomatic attio", "attio TypeScript patterns".

2,266 Updated today
jeremylongshore
AI & Automation Featured

assemblyai-sdk-patterns

Apply production-ready AssemblyAI SDK patterns for TypeScript and Python. Use when implementing AssemblyAI integrations, refactoring SDK usage, or establishing team coding standards for transcription workflows. Trigger with phrases like "assemblyai SDK patterns", "assemblyai best practices", "assemblyai code patterns", "idiomatic assemblyai".

2,266 Updated today
jeremylongshore