v1

latestOpenAPI 3.0.32026-07-133733150.4 KB
pods

Create a new Pod

Creates a new Pod and optionally deploys it.

post/pods

Request body

allowedCudaVersionsstring[]

If the created Pod is a GPU Pod, a list of acceptable CUDA versions on the Pod. If not set, any CUDA version is acceptable.

cloudType'SECURE' | 'COMMUNITY'

Set to SECURE to create the Pod in Secure Cloud. Set to COMMUNITY to create the Pod in Community Cloud. To determine which one suits your needs, see https://docs.runpod.io/pods/overview#pod-types.

computeType'GPU' | 'CPU'

Set to GPU to create a GPU Pod. Set to CPU to create a CPU Pod. If set to CPU, the Pod will not have a GPU attached and properties related to GPUs such as gpuTypeIds will be ignored. If set to GPU, the Pod will have a GPU attached and properties related to CPUs such as cpuFlavorIds will be ignored.

containerDiskInGbinteger nullable

The amount of disk space, in gigabytes (GB), to allocate on the container disk for the created Pod. The data on the container disk is wiped when the Pod restarts. To persist data across Pod restarts, set volumeInGb to configure the Pod network volume.

containerRegistryAuthIdstring

Registry credentials ID.

countryCodesstring[]

A list of country codes where the created Pod can be located. If not set, the Pod can be located in any country.

cpuFlavorIdsstring[]

If the created Pod is a CPU Pod, a list of Runpod CPU flavors which can be attached to the Pod. The order of the list determines the order to rent CPU flavors. See cpuFlavorPriority for how the order of the list affects Pod creation.

cpuFlavorPriority'availability' | 'custom'

If the created Pod is a CPU Pod, set to availability to respond to current CPU flavor availability. Set to custom to always try to rent CPU flavors in the order specified in cpuFlavorIds.

dataCenterIdsstring[]

A list of Runpod data center IDs where the created Pod can be located. See dataCenterPriority for information on how the order of the list affects Pod creation.

dataCenterPriority'availability' | 'custom'

Set to availability to respond to current machine availability. Set to custom to always try to rent machines from data centers in the order specified in dataCenterIds.

dockerEntrypointstring[]

If specified, overrides the ENTRYPOINT for the Docker image run on the created Pod. If [], uses the ENTRYPOINT defined in the image.

dockerStartCmdstring[]

If specified, overrides the start CMD for the Docker image run on the created Pod. If [], uses the start CMD defined in the image.

envobject
globalNetworkingboolean

Set to true to enable global networking for the created Pod. Currently only available for On-Demand GPU Pods on some Secure Cloud data centers.

gpuCountinteger

If the created Pod is a GPU Pod, the number of GPUs attached to the created Pod.

gpuTypeIdsstring[]

If the created Pod is a GPU Pod, a list of Runpod GPU types which can be attached to the created Pod. The order of the list determines the order to rent GPU types. See gpuTypePriority for information on how the order of the list affects Pod creation.

gpuTypePriority'availability' | 'custom'

If the created Pod is a GPU Pod, set to availability to respond to current GPU type availability. Set to custom to always try to rent GPU types in the order specified in gpuTypeIds.

imageNamestring

The image tag for the container run on the created Pod.

interruptibleboolean

Set to true to create an interruptible or spot Pod. An interruptible Pod can be rented at a lower cost but can be stopped at any time to free up resources for another Pod. A reserved Pod is rented at a higher cost but runs until it exits or is manually stopped.

lockedboolean

Set to true to lock a Pod. Locking a Pod disables stopping or resetting the Pod.

minDiskBandwidthMBpsnumber

The minimum disk bandwidth, in megabytes per second (MBps), for the created Pod.

minDownloadMbpsnumber

The minimum download speed, in megabits per second (Mbps), for the created Pod.

minRAMPerGPUinteger

If the created Pod is a GPU Pod, the minimum amount of RAM, in gigabytes (GB), allocated to the created Pod for each GPU attached to the Pod.

minUploadMbpsnumber

The minimum upload speed, in megabits per second (Mbps), for the created Pod.

minVCPUPerGPUinteger

If the created Pod is a GPU Pod, the minimum number of virtual CPUs allocated to the created Pod for each GPU attached to the Pod.

namestring

A user-defined name for the created Pod. The name does not need to be unique.

networkVolumeIdstring

The unique string identifying the network volume to attach to the created Pod. If attached, a network volume replaces the Pod network volume.

portsstring[]

A list of ports exposed on the created Pod. Each port is formatted as [port number]/[protocol]. Protocol can be either http or tcp.

supportPublicIpboolean

If the created Pod is on Community Cloud, set to true if you need the Pod to expose a public IP address. If null, the Pod might not have a public IP address. On Secure Cloud, the Pod will always have a public IP address.

templateIdstring

If the Pod is created with a template, the unique string identifying that template.

vcpuCountinteger

If the created Pod is a CPU Pod, the number of vCPUs allocated to the Pod.

volumeInGbinteger nullable

The amount of disk space, in gigabytes (GB), to allocate on the Pod volume for the created Pod. The data on the Pod volume is persisted across Pod restarts. To persist data so that future Pods can access it, create a network volume and set networkVolumeId to attach it to the Pod.

volumeMountPathstring

If either a Pod volume or a network volume is attached to a Pod, the absolute path where the network volume will be mounted in the filesystem.

Example request

