POST
/
pods
Create a new Pod
curl --request POST \
  --url https://rest.runpod.io/v1/pods \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "allowedCudaVersions": [
    "12.8"
  ],
  "cloudType": "SECURE",
  "computeType": "GPU",
  "containerDiskInGb": 50,
  "containerRegistryAuthId": "clzdaifot0001l90809257ynb",
  "countryCodes": [
    "<string>"
  ],
  "cpuFlavorIds": [
    "cpu3c"
  ],
  "cpuFlavorPriority": "availability",
  "dataCenterIds": [
    "EU-RO-1",
    "CA-MTL-1"
  ],
  "dataCenterPriority": "availability",
  "dockerEntrypoint": [],
  "dockerStartCmd": [],
  "env": {
    "ENV_VAR": "value"
  },
  "globalNetworking": true,
  "gpuCount": 1,
  "gpuTypeIds": [
    "NVIDIA GeForce RTX 4090"
  ],
  "gpuTypePriority": "availability",
  "imageName": "runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04",
  "interruptible": false,
  "locked": false,
  "minDiskBandwidthMBps": 123,
  "minDownloadMbps": 123,
  "minRAMPerGPU": 8,
  "minUploadMbps": 123,
  "minVCPUPerGPU": 2,
  "name": "my pod",
  "networkVolumeId": "<string>",
  "ports": [
    "8888/http",
    "22/tcp"
  ],
  "supportPublicIp": true,
  "templateId": null,
  "vcpuCount": 2,
  "volumeInGb": 20,
  "volumeMountPath": "/workspace"
}'
{
  "adjustedCostPerHr": 0.69,
  "aiApiId": null,
  "consumerUserId": "user_2PyTJrLzeuwfZilRZ7JhCQDuSqo",
  "containerDiskInGb": 50,
  "containerRegistryAuthId": "clzdaifot0001l90809257ynb",
  "costPerHr": "0.74",
  "cpuFlavorId": "cpu3c",
  "desiredStatus": "RUNNING",
  "dockerEntrypoint": [
    "<string>"
  ],
  "dockerStartCmd": [
    "<string>"
  ],
  "endpointId": null,
  "env": {
    "ENV_VAR": "value"
  },
  "gpu": {
    "id": "<string>",
    "count": 1,
    "displayName": "<string>",
    "securePrice": 123,
    "communityPrice": 123,
    "oneMonthPrice": 123,
    "threeMonthPrice": 123,
    "sixMonthPrice": 123,
    "oneWeekPrice": 123,
    "communitySpotPrice": 123,
    "secureSpotPrice": 123
  },
  "id": "xedezhzb9la3ye",
  "image": "runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04",
  "interruptible": false,
  "lastStartedAt": "2024-07-12T19:14:40.144Z",
  "lastStatusChange": "Rented by User: Fri Jul 12 2024 15:14:40 GMT-0400 (Eastern Daylight Time)",
  "locked": false,
  "machine": {
    "minPodGpuCount": 123,
    "gpuTypeId": "<string>",
    "gpuType": {
      "id": "<string>",
      "count": 1,
      "displayName": "<string>",
      "securePrice": 123,
      "communityPrice": 123,
      "oneMonthPrice": 123,
      "threeMonthPrice": 123,
      "sixMonthPrice": 123,
      "oneWeekPrice": 123,
      "communitySpotPrice": 123,
      "secureSpotPrice": 123
    },
    "cpuCount": 123,
    "cpuTypeId": "<string>",
    "cpuType": {
      "id": "<string>",
      "displayName": "<string>",
      "cores": 123,
      "threadsPerCore": 123,
      "groupId": "<string>"
    },
    "location": "<string>",
    "dataCenterId": "<string>",
    "diskThroughputMBps": 123,
    "maxDownloadSpeedMbps": 123,
    "maxUploadSpeedMbps": 123,
    "supportPublicIp": true,
    "secureCloud": true,
    "maintenanceStart": "<string>",
    "maintenanceEnd": "<string>",
    "maintenanceNote": "<string>",
    "note": "<string>",
    "costPerHr": 123,
    "currentPricePerGpu": 123,
    "gpuAvailable": 123,
    "gpuDisplayName": "<string>"
  },
  "machineId": "s194cr8pls2z",
  "memoryInGb": 62,
  "name": "<string>",
  "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"
    }
  ],
  "slsVersion": 0,
  "templateId": null,
  "vcpuCount": 24,
  "volumeEncrypted": false,
  "volumeInGb": 20,
  "volumeMountPath": "/workspace"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Input for Pod creation.

