RunPod storage pricing
Quick answer
RunPod charges for persistent storage based on the amount of storage allocated per pod, typically billed per GB per month. Storage pricing varies by storage type (e.g., SSD or HDD) and region, with exact rates available on the RunPod pricing page or dashboard.
PREREQUISITES
Python 3.8+RunPod accountpip install runpod
Setup
To interact with RunPod storage programmatically, install the runpod Python package and set your API key as an environment variable.
- Install the SDK:
pip install runpod - Set your API key:
export RUNPOD_API_KEY='your_api_key'(Linux/macOS) orsetx RUNPOD_API_KEY "your_api_key"(Windows)
pip install runpod output
Collecting runpod Downloading runpod-1.0.0-py3-none-any.whl (10 kB) Installing collected packages: runpod Successfully installed runpod-1.0.0
Step by step
Here is a simple example to check your current storage usage and pricing details via the RunPod API.
import os
import runpod
runpod.api_key = os.environ["RUNPOD_API_KEY"]
# Fetch storage info for your pods
storage_info = runpod.Storage.list()
for storage in storage_info:
print(f"Storage ID: {storage['id']}")
print(f"Type: {storage['type']}")
print(f"Size (GB): {storage['size_gb']}")
print(f"Monthly Cost: ${storage['monthly_cost']:.2f}")
print("---") output
Storage ID: stg-1234567890 Type: SSD Size (GB): 100 Monthly Cost: $10.00 --- Storage ID: stg-0987654321 Type: HDD Size (GB): 500 Monthly Cost: $15.00 ---
Common variations
You can manage different storage types and sizes depending on your pod requirements. RunPod typically offers SSD and HDD storage with different pricing tiers. You can also attach or detach storage volumes programmatically.
import os
import runpod
runpod.api_key = os.environ["RUNPOD_API_KEY"]
# Create a new SSD storage volume of 200 GB
new_storage = runpod.Storage.create(type="SSD", size_gb=200)
print(f"Created storage ID: {new_storage['id']} with size {new_storage['size_gb']} GB") output
Created storage ID: stg-1122334455 with size 200 GB
Troubleshooting
If you see unexpected storage costs, verify your allocated storage sizes and types in the RunPod dashboard. Also, check for any unattached persistent volumes that may still incur charges. Use the API to list and delete unused storage volumes to optimize costs.
Key Takeaways
- RunPod storage pricing is based on GB per month and varies by storage type and region.
- Use the RunPod Python SDK to list, create, and manage storage volumes programmatically.
- Monitor and delete unused storage volumes to avoid unnecessary charges.