{
  "containerRegistryAuthId": "clzdaifot0001l90809257ynb",
  "dataCenterIds": [
    "EU-RO-1",
    "CA-MTL-1"
  ],
  "env": {
    "ENV_VAR": "value"
  },
  "globalNetworking": true,
  "imageName": "runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04",
  "ports": [
    "8888/http",
    "22/tcp"
  ],
  "supportPublicIp": true
}

Response

Pod successfully created.

adjustedCostPerHrnumber

The effective cost in Runpod credits per hour of running a Pod, adjusted by active Savings Plans.

aiApiIdstring

Synonym for endpointId (legacy name).

consumerUserIdstring

A unique string identifying the Runpod user who rents a Pod.

containerDiskInGbinteger

The amount of disk space, in gigabytes (GB), to allocate on the container disk for a Pod. The data on the container disk is wiped when the Pod restarts. To persist data across Pod restarts, set volumeInGb to configure the Pod network volume.

containerRegistryAuthIdstring

If a Pod is created with a container registry auth, the unique string identifying that container registry auth.

costPerHrnumber

The cost in Runpod credits per hour of running a Pod. Note that the actual cost may be lower if Savings Plans are applied.

cpuFlavorIdstring

If the Pod is a CPU Pod, the unique string identifying the CPU flavor the Pod is running on.

desiredStatus'RUNNING' | 'EXITED' | 'TERMINATED'

The current expected status of a Pod.

dockerEntrypointstring[]

If specified, overrides the ENTRYPOINT for the Docker image run on the created Pod. If [], uses the ENTRYPOINT defined in the image.

dockerStartCmdstring[]

If specified, overrides the start CMD for the Docker image run on the created Pod. If [], uses the start CMD defined in the image.

endpointIdstring

If the Pod is a Serverless worker, a unique string identifying the associated endpoint.

envobject
idstring

A unique string identifying a Pod.

imagestring

The image tag for the container run on a Pod.

interruptibleboolean

Describes how a Pod is rented. An interruptible Pod can be rented at a lower cost but can be stopped at any time to free up resources for another Pod. A reserved Pod is rented at a higher cost but runs until it exits or is manually stopped.

lastStartedAtstring

The UTC timestamp when a Pod was last started.

lastStatusChangestring

A string describing the last lifecycle event on a Pod.

lockedboolean

Set to true to lock a Pod. Locking a Pod disables stopping or resetting the Pod.

machineIdstring

A unique string identifying the host machine a Pod is running on.

memoryInGbnumber

The amount of RAM, in gigabytes (GB), attached to a Pod.

namestring

A user-defined name for the created Pod. The name does not need to be unique.

portMappingsobject nullable

A mapping of internal ports to public ports on a Pod. For example, { "22": 10341 } means that port 22 on the Pod is mapped to port 10341 and is publicly accessible at [public ip]:10341. If the Pod is still initializing, this mapping is not yet determined and will be empty.

portsstring[]

A list of ports exposed on a Pod. Each port is formatted as [port number]/[protocol]. Protocol can be either http or tcp.

publicIpstring ipv4 nullable

The public IP address of a Pod. If the Pod is still initializing, this IP is not yet determined and will be empty.

slsVersioninteger

If the Pod is a Serverless worker, the version of the associated endpoint (see Endpoint Version).

templateIdstring

If a Pod is created with a template, the unique string identifying that template.

vcpuCountnumber

The number of virtual CPUs attached to a Pod.

volumeEncryptedboolean

Set to true if the local network volume of a Pod is encrypted. Can only be set when creating a Pod.

volumeInGbinteger

The amount of disk space, in gigabytes (GB), to allocate on the Pod volume for a Pod. The data on the Pod volume is persisted across Pod restarts. To persist data so that future Pods can access it, create a network volume and set networkVolumeId to attach it to the Pod.

volumeMountPathstring

If either a Pod volume or a network volume is attached to a Pod, the absolute path where the network volume is mounted in the filesystem.

Example response

{
  "adjustedCostPerHr": 0.69,
  "consumerUserId": "user_2PyTJrLzeuwfZilRZ7JhCQDuSqo",
  "containerDiskInGb": 50,
  "containerRegistryAuthId": "clzdaifot0001l90809257ynb",
  "cpuFlavorId": "cpu3c",
  "env": {
    "ENV_VAR": "value"
  },
  "gpu": {
    "count": 1
  },
  "id": "xedezhzb9la3ye",
  "image": "runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04",
  "lastStartedAt": "2024-07-12T19:14:40.144Z",
  "lastStatusChange": "Rented by User: Fri Jul 12 2024 15:14:40 GMT-0400 (Eastern Daylight Time)",
  "machine": {
    "gpuType": {
      "count": 1
    }
  },
  "machineId": "s194cr8pls2z",
  "memoryInGb": 62,
  "networkVolume": {
    "id": "agv6w2qcg7",
    "name": "my network volume",
    "size": 50,
    "dataCenterId": "EU-RO-1"
  },
  "portMappings": {
    "22": 10341
  },
  "ports": [
    "8888/http",
    "22/tcp"
  ],
  "publicIp": "100.65.0.119",
  "savingsPlans": [
    {
      "costPerHr": 0.21,
      "endTime": "2024-07-12T19:14:40.144Z",
      "gpuTypeId": "NVIDIA GeForce RTX 4090",
      "id": "clkrb4qci0000mb09c7sualzo",
      "podId": "xedezhzb9la3ye",
      "startTime": "2024-05-12T19:14:40.144Z"
    }
  ],
  "vcpuCount": 24,
  "volumeInGb": 20,
  "volumeMountPath": "/workspace"
}