> 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/pods.md).

# Pods

## Create Pod

> Create a new pod

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"API v2"},{"name":"Pods v2"}],"security":[{}],"paths":{"/v2/pods":{"post":{"summary":"Create Pod","deprecated":false,"description":"Create a new pod","operationId":"createPod","tags":["API v2","Pods v2"],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PodV2CreateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultPodV2Response"}}},"headers":{}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}},"10000":{"description":"Pod created successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultPodV2Response"}}},"headers":{}},"10001":{"description":"Invalid request parameters","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}}}}}},"components":{"schemas":{"PodV2CreateRequest":{"type":"object","description":"Pod Create Request v2","properties":{"regions":{"type":"array","description":"Acceptable region codes","items":{"type":"string"},"uniqueItems":true},"name":{"type":"string","description":"Pod name","maxLength":255,"minLength":1},"image":{"type":"string","description":"Docker image name","maxLength":255,"minLength":1},"containerRegistryAuthId":{"type":"integer","format":"int64","description":"Container registry auth ID"},"imageRegistry":{"type":"string","description":"Image registry URL","maxLength":255,"minLength":0},"imagePublicType":{"type":"string","description":"Image type: PUBLIC or PRIVATE","enum":["PUBLIC","PRIVATE"]},"resourceType":{"type":"string","description":"Resource type: GPU or CPU","enum":["GPU","CPU"]},"gpuType":{"type":"string","description":"GPU type","minLength":1},"gpuCount":{"type":"integer","format":"int32","description":"GPU count (must be power of 2)"},"isSpot":{"type":"boolean","description":"Create on Spot resource when true"},"maxPrice":{"type":"number","description":"Spot instance max hourly price cap for the whole machine; only valid when isSpot=true"},"shmInGb":{"type":"integer","format":"int32","description":"Shared memory size in GB"},"minSingleCardRamInGb":{"type":"integer","format":"int32","description":"Minimum single card RAM in GB"},"minSingleCardVramInGb":{"type":"integer","format":"int32","description":"Minimum single card VRAM in GB"},"minSingleCardVcpu":{"type":"integer","format":"int32","description":"Minimum single card vCPU count"},"containerVolumeInGb":{"type":"integer","format":"int32","description":"Container volume size in GB"},"initializationCommand":{"type":"string","description":"Initialization command"},"environmentVars":{"type":"array","description":"Environment variables","items":{"$ref":"#/components/schemas/KeyValuePairDTO"}},"expose":{"type":"array","description":"Ports to expose","items":{"$ref":"#/components/schemas/OpenapiPodExposePortRequest"}},"volumes":{"type":"array","description":"Existing volumes to mount","items":{"$ref":"#/components/schemas/PodV2VolumeRequest"}},"callbackUrl":{"type":"string","description":"Pod lifecycle webhook callback URL. When creating a Pod, you can provide a `callbackUrl` in the request body. The platform will send HTTP POST notifications to this URL whenever the Pod transitions into a key lifecycle state (RUNNING, TERMINATED, FAILED, or DEGRADED).","maxLength":512,"minLength":0}},"required":["gpuCount","gpuType","image","name"]},"KeyValuePairDTO":{"type":"object","description":"KeyValuePairDTO","properties":{"key":{"type":"string","description":"key","minLength":1},"value":{"type":"string","description":"value","minLength":1}},"required":["key","value"]},"OpenapiPodExposePortRequest":{"type":"object","description":"OpenapiPodExposePortRequest","properties":{"port":{"type":"integer","format":"int32","description":"port","maximum":65535,"minimum":0},"protocol":{"type":"string","description":"protocol","enum":["HTTP","TCP"]}},"required":["port"]},"PodV2VolumeRequest":{"type":"object","description":"Pod v2 volume mount request","properties":{"id":{"type":"string","description":"Volume ID returned by /v2/volumes, string to avoid JavaScript int64 precision loss","minLength":1},"mountPath":{"type":"string","description":"Mount path inside the container","minLength":1}},"required":["id","mountPath"]},"ResultPodV2Response":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"$ref":"#/components/schemas/PodV2Response","description":"data"}}},"PodV2Response":{"type":"object","description":"Pod Response v2","properties":{"id":{"type":"integer","format":"int64","description":"Pod ID"},"orgId":{"type":"integer","format":"int64","description":"Organization ID"},"applicantId":{"type":"integer","format":"int64","description":"User ID who created the pod"},"name":{"type":"string","description":"Pod name"},"imageId":{"type":"integer","format":"int64","description":"Image ID"},"officialImage":{"type":"string","description":"Image source","enum":["OFFICIAL","CUSTOM"]},"imagePublicType":{"type":"string","description":"Image type","enum":["PUBLIC","PRIVATE"]},"image":{"type":"string","description":"Docker image name"},"imageRegistry":{"type":"string","description":"Image registry URL"},"imageRegistryUsername":{"type":"string","description":"Image registry username"},"resourceType":{"type":"string","description":"Resource type","enum":["GPU","CPU"]},"gpuType":{"type":"string","description":"GPU type"},"gpuDisplayName":{"type":"string","description":"GPU display name"},"gpuCount":{"type":"integer","format":"int32","description":"Number of GPUs"},"shmInGb":{"type":"integer","format":"int32","description":"Shared memory in GB"},"singleCardVramInGb":{"type":"integer","format":"int32","description":"Single card VRAM in GB"},"singleCardRamInGb":{"type":"integer","format":"int32","description":"Single card RAM in GB"},"singleCardVcpu":{"type":"integer","format":"int32","description":"Single card vCPU count"},"location":{"type":"string","description":"Location"},"region":{"type":"string","description":"Region code"},"cloudType":{"type":"string","description":"Cloud type","enum":["SECURE","COMMUNITY"]},"containerVolumeInGb":{"type":"integer","format":"int32","description":"Container volume in GB"},"networkUploadMbps":{"type":"number","description":"Network upload speed (Mbps)"},"networkDownloadMbps":{"type":"number","description":"Network download speed (Mbps)"},"diskReadSpeedMbps":{"type":"number","description":"Disk read speed (Mbps)"},"diskWriteSpeedMbps":{"type":"number","description":"Disk write speed (Mbps)"},"singleCardPrice":{"type":"number","description":"GPU single card price"},"containerVolumePrice":{"type":"number","description":"Container volume price"},"initializationCommand":{"type":"string","description":"Initialization command"},"environmentVars":{"type":"array","description":"Environment variables","items":{"$ref":"#/components/schemas/KeyValuePairDTO"}},"expose":{"type":"array","description":"Exposed ports","items":{"$ref":"#/components/schemas/OpenapiPodExposePortResponse"}},"sshCmd":{"type":"string","description":"SSH command template"},"status":{"type":"string","description":"Pod status","enum":["INITIALIZING","RUNNING","PAUSING","PAUSED","TERMINATING","TERMINATED","FAILED","PENDING","PREPARING"]},"createdAt":{"type":"integer","format":"int64","description":"Creation timestamp (epoch milliseconds)"},"updatedAt":{"type":"integer","format":"int64","description":"Last update timestamp (epoch milliseconds)"},"volumes":{"type":"array","description":"Mounted volumes","items":{"$ref":"#/components/schemas/PodV2VolumeResponse"}},"internalIp":{"type":"string","description":"Internal IP address"},"desiredState":{"type":"string","description":"Desired state","enum":["RUNNING","PAUSED"]},"isSpot":{"type":"boolean","description":"Whether the pod was created on a Spot resource"},"persistentMountPath":{"type":"string","description":"Persistent volume mount path"},"persistentVolumePrice":{"type":"number","description":"Persistent volume price"},"callbackUrl":{"type":"string","description":"Pod lifecycle webhook callback URL"}}},"OpenapiPodExposePortResponse":{"type":"object","description":"OpenapiPodExposePortResponse","properties":{"port":{"type":"integer","format":"int32","description":"port","maximum":65535,"minimum":0},"proxyPort":{"type":"integer","format":"int32","description":"proxy port"},"protocol":{"type":"string","description":"protocol","enum":["HTTP","TCP"]},"host":{"type":"string","description":"host"},"healthy":{"type":"boolean","description":"healthy"},"ingressUrl":{"type":"string","description":"ingress url"},"serviceName":{"type":"string","description":"service name"}},"required":["port"]},"PodV2VolumeResponse":{"type":"object","description":"Pod v2 mounted volume response","properties":{"id":{"type":"string","description":"Volume ID as string to avoid JavaScript int64 precision loss"},"mountPath":{"type":"string","description":"Mount path inside the pod"},"mountMode":{"type":"string","description":"Mount mode","enum":["Data","System"]}}},"Result":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## Delete Pod

