> For the complete documentation index, see [llms.txt](https://docs.yottalabs.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yottalabs.ai/api-and-sdk/api-reference-v2/metrics.md).

# Metrics

## Get pod CPU metrics

> Returns CPU usage ratio time series.\
> Unit: ratio, where 1.0 means 100% of requested CPU cores.&#x20;

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"Metrics"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"x-api-key","in":"header"}},"schemas":{"Response":{"type":"object","description":"Standard API envelope","properties":{"code":{"type":"integer"},"message":{"type":"string"},"data":{"description":"Response payload; varies by endpoint"}}},"MetricResultNoCapacity":{"type":"object","description":"Metric result for utilization metrics (CPU, GPU) without capacity information","properties":{"metric_name":{"type":"string","description":"Name of the metric (e.g. cpu_usage, gpu_utilization)"},"series":{"type":"array","description":"Array of time series data without capacity metrics","items":{"$ref":"#/components/schemas/TimeSeriesNoCapacity"}}},"required":["metric_name","series"]},"TimeSeriesNoCapacity":{"type":"object","description":"Time series data without capacity metrics (for CPU and GPU utilization)","properties":{"labels":{"type":"object","description":"Key-value label set identifying this series (e.g. pod_id, gpu_show_index)","additionalProperties":{"type":"string"},"properties":{}},"data_points":{"type":"array","description":"Array of timestamped metric values","items":{"$ref":"#/components/schemas/DataPoint"}}},"required":["labels","data_points"]},"DataPoint":{"type":"object","description":"A single time-series data point","properties":{"timestamp":{"type":"integer","format":"int64","description":"Unix timestamp in milliseconds"},"value":{"type":"number","format":"double"}}}},"responses":{"BadRequest":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"Unauthorized":{"description":"Unauthorized — missing or invalid x-api-key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"Forbidden":{"description":"Forbidden — valid key but insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"NotFound":{"description":"Not Found — pod does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"ServiceUnavailable":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}}}},"paths":{"/v2/metrics/cpu/pods/{pod_id}":{"get":{"summary":"Get pod CPU metrics","deprecated":false,"description":"Returns CPU usage ratio time series.\nUnit: ratio, where 1.0 means 100% of requested CPU cores. ","operationId":"getCpuMetrics","tags":["Metrics"],"parameters":[{"name":"pod_id","in":"path","description":"SaaS platform Pod ID","required":true,"schema":{"type":"integer"}},{"name":"start","in":"query","description":"Unix timestamp in milliseconds. Example: 1747898910001. If only `start` is provided, `end` defaults to `start + 1h`.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"end","in":"query","description":"Unix timestamp in milliseconds. Example: 1747902510001. If only `end` is provided, `start` defaults to `end - 1h`.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"step","in":"query","description":"Time-series resolution step. Max windows: `30s`=3h, `5m`=12h, `15m`=2d, `1h`=7d, `4h`=30d, `1d`=90d.","required":false,"schema":{"type":"string","enum":["auto","30s","5m","15m","1h","4h","1d"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Response"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MetricResultNoCapacity"}}}]}}},"headers":{}},"400":{"$ref":"#/components/responses/BadRequest","description":"Bad Request"},"401":{"$ref":"#/components/responses/Unauthorized","description":"Unauthorized — missing or invalid x-api-key"},"403":{"$ref":"#/components/responses/Forbidden","description":"Forbidden — valid key but insufficient permissions"},"404":{"$ref":"#/components/responses/NotFound","description":"Not Found — pod does not exist"},"500":{"$ref":"#/components/responses/InternalServerError","description":"Internal Server Error"},"503":{"$ref":"#/components/responses/ServiceUnavailable","description":"Service Unavailable"}}}}}}
```

## Get pod GPU utilization metrics

> Returns GPU SM utilization percentage time series.\
> Unit: percent, range 0-100.&#x20;

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"Metrics"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"x-api-key","in":"header"}},"schemas":{"Response":{"type":"object","description":"Standard API envelope","properties":{"code":{"type":"integer"},"message":{"type":"string"},"data":{"description":"Response payload; varies by endpoint"}}},"MetricResultNoCapacity":{"type":"object","description":"Metric result for utilization metrics (CPU, GPU) without capacity information","properties":{"metric_name":{"type":"string","description":"Name of the metric (e.g. cpu_usage, gpu_utilization)"},"series":{"type":"array","description":"Array of time series data without capacity metrics","items":{"$ref":"#/components/schemas/TimeSeriesNoCapacity"}}},"required":["metric_name","series"]},"TimeSeriesNoCapacity":{"type":"object","description":"Time series data without capacity metrics (for CPU and GPU utilization)","properties":{"labels":{"type":"object","description":"Key-value label set identifying this series (e.g. pod_id, gpu_show_index)","additionalProperties":{"type":"string"},"properties":{}},"data_points":{"type":"array","description":"Array of timestamped metric values","items":{"$ref":"#/components/schemas/DataPoint"}}},"required":["labels","data_points"]},"DataPoint":{"type":"object","description":"A single time-series data point","properties":{"timestamp":{"type":"integer","format":"int64","description":"Unix timestamp in milliseconds"},"value":{"type":"number","format":"double"}}}},"responses":{"BadRequest":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"Unauthorized":{"description":"Unauthorized — missing or invalid x-api-key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"Forbidden":{"description":"Forbidden — valid key but insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"NotFound":{"description":"Not Found — pod does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"ServiceUnavailable":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}}}},"paths":{"/v2/metrics/gpu/pods/{pod_id}":{"get":{"summary":"Get pod GPU utilization metrics","deprecated":false,"description":"Returns GPU SM utilization percentage time series.\nUnit: percent, range 0-100. ","operationId":"getGpuMetrics","tags":["Metrics"],"parameters":[{"name":"pod_id","in":"path","description":"SaaS platform Pod ID","required":true,"schema":{"type":"integer"}},{"name":"start","in":"query","description":"Unix timestamp in milliseconds. Example: 1747898910001. If only `start` is provided, `end` defaults to `start + 1h`.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"end","in":"query","description":"Unix timestamp in milliseconds. Example: 1747902510001. If only `end` is provided, `start` defaults to `end - 1h`.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"step","in":"query","description":"Time-series resolution step. Max windows: `30s`=3h, `5m`=12h, `15m`=2d, `1h`=7d, `4h`=30d, `1d`=90d.","required":false,"schema":{"type":"string","enum":["auto","30s","5m","15m","1h","4h","1d"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Response"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MetricResultNoCapacity"}}}]}}},"headers":{}},"400":{"$ref":"#/components/responses/BadRequest","description":"Bad Request"},"401":{"$ref":"#/components/responses/Unauthorized","description":"Unauthorized — missing or invalid x-api-key"},"403":{"$ref":"#/components/responses/Forbidden","description":"Forbidden — valid key but insufficient permissions"},"404":{"$ref":"#/components/responses/NotFound","description":"Not Found — pod does not exist"},"500":{"$ref":"#/components/responses/InternalServerError","description":"Internal Server Error"},"503":{"$ref":"#/components/responses/ServiceUnavailable","description":"Service Unavailable"}}}}}}
```

## Get pod memory metrics

> Returns memory usage bytes time series with latest total memory.\
> Unit: bytes for data\_points.value and latest\_total.&#x20;

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"Metrics"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"x-api-key","in":"header"}},"schemas":{"Response":{"type":"object","description":"Standard API envelope","properties":{"code":{"type":"integer"},"message":{"type":"string"},"data":{"description":"Response payload; varies by endpoint"}}},"MetricResultWithCapacity":{"type":"object","description":"Metric result for capacity metrics (memory, GPU memory) with total capacity information","properties":{"metric_name":{"type":"string","description":"Name of the metric (e.g. memory_usage, gpu_memory)"},"series":{"type":"array","description":"Array of time series data with capacity metrics","items":{"$ref":"#/components/schemas/TimeSeriesWithCapacity"}}},"required":["metric_name","series"]},"TimeSeriesWithCapacity":{"type":"object","description":"Time series data with capacity metrics (for memory and GPU memory)","properties":{"labels":{"type":"object","description":"Key-value label set identifying this series (e.g. pod_id, gpu_show_index)","additionalProperties":{"type":"string"},"properties":{}},"data_points":{"type":"array","description":"Array of timestamped metric values","items":{"$ref":"#/components/schemas/DataPoint"}},"latest_total":{"type":"number","format":"double","description":"Latest total/request value for capacity metrics (e.g. total memory bytes, total GPU memory bytes)"}},"required":["labels","data_points","latest_total"]},"DataPoint":{"type":"object","description":"A single time-series data point","properties":{"timestamp":{"type":"integer","format":"int64","description":"Unix timestamp in milliseconds"},"value":{"type":"number","format":"double"}}}},"responses":{"BadRequest":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"Unauthorized":{"description":"Unauthorized — missing or invalid x-api-key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"Forbidden":{"description":"Forbidden — valid key but insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"NotFound":{"description":"Not Found — pod does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"ServiceUnavailable":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}}}},"paths":{"/v2/metrics/memory/pods/{pod_id}":{"get":{"summary":"Get pod memory metrics","deprecated":false,"description":"Returns memory usage bytes time series with latest total memory.\nUnit: bytes for data_points.value and latest_total. ","operationId":"getMemoryMetrics","tags":["Metrics"],"parameters":[{"name":"pod_id","in":"path","description":"SaaS platform Pod ID","required":true,"schema":{"type":"integer"}},{"name":"start","in":"query","description":"Unix timestamp in milliseconds. Example: 1747898910001. If only `start` is provided, `end` defaults to `start + 1h`.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"end","in":"query","description":"Unix timestamp in milliseconds. Example: 1747902510001. If only `end` is provided, `start` defaults to `end - 1h`.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"step","in":"query","description":"Time-series resolution step. Max windows: `30s`=3h, `5m`=12h, `15m`=2d, `1h`=7d, `4h`=30d, `1d`=90d.","required":false,"schema":{"type":"string","enum":["auto","30s","5m","15m","1h","4h","1d"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Response"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MetricResultWithCapacity"}}}]}}},"headers":{}},"400":{"$ref":"#/components/responses/BadRequest","description":"Bad Request"},"401":{"$ref":"#/components/responses/Unauthorized","description":"Unauthorized — missing or invalid x-api-key"},"403":{"$ref":"#/components/responses/Forbidden","description":"Forbidden — valid key but insufficient permissions"},"404":{"$ref":"#/components/responses/NotFound","description":"Not Found — pod does not exist"},"500":{"$ref":"#/components/responses/InternalServerError","description":"Internal Server Error"},"503":{"$ref":"#/components/responses/ServiceUnavailable","description":"Service Unavailable"}}}}}}
```

## Get pod GPU memory metrics

> Returns GPU memory used bytes time series with latest total memory.\
> Unit: bytes for data\_points.value and latest\_total.&#x20;

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"Metrics"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"x-api-key","in":"header"}},"schemas":{"Response":{"type":"object","description":"Standard API envelope","properties":{"code":{"type":"integer"},"message":{"type":"string"},"data":{"description":"Response payload; varies by endpoint"}}},"MetricResultWithCapacity":{"type":"object","description":"Metric result for capacity metrics (memory, GPU memory) with total capacity information","properties":{"metric_name":{"type":"string","description":"Name of the metric (e.g. memory_usage, gpu_memory)"},"series":{"type":"array","description":"Array of time series data with capacity metrics","items":{"$ref":"#/components/schemas/TimeSeriesWithCapacity"}}},"required":["metric_name","series"]},"TimeSeriesWithCapacity":{"type":"object","description":"Time series data with capacity metrics (for memory and GPU memory)","properties":{"labels":{"type":"object","description":"Key-value label set identifying this series (e.g. pod_id, gpu_show_index)","additionalProperties":{"type":"string"},"properties":{}},"data_points":{"type":"array","description":"Array of timestamped metric values","items":{"$ref":"#/components/schemas/DataPoint"}},"latest_total":{"type":"number","format":"double","description":"Latest total/request value for capacity metrics (e.g. total memory bytes, total GPU memory bytes)"}},"required":["labels","data_points","latest_total"]},"DataPoint":{"type":"object","description":"A single time-series data point","properties":{"timestamp":{"type":"integer","format":"int64","description":"Unix timestamp in milliseconds"},"value":{"type":"number","format":"double"}}}},"responses":{"BadRequest":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"Unauthorized":{"description":"Unauthorized — missing or invalid x-api-key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"Forbidden":{"description":"Forbidden — valid key but insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"NotFound":{"description":"Not Found — pod does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"ServiceUnavailable":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}}}},"paths":{"/v2/metrics/gpu/pods/{pod_id}/memory":{"get":{"summary":"Get pod GPU memory metrics","deprecated":false,"description":"Returns GPU memory used bytes time series with latest total memory.\nUnit: bytes for data_points.value and latest_total. ","operationId":"getGpuMemoryMetrics","tags":["Metrics"],"parameters":[{"name":"pod_id","in":"path","description":"SaaS platform Pod ID","required":true,"schema":{"type":"integer"}},{"name":"start","in":"query","description":"Unix timestamp in milliseconds. Example: 1747898910001. If only `start` is provided, `end` defaults to `start + 1h`.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"end","in":"query","description":"Unix timestamp in milliseconds. Example: 1747902510001. If only `end` is provided, `start` defaults to `end - 1h`.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"step","in":"query","description":"Time-series resolution step. Max windows: `30s`=3h, `5m`=12h, `15m`=2d, `1h`=7d, `4h`=30d, `1d`=90d.","required":false,"schema":{"type":"string","enum":["auto","30s","5m","15m","1h","4h","1d"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Response"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MetricResultWithCapacity"}}}]}}},"headers":{}},"400":{"$ref":"#/components/responses/BadRequest","description":"Bad Request"},"401":{"$ref":"#/components/responses/Unauthorized","description":"Unauthorized — missing or invalid x-api-key"},"403":{"$ref":"#/components/responses/Forbidden","description":"Forbidden — valid key but insufficient permissions"},"404":{"$ref":"#/components/responses/NotFound","description":"Not Found — pod does not exist"},"500":{"$ref":"#/components/responses/InternalServerError","description":"Internal Server Error"},"503":{"$ref":"#/components/responses/ServiceUnavailable","description":"Service Unavailable"}}}}}}
```

## Get pod storage information

> Returns current ephemeral storage usage. Volumes are managed by SaaS and are not returned by data-monitor. start, end, and step are ignored.\
> Units: used\_bytes and total\_bytes are bytes, usage\_ratio is a unitless ratio, last\_updated is Unix milliseconds.&#x20;

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"Metrics"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"x-api-key","in":"header"}},"schemas":{"Response":{"type":"object","description":"Standard API envelope","properties":{"code":{"type":"integer"},"message":{"type":"string"},"data":{"description":"Response payload; varies by endpoint"}}},"PodStorageResponse":{"type":"object","description":"Pod ephemeral storage response","properties":{"pod_id":{"type":"integer","format":"int64","description":"SaaS platform Pod ID"},"ephemeral_storage":{"description":"Ephemeral storage usage information","$ref":"#/components/schemas/EphemeralStorageInfo"}}},"EphemeralStorageInfo":{"type":"object","properties":{"total_bytes":{"type":"integer","format":"int64"},"used_bytes":{"type":"integer","format":"int64"},"usage_ratio":{"type":"number","format":"double","description":"Used / total (unitless ratio)"},"last_updated":{"type":"integer","format":"int64","description":"Unix timestamp in milliseconds"}}}},"responses":{"Unauthorized":{"description":"Unauthorized — missing or invalid x-api-key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"Forbidden":{"description":"Forbidden — valid key but insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"NotFound":{"description":"Not Found — pod does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}}}},"paths":{"/v2/metrics/storage/pods/{pod_id}":{"get":{"summary":"Get pod storage information","deprecated":false,"description":"Returns current ephemeral storage usage. Volumes are managed by SaaS and are not returned by data-monitor. start, end, and step are ignored.\nUnits: used_bytes and total_bytes are bytes, usage_ratio is a unitless ratio, last_updated is Unix milliseconds. ","operationId":"getStorageMetrics","tags":["Metrics"],"parameters":[{"name":"pod_id","in":"path","description":"SaaS platform Pod ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Response"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PodStorageResponse"}}}]}}},"headers":{}},"401":{"$ref":"#/components/responses/Unauthorized","description":"Unauthorized — missing or invalid x-api-key"},"403":{"$ref":"#/components/responses/Forbidden","description":"Forbidden — valid key but insufficient permissions"},"404":{"$ref":"#/components/responses/NotFound","description":"Not Found — pod does not exist"},"500":{"$ref":"#/components/responses/InternalServerError","description":"Internal Server Error"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.yottalabs.ai/api-and-sdk/api-reference-v2/metrics.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
