Track GPU compute consumption and cost across plan types using theDocumentation Index
Fetch the complete documentation index at: https://docs.simplismart.ai/llms.txt
Use this file to discover all available pages before exploring further.
client.get_usage_stats() method.
Cost & Usage
get_usage_stats
Fetches time-series usage and cost data for a given plan type and time range.
UsageStatsParams
| Parameter | Type | Description | Required |
|---|---|---|---|
plan_type | PlanType | Compute plan to query. See Plan Types | Yes |
start_time | str | Range start in ISO 8601 format (e.g. 2026-04-01T00:00:00+00:00) | Yes |
end_time | str | Range end in ISO 8601 format | Yes |
window_size | WindowSize | Aggregation bucket size. Options are: MINUTE, 15MIN, 30MIN, HOUR, 3HOUR, 6HOUR, 12HOUR, DAY, WEEK | Yes |
workspace_id | str | None | Restrict to a specific workspace UUID. Uses the org default if omitted | No |
deployment_ids | list[str] | None | Filter by deployment UUID(s). Only valid for private, byoc | No |
deployment_slugs | list[str] | None | Filter by deployment slug(s). Only valid for private, byoc | No |
model_names | list[str] | None | Filter by model name(s) (e.g. DeepSeek-R1). Only valid for shared | No |
training_job_ids | list[str] | None | Filter by training job UUID(s). Only valid for training | No |
training_job_names | list[str] | None | Filter by training job name(s). Only valid for training | No |
model_repo_ids | list[str] | None | Filter by model repo UUID(s). Only valid for compilation | No |
model_repo_names | list[str] | None | Filter by model repo name(s). Only valid for compilation | No |
include_all_statuses | bool | Include all deployment statuses (SUCCESS, STOPPED, DELETED, FAILED, etc.). Default: only SUCCESS and STOPPED. Not supported for training and reserved | No |
List parameters accept one or more values (for example
["a", "b"]). Passing a filter that is not valid for the selected plan_type raises a ValidationError.- You can find
workspace-idunder Settings > Workspaces. Select your workspace and copy the workspace ID.

- Go to Deployments and select a deployment to find the
deployment-idanddeployment-slug.

Plan Types
| Value | Description |
|---|---|
shared | Shared endpoint usage |
private | Private/dedicated deployment usage |
byoc | Bring Your Own Compute deployment usage |
reserved | Reserved capacity usage |
training | Training and fine-tuning job usage |
compilation | Model compilation job usage |
Examples
Dedicated Deployment usage (plan_type="private")
plan_type="shared"): hourly buckets for the last 48 hours, pin results to one workspace_id
deployment_ids (use deployment_slugs instead when you have slugs, not UUIDs)
model_names
plan_type="training"): weekly buckets for the last 90 days, narrow to training_job_names
plan_type="compilation"): daily cost for specific model_repo_names
include_all_statuses=True)
Error Handling
The SDK raisesSimplismartError for API errors. Pydantic validates plan_type and window_size before the request is sent, so invalid values are caught locally.
SimplismartError Attributes
| Attribute | Type | Description |
|---|---|---|
status_code | int | HTTP status code |
payload | dict | Full error response payload |
message | str | Error message from the backend |