allowedCudaVersions
enum<string>[]

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
enum<string>
default:SECURE

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/references/faq/#secure-cloud-vs-community-cloud.

Available options:
SECURE,
COMMUNITY
computeType
enum<string>
default:GPU

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.

Available options:
GPU,
CPU
containerDiskInGb
integer | null
default:50

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.

containerRegistryAuthId
string

Registry credentials ID.

Example:

"clzdaifot0001l90809257ynb"

countryCodes
string[]

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

cpuFlavorIds
enum<string>[]

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
enum<string>
default:availability

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.

Available options:
availability,
custom
dataCenterIds
enum<string>[]

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.

Example:
["EU-RO-1", "CA-MTL-1"]
dataCenterPriority
enum<string>
default:availability

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.

Available options:
availability,
custom
dockerEntrypoint
string[]

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

dockerStartCmd
string[]

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

env
object
Example:
{ "ENV_VAR": "value" }
globalNetworking
boolean
default:false

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.

Example:

true

gpuCount
integer
default:1

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

Required range: x >= 1
gpuTypeIds
enum<string>[]

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
enum<string>
default:availability

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.

Available options:
availability,
custom
imageName
string

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

Example:

"runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04"

interruptible
boolean
default:false

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.

locked
boolean
default:false

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

minDiskBandwidthMBps
number

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

minDownloadMbps
number

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

minRAMPerGPU
integer
default:8

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.

minUploadMbps
number

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

minVCPUPerGPU
integer
default:2

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.

name
string
default:my pod

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

Maximum length: 191
networkVolumeId
string

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

ports
string[]

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

Example:
["8888/http", "22/tcp"]
supportPublicIp
boolean

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.

Example:

true

templateId
string

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

Example:

null

vcpuCount
integer
default:2

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

volumeInGb
integer | null
default:20

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.

volumeMountPath
string
default:/workspace

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.

Response

Pod successfully created.

adjustedCostPerHr
number

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

Example:

0.69

aiApiId
string

Synonym for endpointId (legacy name).

Example:

null

consumerUserId
string

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

Example:

"user_2PyTJrLzeuwfZilRZ7JhCQDuSqo"

containerDiskInGb
integer

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.

Example:

50

containerRegistryAuthId
string

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

Example:

"clzdaifot0001l90809257ynb"

costPerHr
number

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

Example:

"0.74"

cpuFlavorId
string

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

Example:

"cpu3c"

desiredStatus
enum<string>

The current expected status of a Pod.

Available options:
RUNNING,
EXITED,
TERMINATED
dockerEntrypoint
string[]

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

dockerStartCmd
string[]

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

endpointId
string

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

Example:

null

env
object
Example:
{ "ENV_VAR": "value" }
gpu
object
id
string

A unique string identifying a Pod.

Example:

"xedezhzb9la3ye"

image
string

The image tag for the container run on a Pod.

Example:

"runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04"

interruptible
boolean

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.

Example:

false

lastStartedAt
string

The UTC timestamp when a Pod was last started.

Example:

"2024-07-12T19:14:40.144Z"

lastStatusChange
string

A string describing the last lifecycle event on a Pod.

Example:

"Rented by User: Fri Jul 12 2024 15:14:40 GMT-0400 (Eastern Daylight Time)"

locked
boolean

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

Example:

false

machine
object

Information about the machine a Pod is running on (see Machine).

machineId
string

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

Example:

"s194cr8pls2z"

memoryInGb
number

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

Example:

62

name
string

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

Maximum length: 191
networkVolume
object

If a network volume is attached to a Pod, information about the network volume (see network volume schema).

portMappings
object

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.

Example:
{ "22": 10341 }
ports
string[]

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

Example:
["8888/http", "22/tcp"]
publicIp
string<ipv4> | null

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

Example:

"100.65.0.119"

savingsPlans
object[]

The list of active Savings Plans applied to a Pod (see Savings Plans). If none are applied, the list is empty.

slsVersion
integer

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

Example:

0

templateId
string

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

Example:

null

vcpuCount
number

The number of virtual CPUs attached to a Pod.

Example:

24

volumeEncrypted
boolean

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

Example:

false

volumeInGb
integer

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.

Example:

20

volumeMountPath
string

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:

"/workspace"