> Delete a pod

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"API v2"},{"name":"Pods v2"}],"security":[{}],"paths":{"/v2/pods/{id}":{"delete":{"summary":"Delete Pod","deprecated":false,"description":"Delete a pod","operationId":"deletePod","tags":["API v2","Pods v2"],"parameters":[{"name":"id","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultVoid"}}},"headers":{}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}},"10000":{"description":"Pod deleted","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultVoid"}}},"headers":{}},"13000":{"description":"Pod not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}}}}}},"components":{"schemas":{"ResultVoid":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}},"Result":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## Resume Pod

> Resume a paused pod

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"API v2"},{"name":"Pods v2"}],"security":[{}],"paths":{"/v2/pods/{id}/resume":{"post":{"summary":"Resume Pod","deprecated":false,"description":"Resume a paused pod","operationId":"resumePod","tags":["API v2","Pods v2"],"parameters":[{"name":"id","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultVoid"}}},"headers":{}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}},"10000":{"description":"Pod resumed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultVoid"}}},"headers":{}},"13000":{"description":"Pod not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}}}}}},"components":{"schemas":{"ResultVoid":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}},"Result":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## Pause Pod

> Pause a running pod

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"API v2"},{"name":"Pods v2"}],"security":[{}],"paths":{"/v2/pods/{id}/pause":{"post":{"summary":"Pause Pod","deprecated":false,"description":"Pause a running pod","operationId":"pausePod","tags":["API v2","Pods v2"],"parameters":[{"name":"id","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultVoid"}}},"headers":{}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}},"10000":{"description":"Pod paused","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultVoid"}}},"headers":{}},"13000":{"description":"Pod not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}}}}}},"components":{"schemas":{"ResultVoid":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}},"Result":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## List Pods

> Get all pods for your organization

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"API v2"},{"name":"Pods v2"}],"security":[{}],"paths":{"/v2/pods":{"get":{"summary":"List Pods","deprecated":false,"description":"Get all pods for your organization","operationId":"listPods","tags":["API v2","Pods v2"],"parameters":[{"name":"regionList","in":"query","description":"","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"statusList","in":"query","description":"Filter by status names, e.g. RUNNING, PAUSED, TERMINATED","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Success, returns list of pods","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultListPodV2Response"}}},"headers":{}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}},"10000":{"description":"Success","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultListPodV2Response"}}},"headers":{}}}}}},"components":{"schemas":{"ResultListPodV2Response":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"type":"array","description":"data","items":{"$ref":"#/components/schemas/PodV2Response"}}}},"PodV2Response":{"type":"object","description":"Pod Response v2","properties":{"id":{"type":"integer","format":"int64","description":"Pod ID"},"orgId":{"type":"integer","format":"int64","description":"Organization ID"},"applicantId":{"type":"integer","format":"int64","description":"User ID who created the pod"},"name":{"type":"string","description":"Pod name"},"imageId":{"type":"integer","format":"int64","description":"Image ID"},"officialImage":{"type":"string","description":"Image source","enum":["OFFICIAL","CUSTOM"]},"imagePublicType":{"type":"string","description":"Image type","enum":["PUBLIC","PRIVATE"]},"image":{"type":"string","description":"Docker image name"},"imageRegistry":{"type":"string","description":"Image registry URL"},"imageRegistryUsername":{"type":"string","description":"Image registry username"},"resourceType":{"type":"string","description":"Resource type","enum":["GPU","CPU"]},"gpuType":{"type":"string","description":"GPU type"},"gpuDisplayName":{"type":"string","description":"GPU display name"},"gpuCount":{"type":"integer","format":"int32","description":"Number of GPUs"},"shmInGb":{"type":"integer","format":"int32","description":"Shared memory in GB"},"singleCardVramInGb":{"type":"integer","format":"int32","description":"Single card VRAM in GB"},"singleCardRamInGb":{"type":"integer","format":"int32","description":"Single card RAM in GB"},"singleCardVcpu":{"type":"integer","format":"int32","description":"Single card vCPU count"},"location":{"type":"string","description":"Location"},"region":{"type":"string","description":"Region code"},"cloudType":{"type":"string","description":"Cloud type","enum":["SECURE","COMMUNITY"]},"containerVolumeInGb":{"type":"integer","format":"int32","description":"Container volume in GB"},"networkUploadMbps":{"type":"number","description":"Network upload speed (Mbps)"},"networkDownloadMbps":{"type":"number","description":"Network download speed (Mbps)"},"diskReadSpeedMbps":{"type":"number","description":"Disk read speed (Mbps)"},"diskWriteSpeedMbps":{"type":"number","description":"Disk write speed (Mbps)"},"singleCardPrice":{"type":"number","description":"GPU single card price"},"containerVolumePrice":{"type":"number","description":"Container volume price"},"initializationCommand":{"type":"string","description":"Initialization command"},"environmentVars":{"type":"array","description":"Environment variables","items":{"$ref":"#/components/schemas/KeyValuePairDTO"}},"expose":{"type":"array","description":"Exposed ports","items":{"$ref":"#/components/schemas/OpenapiPodExposePortResponse"}},"sshCmd":{"type":"string","description":"SSH command template"},"status":{"type":"string","description":"Pod status","enum":["INITIALIZING","RUNNING","PAUSING","PAUSED","TERMINATING","TERMINATED","FAILED","PENDING","PREPARING"]},"createdAt":{"type":"integer","format":"int64","description":"Creation timestamp (epoch milliseconds)"},"updatedAt":{"type":"integer","format":"int64","description":"Last update timestamp (epoch milliseconds)"},"volumes":{"type":"array","description":"Mounted volumes","items":{"$ref":"#/components/schemas/PodV2VolumeResponse"}},"internalIp":{"type":"string","description":"Internal IP address"},"desiredState":{"type":"string","description":"Desired state","enum":["RUNNING","PAUSED"]},"isSpot":{"type":"boolean","description":"Whether the pod was created on a Spot resource"},"persistentMountPath":{"type":"string","description":"Persistent volume mount path"},"persistentVolumePrice":{"type":"number","description":"Persistent volume price"},"callbackUrl":{"type":"string","description":"Pod lifecycle webhook callback URL"}}},"KeyValuePairDTO":{"type":"object","description":"KeyValuePairDTO","properties":{"key":{"type":"string","description":"key","minLength":1},"value":{"type":"string","description":"value","minLength":1}},"required":["key","value"]},"OpenapiPodExposePortResponse":{"type":"object","description":"OpenapiPodExposePortResponse","properties":{"port":{"type":"integer","format":"int32","description":"port","maximum":65535,"minimum":0},"proxyPort":{"type":"integer","format":"int32","description":"proxy port"},"protocol":{"type":"string","description":"protocol","enum":["HTTP","TCP"]},"host":{"type":"string","description":"host"},"healthy":{"type":"boolean","description":"healthy"},"ingressUrl":{"type":"string","description":"ingress url"},"serviceName":{"type":"string","description":"service name"}},"required":["port"]},"PodV2VolumeResponse":{"type":"object","description":"Pod v2 mounted volume response","properties":{"id":{"type":"string","description":"Volume ID as string to avoid JavaScript int64 precision loss"},"mountPath":{"type":"string","description":"Mount path inside the pod"},"mountMode":{"type":"string","description":"Mount mode","enum":["Data","System"]}}},"Result":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## Get Pod

> Get details of a specific pod

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"API v2"},{"name":"Pods v2"}],"security":[{}],"paths":{"/v2/pods/{id}":{"get":{"summary":"Get Pod","deprecated":false,"description":"Get details of a specific pod","operationId":"getPod","tags":["API v2","Pods v2"],"parameters":[{"name":"id","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultPodV2Response"}}},"headers":{}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}},"10000":{"description":"Pod found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultPodV2Response"}}},"headers":{}},"13000":{"description":"Pod not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}}}}}},"components":{"schemas":{"ResultPodV2Response":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"$ref":"#/components/schemas/PodV2Response","description":"data"}}},"PodV2Response":{"type":"object","description":"Pod Response v2","properties":{"id":{"type":"integer","format":"int64","description":"Pod ID"},"orgId":{"type":"integer","format":"int64","description":"Organization ID"},"applicantId":{"type":"integer","format":"int64","description":"User ID who created the pod"},"name":{"type":"string","description":"Pod name"},"imageId":{"type":"integer","format":"int64","description":"Image ID"},"officialImage":{"type":"string","description":"Image source","enum":["OFFICIAL","CUSTOM"]},"imagePublicType":{"type":"string","description":"Image type","enum":["PUBLIC","PRIVATE"]},"image":{"type":"string","description":"Docker image name"},"imageRegistry":{"type":"string","description":"Image registry URL"},"imageRegistryUsername":{"type":"string","description":"Image registry username"},"resourceType":{"type":"string","description":"Resource type","enum":["GPU","CPU"]},"gpuType":{"type":"string","description":"GPU type"},"gpuDisplayName":{"type":"string","description":"GPU display name"},"gpuCount":{"type":"integer","format":"int32","description":"Number of GPUs"},"shmInGb":{"type":"integer","format":"int32","description":"Shared memory in GB"},"singleCardVramInGb":{"type":"integer","format":"int32","description":"Single card VRAM in GB"},"singleCardRamInGb":{"type":"integer","format":"int32","description":"Single card RAM in GB"},"singleCardVcpu":{"type":"integer","format":"int32","description":"Single card vCPU count"},"location":{"type":"string","description":"Location"},"region":{"type":"string","description":"Region code"},"cloudType":{"type":"string","description":"Cloud type","enum":["SECURE","COMMUNITY"]},"containerVolumeInGb":{"type":"integer","format":"int32","description":"Container volume in GB"},"networkUploadMbps":{"type":"number","description":"Network upload speed (Mbps)"},"networkDownloadMbps":{"type":"number","description":"Network download speed (Mbps)"},"diskReadSpeedMbps":{"type":"number","description":"Disk read speed (Mbps)"},"diskWriteSpeedMbps":{"type":"number","description":"Disk write speed (Mbps)"},"singleCardPrice":{"type":"number","description":"GPU single card price"},"containerVolumePrice":{"type":"number","description":"Container volume price"},"initializationCommand":{"type":"string","description":"Initialization command"},"environmentVars":{"type":"array","description":"Environment variables","items":{"$ref":"#/components/schemas/KeyValuePairDTO"}},"expose":{"type":"array","description":"Exposed ports","items":{"$ref":"#/components/schemas/OpenapiPodExposePortResponse"}},"sshCmd":{"type":"string","description":"SSH command template"},"status":{"type":"string","description":"Pod status","enum":["INITIALIZING","RUNNING","PAUSING","PAUSED","TERMINATING","TERMINATED","FAILED","PENDING","PREPARING"]},"createdAt":{"type":"integer","format":"int64","description":"Creation timestamp (epoch milliseconds)"},"updatedAt":{"type":"integer","format":"int64","description":"Last update timestamp (epoch milliseconds)"},"volumes":{"type":"array","description":"Mounted volumes","items":{"$ref":"#/components/schemas/PodV2VolumeResponse"}},"internalIp":{"type":"string","description":"Internal IP address"},"desiredState":{"type":"string","description":"Desired state","enum":["RUNNING","PAUSED"]},"isSpot":{"type":"boolean","description":"Whether the pod was created on a Spot resource"},"persistentMountPath":{"type":"string","description":"Persistent volume mount path"},"persistentVolumePrice":{"type":"number","description":"Persistent volume price"},"callbackUrl":{"type":"string","description":"Pod lifecycle webhook callback URL"}}},"KeyValuePairDTO":{"type":"object","description":"KeyValuePairDTO","properties":{"key":{"type":"string","description":"key","minLength":1},"value":{"type":"string","description":"value","minLength":1}},"required":["key","value"]},"OpenapiPodExposePortResponse":{"type":"object","description":"OpenapiPodExposePortResponse","properties":{"port":{"type":"integer","format":"int32","description":"port","maximum":65535,"minimum":0},"proxyPort":{"type":"integer","format":"int32","description":"proxy port"},"protocol":{"type":"string","description":"protocol","enum":["HTTP","TCP"]},"host":{"type":"string","description":"host"},"healthy":{"type":"boolean","description":"healthy"},"ingressUrl":{"type":"string","description":"ingress url"},"serviceName":{"type":"string","description":"service name"}},"required":["port"]},"PodV2VolumeResponse":{"type":"object","description":"Pod v2 mounted volume response","properties":{"id":{"type":"string","description":"Volume ID as string to avoid JavaScript int64 precision loss"},"mountPath":{"type":"string","description":"Mount path inside the pod"},"mountMode":{"type":"string","description":"Mount mode","enum":["Data","System"]}}},"Result":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## List GPU machine specs

> List GPU machine spec options for Pod v2 create, including per-count availability, volume limits, and prices.

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"API v2"},{"name":"GPU list v2"}],"security":[{}],"paths":{"/v2/gpu/list":{"post":{"summary":"List GPU machine specs","deprecated":false,"description":"List GPU machine spec options for Pod v2 create, including per-count availability, volume limits, and prices.","operationId":"listGpuResources","tags":["API v2","GPU list v2"],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GpuListV2Request"}}}},"responses":{"200":{"description":"Success","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultV2PageResponseGpuListV2Item"}}},"headers":{}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}},"10000":{"description":"Success","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultV2PageResponseGpuListV2Item"}}},"headers":{}}}}}},"components":{"schemas":{"GpuListV2Request":{"type":"object","description":"GPU list v2 request","properties":{"page":{"type":"integer","format":"int64","description":"Page number, 1-based"},"size":{"type":"integer","format":"int64","description":"Page size"},"regions":{"type":"array","description":"Region filters","items":{"type":"string"}},"gpuTypes":{"type":"array","description":"GPU type filters","items":{"type":"string"}},"gpuCounts":{"type":"array","description":"GPU card count filters","items":{"type":"integer","format":"int32"}},"minGpuMemoryInGb":{"type":"integer","format":"int32","description":"Minimum GPU memory per card in GB"},"minRamPerGpuInGb":{"type":"integer","format":"int32","description":"Minimum RAM per GPU card in GB"},"minVcpuPerGpu":{"type":"integer","format":"int32","description":"Minimum vCPU per GPU card"},"containerVolumeInGb":{"type":"integer","format":"int32","description":"Container volume size in GB. Omitted means no container-volume filtering."},"systemVolumeInGb":{"type":"integer","format":"int32","description":"Local system volume size in GB. Omitted or null means no system-volume filtering."},"cloudTypes":{"type":"array","description":"Cloud type filters","enum":["SECURE","COMMUNITY"],"items":{"type":"string"}},"acceleratorVendor":{"type":"string","default":"NVIDIA","description":"Accelerator vendor filter. Defaults to NVIDIA when omitted.","enum":["NVIDIA","AWS"]},"includeUnavailable":{"type":"boolean","default":false,"description":"Whether to include unavailable resources"},"isSpot":{"type":"boolean","description":"Spot resource filter. Omitted means include both Spot and on-demand resources."}}},"ResultV2PageResponseGpuListV2Item":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"$ref":"#/components/schemas/V2PageResponseGpuListV2Item","description":"data"}}},"V2PageResponseGpuListV2Item":{"type":"object","description":"Paginated Response","properties":{"items":{"type":"array","description":"List of items in the current page","items":{"$ref":"#/components/schemas/GpuListV2Item"}},"page":{"type":"integer","format":"int64","description":"Current page number (1-based)"},"size":{"type":"integer","format":"int64","description":"Number of items per page"},"total":{"type":"integer","format":"int64","description":"Total number of items across all pages"},"pages":{"type":"integer","format":"int64","description":"Total number of pages"}}},"GpuListV2Item":{"type":"object","description":"GPU machine spec option","properties":{"gpuType":{"type":"string","description":"GPU type used for Pod create"},"displayName":{"type":"string","description":"GPU display name"},"gpuMemoryInGb":{"type":"integer","format":"int32","description":"GPU memory per card in GB"},"region":{"type":"string","description":"Region code"},"cloudType":{"type":"string","description":"Cloud type","enum":["SECURE","COMMUNITY"]},"acceleratorVendor":{"type":"string","description":"Accelerator vendor","enum":["NVIDIA","AWS"]},"isSpot":{"type":"boolean","description":"True when this machine option is Spot"},"status":{"type":"string","description":"Availability summary","enum":["AVAILABLE","UNAVAILABLE"]},"maxGpuCount":{"type":"integer","format":"int32","description":"Maximum supported GPU card count for this spec"},"availableGpuCounts":{"type":"array","description":"Currently available GPU card count options","items":{"type":"integer","format":"int32"}},"ramPerGpuInGb":{"type":"integer","format":"int32","description":"RAM per GPU card in GB"},"vcpuPerGpu":{"type":"integer","format":"int32","description":"vCPU per GPU card"},"localDiskPerGpuInGb":{"type":"integer","format":"int32","description":"Local disk per GPU card in GB"},"gpuCountOptions":{"type":"array","description":"GPU count options with availability, volume limits, and price","items":{"$ref":"#/components/schemas/GpuListV2GpuCountOption"}}}},"GpuListV2GpuCountOption":{"type":"object","description":"GPU count option for a machine spec","properties":{"gpuCount":{"type":"integer","format":"int32","description":"GPU card count"},"available":{"type":"boolean","description":"Whether this GPU count is currently creatable"},"totalGpuMemoryInGb":{"type":"integer","format":"int32","description":"Total GPU memory in GB"},"totalRamInGb":{"type":"integer","format":"int32","description":"Total RAM in GB"},"totalVcpu":{"type":"integer","format":"int32","description":"Total vCPU count"},"totalLocalDiskInGb":{"type":"integer","format":"int32","description":"Total local disk in GB"},"containerVolume":{"$ref":"#/components/schemas/GpuListV2ContainerVolume","description":"Container volume limits"},"systemVolume":{"$ref":"#/components/schemas/GpuListV2SystemVolume","description":"Local system volume limits"},"price":{"$ref":"#/components/schemas/GpuListV2Price","description":"Price estimate"}}},"GpuListV2ContainerVolume":{"type":"object","description":"Container volume limits for a GPU count option","properties":{"minInGb":{"type":"integer","format":"int32","description":"Minimum container volume size in GB"},"maxInGb":{"type":"integer","format":"int32","description":"Maximum container volume size in GB"},"maxInGbWithLocalSystemVolume":{"type":"integer","format":"int32","description":"Maximum container volume size in GB when Local system volume is enabled"},"maxInGbWithoutLocalSystemVolume":{"type":"integer","format":"int32","description":"Maximum container volume size in GB when Local system volume is not enabled"}}},"GpuListV2SystemVolume":{"type":"object","description":"Local system volume limits for a GPU count option","properties":{"supported":{"type":"boolean","description":"Whether user-configurable Local system volume is supported"},"minInGb":{"type":"integer","format":"int32","description":"Minimum system volume size in GB"},"maxInGb":{"type":"integer","format":"int32","description":"Maximum system volume size in GB"}}},"GpuListV2Price":{"type":"object","description":"Price estimate for a GPU count option","properties":{"pricePerGpuPerHour":{"type":"string","description":"Single GPU card price per hour"},"gpuPricePerHour":{"type":"string","description":"GPU price per hour for this GPU count"},"containerVolumePricePerHour":{"type":"string","description":"Container volume price per hour"},"systemVolumePricePerHour":{"type":"string","description":"System volume price per hour"},"containerVolumePricePerGbPerHour":{"type":"string","description":"Container volume price per GB per hour"},"systemVolumePricePerGbPerHour":{"type":"string","description":"System volume price per GB per hour"},"totalPricePerHour":{"type":"string","description":"Total estimated price per hour"},"currency":{"type":"string","description":"Currency"}}},"Result":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## Get Pod Logs

> Query pod container or system logs

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"API v2"},{"name":"Pods v2"}],"security":[{}],"paths":{"/v2/pods/{id}/logs":{"get":{"summary":"Get Pod Logs","deprecated":false,"description":"Query pod container or system logs","operationId":"getLogs","tags":["API v2","Pods v2"],"parameters":[{"name":"id","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"type","in":"query","description":"Log type","required":false,"schema":{"type":"string","description":"Log type","enum":["CONTAINER","SYSTEM"]}},{"name":"limit","in":"query","description":"Maximum number of log lines to return","required":false,"schema":{"type":"integer","format":"int32","description":"Maximum number of log lines to return"}},{"name":"cursor","in":"query","description":"Cursor for pagination","required":false,"schema":{"type":"string","description":"Cursor for pagination"}},{"name":"startTime","in":"query","description":"Start time, epoch milliseconds","required":false,"schema":{"type":"integer","format":"int64","description":"Start time, epoch milliseconds"}},{"name":"endTime","in":"query","description":"End time, epoch milliseconds","required":false,"schema":{"type":"integer","format":"int64","description":"End time, epoch milliseconds"}},{"name":"keyword","in":"query","description":"Keyword filter","required":false,"schema":{"type":"string","description":"Keyword filter"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultPodV2LogResponse"}}},"headers":{}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}}}}}},"components":{"schemas":{"ResultPodV2LogResponse":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"$ref":"#/components/schemas/PodV2LogResponse","description":"data"}}},"PodV2LogResponse":{"type":"object","description":"Pod logs response v2","properties":{"items":{"type":"array","description":"Log items","items":{"$ref":"#/components/schemas/PodV2LogItem"}},"page":{"$ref":"#/components/schemas/PodV2LogPage","description":"Cursor pagination info"}}},"PodV2LogItem":{"type":"object","description":"Pod log item v2","properties":{"timestamp":{"type":"string","description":"Log timestamp in ISO 8601 format"},"level":{"type":"string","description":"Log level"},"content":{"type":"string","description":"Log content"}}},"PodV2LogPage":{"type":"object","description":"Pod log cursor page v2","properties":{"previousCursor":{"type":"string","description":"Previous page cursor"},"nextCursor":{"type":"string","description":"Next page cursor"},"hasPrevious":{"type":"boolean","description":"Whether a previous page exists"},"hasNext":{"type":"boolean","description":"Whether a next page exists"}}},"Result":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## Get Pod Runtime

