| name | castai-hello-world |
| description | Query CAST AI cluster savings report and node inventory.
Use when verifying CAST AI connectivity, viewing cluster cost savings,
or listing managed nodes after onboarding.
Trigger with phrases like "cast ai hello world", "cast ai savings",
"cast ai cluster status", "test cast ai connection".
|
| allowed-tools | Read, Write, Edit, Bash(curl:*), Bash(kubectl:*) |
| version | 1.4.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","kubernetes","cost-optimization","castai"] |
| compatibility | Designed for Claude Code |
CAST AI Hello World
Overview
First API calls against the CAST AI REST API: list connected clusters, retrieve the savings report, and inspect node inventory. All examples use curl with the X-API-Key header -- no SDK required.
Prerequisites
- Completed
castai-install-auth setup
CASTAI_API_KEY environment variable set
- At least one cluster connected to CAST AI
Instructions
Step 1: List Connected Clusters
curl -s -H "X-API-Key: ${CASTAI_API_KEY}" \
https://api.cast.ai/v1/kubernetes/external-clusters \
| jq '.items[] | {id, name, status, providerType}'
Expected output:
{
"id": "abc123-def456",
"name": "production-eks",
"status": "ready",
"providerType": "eks"
}
Step 2: Get Cluster Savings Report
export CASTAI_CLUSTER_ID="your-cluster-id"
curl -s -H "X-API-Key: ${CASTAI_API_KEY}" \
"https://api.cast.ai/v1/kubernetes/clusters/${CASTAI_CLUSTER_ID}/savings" \
| jq '{
monthlySavings: .monthlySavings,
savingsPercentage: .savingsPercentage,
currentCost: .currentMonthlyCost,
optimizedCost: .optimizedMonthlyCost
}'
Step 3: List Cluster Nodes
curl -s -H "X-API-Key: ${CASTAI_API_KEY}" \
\
| jq