Overview
Theget_spend_history action retrieves and analyzes your GPU rental spending history from the Hyperbolic platform. It provides detailed information about past rentals, costs, and usage statistics.
Function Signature
Input Schema
This action takes no input parameters.Response
Returns a formatted analysis of your GPU rental spending.A formatted string containing:
- List of all instances rented
- Duration of each rental in seconds
- Cost per rental in USD
- Total spending per GPU type
- Overall total spending
API Endpoint
Example Response
Example Usage
Response Details
The spending analysis includes:Instance Rentals
For each rented instance:- Instance name: Unique identifier for the rental
- GPU model: Type of GPU used (e.g., NVIDIA H100, A100)
- GPU count: Number of GPUs in the instance
- Duration: Rental duration in seconds
- Cost: Total cost in USD
GPU Type Statistics
Aggregated by GPU model:- Total Rentals: Number of GPUs of this type rented
- Total Time: Combined rental duration in seconds
- Total Cost: Combined spending in USD
Summary
- Total Spending: Overall spending across all rentals in USD
Cost Calculation
Costs are calculated using the formula:duration_hours = duration_seconds / 3600price_per_hour_in_centsis from the instance pricing data- Result is converted to dollars by dividing by 100
Important Notes
- Requires
HYPERBOLIC_API_KEYenvironment variable - Returns “No rental history found.” if you haven’t rented any instances
- All costs are in USD
- Durations are in seconds for precision
- Only includes terminated instances (active rentals appear in
get_gpu_status) - Statistics are grouped by GPU model for easy analysis
Error Handling
Use Cases
Budget Tracking
Monitor your GPU rental spending to stay within budget:Usage Analysis
Analyze which GPU types you use most:Cost Optimization
Compare costs across different GPU types to optimize spending:Related Actions
- Get Current Balance - Check your current credit balance
- Get GPU Status - View active rentals (not in history yet)
- Rent Compute - Rent new GPU instances
- Terminate Compute - End active rentals