> Get accumulated pod runtime using billing uptime semantics

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"API v2"},{"name":"Pods v2"}],"security":[{}],"paths":{"/v2/pods/{id}/runtime":{"get":{"summary":"Get Pod Runtime","deprecated":false,"description":"Get accumulated pod runtime using billing uptime semantics","operationId":"getRuntime","tags":["API v2","Pods v2"],"parameters":[{"name":"id","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultPodV2RuntimeResponse"}}},"headers":{}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}}}}}},"components":{"schemas":{"ResultPodV2RuntimeResponse":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"$ref":"#/components/schemas/PodV2RuntimeResponse","description":"data"}}},"PodV2RuntimeResponse":{"type":"object","description":"Pod runtime response v2","properties":{"id":{"type":"string","description":"Pod ID"},"name":{"type":"string","description":"Pod name"},"status":{"type":"string","description":"Current pod status","enum":["INITIALIZING","RUNNING","PAUSING","PAUSED","TERMINATING","TERMINATED","FAILED","PENDING","PREPARING"]},"createdAt":{"type":"integer","format":"int64","description":"Pod creation timestamp, epoch milliseconds"},"updatedAt":{"type":"integer","format":"int64","description":"Pod update timestamp, epoch milliseconds"},"runningMillis":{"type":"integer","format":"int64","description":"Accumulated runtime in milliseconds using the existing billing uptime logic"},"runningSeconds":{"type":"integer","format":"int64","description":"Accumulated runtime in seconds, floor(runningMillis / 1000)"}}},"Result":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```


---

# 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/pods.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.
