types

package
v2.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package types provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AvailabilityLevel

type AvailabilityLevel string

AvailabilityLevel Catalog stock availability level.

const (
	AvailabilityLevelHigh   AvailabilityLevel = "HIGH"
	AvailabilityLevelLow    AvailabilityLevel = "LOW"
	AvailabilityLevelMedium AvailabilityLevel = "MEDIUM"
	AvailabilityLevelNone   AvailabilityLevel = "NONE"
)

Defines values for AvailabilityLevel.

func (AvailabilityLevel) Valid

func (e AvailabilityLevel) Valid() bool

Valid indicates whether the value is a known member of the AvailabilityLevel enum.

type BadRequestError

type BadRequestError = ErrorResponse

BadRequestError defines model for BadRequestError.

type BaseContainerConfig

type BaseContainerConfig struct {
	// Args The container's command, as a single raw string. This is the field `entrypoint` and `cmd` encode into, exposed in its stored form.
	//
	// Two shapes are accepted. A bare shell string is treated as CMD and split into arguments, which is what the console's "Container start command" field writes. A JSON object of the form `{"entrypoint":[...],"cmd":[...]}` sets either or both explicitly.
	//
	// Responses always return both representations: `args` exactly as stored, plus the deconstructed `entrypoint` and `cmd`. Supplying `args` together with `entrypoint` or `cmd` is allowed only when they describe the same command, so a read-modify-write client can send back everything it received. Send `""` to clear, omit to leave unchanged.
	//
	//
	// Examples: --model meta-llama/Llama-3-8B --max-model-len 8192, {"entrypoint":["/bin/bash","-c"],"cmd":["python -u main.py"]},
	Args *string `json:"args,omitempty"`

	// Cmd Container CMD in exec form. When the image defines an ENTRYPOINT, this is the argument list passed to it. Encoded into the `args` field; supplying both is allowed only when they describe the same command. Send `[]` to clear, omit to leave unchanged.
	//
	//
	// Examples: ["--model","meta-llama/Llama-3-8B","--max-model-len","8192"]
	Cmd *[]string `json:"cmd,omitempty"`

	// Disk Container disk in GB (ephemeral, wiped on restart)
	//
	// Examples: 50
	Disk *int `json:"disk,omitempty"`

	// Entrypoint Container ENTRYPOINT in exec form, overriding the image's own. Encoded into `args` field; supplying both is allowed only when they describe the same command. Send `[]` to clear, omit to leave unchanged.
	//
	//
	// Examples: ["/bin/bash","-c"]
	Entrypoint *[]string `json:"entrypoint,omitempty"`

	// Env Environment variables as key-value pairs
	//
	// Examples: {"JUPYTER_PASSWORD":"changeme"}
	Env *map[string]string `json:"env,omitempty"`

	// Image Docker image reference
	//
	// Examples: runpod/pytorch:1.0.2-cu1281-torch280-ubuntu2404
	Image *string `json:"image,omitempty"`

	// Ports Exposed ports, formatted as port/protocol
	//
	// Examples: ["8888/http","22/tcp"]
	Ports *[]string `json:"ports,omitempty"`
}

BaseContainerConfig Container configuration universal to every containerized resource. Compose ContainerConfig instead unless the resource cannot support a direct registry credential (clusters — there the registry credential arrives via a pod template, see CreateClusterRequest.templateId).

type BaseCpuConfig

type BaseCpuConfig struct {
	// Id CPU flavor identifier, as returned by GET /v2/catalog/cpus.
	//
	// Examples: cpu5c
	Id string `json:"id"`

	// VcpuCount Number of vCPUs. Must be valid for the selected CPU flavor and must be a power of two.
	//
	// Examples: 4
	VcpuCount int `json:"vcpuCount"`
}

BaseCpuConfig defines model for BaseCpuConfig.

type BaseEndpointGpuConfig

type BaseEndpointGpuConfig struct {
	// Count GPUs per worker
	//
	// Examples: 1
	Count *int `json:"count,omitempty"`

	// ExcludedTypes GPU **type** IDs to subtract from the selected pools — the `id`
	// field of `GET /v2/catalog/gpus`, the same identifiers pods take in
	// `gpu.id`. Workers run on every type in `pools` except these. Omit to
	// use the whole pool.
	//
	// Pools stay the unit of selection; types are the unit of
	// subtraction. There is no inclusive allowlist: a card later added to
	// one of your pools becomes eligible, which is the honest reading of
	// "this pool, minus these".
	//
	// Tied to `pools`, because the two together are one selection:
	// supplying `pools` replaces that selection wholesale, so a `PATCH`
	// sending `pools` **without `excludedTypes`** **clears** them —
	// restate them to keep them. A `PATCH` that omits `pools` leaves both
	// the pools and the exclusions untouched, so changing only a CUDA
	// constraint cannot widen a pinned endpoint.
	//
	// Rejected with 400 if a value is not a GPU type in one of `pools`;
	// upstream accepts unrecognized exclusions silently, so a typo would
	// otherwise produce a filter that does nothing. Surrounding whitespace
	// is trimmed, so `" NVIDIA L40"` and `"NVIDIA L40"` mean the same card.
	//
	//
	// Examples: ["NVIDIA L40"]
	ExcludedTypes *[]string `json:"excludedTypes,omitempty"`

	// Pools Serverless GPU pool IDs (as returned by `GET /v2/catalog/gpus` in
	// `pool`). Workers are placed on whichever listed pool has capacity.
	// Narrow a pool down to specific cards with `excludedTypes`.
	//
	// On `PATCH`, `pools` and `excludedTypes` are one selection and are
	// replaced together, so sending `pools` by itself **clears the
	// exclusions**. Two cases:
	//
	// - **Changing pools, keeping exclusions** — send both fields in one
	//   request: `{"gpu": {"pools": ["ADA_24"], "excludedTypes":
	//   ["NVIDIA L40"]}}`. `GET` the endpoint first to read the current
	//   `excludedTypes` and resend the ones that still apply to the new
	//   pools; an exclusion naming a type outside `pools` is a 400.
	// - **Changing only `count` or a CUDA constraint** — omit `pools`:
	//   `{"gpu": {"minCudaVersion": "12.4"}}`. The pool list and the
	//   exclusions are both left exactly as they are.
	//
	// `excludedTypes` documents the full rule.
	//
	//
	// Examples: ["ADA_24"]
	Pools *[]string `json:"pools,omitempty"`
}

BaseEndpointGpuConfig defines model for BaseEndpointGpuConfig.

type BaseGpuConfig

type BaseGpuConfig struct {
	// Count Number of GPUs
	//
	// Examples: 1
	Count *int `json:"count,omitempty"`

	// Id GPU type identifier
	//
	// Examples: NVIDIA GeForce RTX 4090
	Id string `json:"id"`
}

BaseGpuConfig defines model for BaseGpuConfig.

type BillingAmounts

type BillingAmounts struct {
	// ClusterDiskAmount Cluster disk cost in USD for the bucket.
	ClusterDiskAmount float64 `json:"clusterDiskAmount"`

	// ClusterGpuAmount Cluster GPU compute cost in USD for the bucket.
	ClusterGpuAmount float64 `json:"clusterGpuAmount"`

	// ClusterNetworkingAmount Cluster inter-node networking cost in USD for the bucket.
	ClusterNetworkingAmount float64 `json:"clusterNetworkingAmount"`

	// EndpointAmount Runpod public endpoint cost in USD for the bucket.
	EndpointAmount float64 `json:"endpointAmount"`

	// PodCpuAmount CPU pod compute cost in USD for the bucket.
	PodCpuAmount float64 `json:"podCpuAmount"`

	// PodDiskAmount Pod disk cost in USD for the bucket.
	PodDiskAmount float64 `json:"podDiskAmount"`

	// PodGpuAmount GPU pod compute cost in USD for the bucket.
	PodGpuAmount float64 `json:"podGpuAmount"`

	// ServerlessCpuAmount Serverless CPU compute cost in USD for the bucket.
	ServerlessCpuAmount float64 `json:"serverlessCpuAmount"`

	// ServerlessDiskAmount Serverless disk cost in USD for the bucket.
	ServerlessDiskAmount float64 `json:"serverlessDiskAmount"`

	// ServerlessFeeAmount Unused and always 0. Platform charges are included in the serverless compute amounts.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	ServerlessFeeAmount float64 `json:"serverlessFeeAmount"`

	// ServerlessGpuAmount Serverless GPU compute cost in USD for the bucket.
	ServerlessGpuAmount float64 `json:"serverlessGpuAmount"`

	// StorageHighPerformanceAmount High-performance network volume storage cost in USD for the bucket.
	StorageHighPerformanceAmount float64 `json:"storageHighPerformanceAmount"`

	// StorageStandardAmount Standard network volume storage cost in USD for the bucket.
	StorageStandardAmount float64 `json:"storageStandardAmount"`

	// TotalAmount Total cost in USD for the bucket across all resources.
	//
	// Examples: 42.34
	TotalAmount float64 `json:"totalAmount"`
}

BillingAmounts Total spend across all billable Runpod resources with each cost component broken out, fully prefixed by resource. Backs the aggregate record's amounts and the metadata totals. Serverless amounts are inclusive of platform charges.

type BillingBucketSize

type BillingBucketSize string

BillingBucketSize Length of each billing time bucket.

Examples: day

const (
	BillingBucketSizeDay   BillingBucketSize = "day"
	BillingBucketSizeHour  BillingBucketSize = "hour"
	BillingBucketSizeMonth BillingBucketSize = "month"
	BillingBucketSizeWeek  BillingBucketSize = "week"
	BillingBucketSizeYear  BillingBucketSize = "year"
)

Defines values for BillingBucketSize.

func (BillingBucketSize) Valid

func (e BillingBucketSize) Valid() bool

Valid indicates whether the value is a known member of the BillingBucketSize enum.

type BillingEndTime

type BillingEndTime = time.Time

BillingEndTime defines model for BillingEndTime.

type BillingLastN

type BillingLastN = int

BillingLastN defines model for BillingLastN.

type BillingMetadata

type BillingMetadata struct {
	// Query Resolved query window and granularity (routes without a filter).
	Query BillingQuery `json:"query"`

	// RecordCount Number of records returned.
	RecordCount int `json:"recordCount"`

	// Totals Total spend across all billable Runpod resources with each cost component broken out, fully prefixed by resource. Backs the aggregate record's amounts and the metadata totals. Serverless amounts are inclusive of platform charges.
	Totals BillingAmounts `json:"totals"`
}

BillingMetadata defines model for BillingMetadata.

type BillingQuery

type BillingQuery struct {
	// BucketSize Length of each billing time bucket.
	//
	// Examples: day
	BucketSize BillingBucketSize `json:"bucketSize"`

	// EndTime End of the range, exclusive (RFC 3339).
	//
	// Examples: 2026-06-02T00:00:00Z
	EndTime time.Time `json:"endTime"`

	// StartTime Start of the range, inclusive (RFC 3339).
	//
	// Examples: 2026-06-01T00:00:00Z
	StartTime time.Time `json:"startTime"`
}

BillingQuery Resolved query window and granularity (routes without a filter).

type BillingRecord

type BillingRecord struct {
	// ClusterDiskAmount Cluster disk cost in USD for the bucket.
	ClusterDiskAmount float64 `json:"clusterDiskAmount"`

	// ClusterGpuAmount Cluster GPU compute cost in USD for the bucket.
	ClusterGpuAmount float64 `json:"clusterGpuAmount"`

	// ClusterNetworkingAmount Cluster inter-node networking cost in USD for the bucket.
	ClusterNetworkingAmount float64 `json:"clusterNetworkingAmount"`

	// EndTime End of the range, exclusive (RFC 3339).
	//
	// Examples: 2026-06-02T00:00:00Z
	EndTime time.Time `json:"endTime"`

	// EndpointAmount Runpod public endpoint cost in USD for the bucket.
	EndpointAmount float64 `json:"endpointAmount"`

	// PodCpuAmount CPU pod compute cost in USD for the bucket.
	PodCpuAmount float64 `json:"podCpuAmount"`

	// PodDiskAmount Pod disk cost in USD for the bucket.
	PodDiskAmount float64 `json:"podDiskAmount"`

	// PodGpuAmount GPU pod compute cost in USD for the bucket.
	PodGpuAmount float64 `json:"podGpuAmount"`

	// ServerlessCpuAmount Serverless CPU compute cost in USD for the bucket.
	ServerlessCpuAmount float64 `json:"serverlessCpuAmount"`

	// ServerlessDiskAmount Serverless disk cost in USD for the bucket.
	ServerlessDiskAmount float64 `json:"serverlessDiskAmount"`

	// ServerlessFeeAmount Unused and always 0. Platform charges are included in the serverless compute amounts.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	ServerlessFeeAmount float64 `json:"serverlessFeeAmount"`

	// ServerlessGpuAmount Serverless GPU compute cost in USD for the bucket.
	ServerlessGpuAmount float64 `json:"serverlessGpuAmount"`

	// StartTime Start of the range, inclusive (RFC 3339).
	//
	// Examples: 2026-06-01T00:00:00Z
	StartTime time.Time `json:"startTime"`

	// StorageHighPerformanceAmount High-performance network volume storage cost in USD for the bucket.
	StorageHighPerformanceAmount float64 `json:"storageHighPerformanceAmount"`

	// StorageStandardAmount Standard network volume storage cost in USD for the bucket.
	StorageStandardAmount float64 `json:"storageStandardAmount"`

	// TotalAmount Total cost in USD for the bucket across all resources.
	//
	// Examples: 42.34
	TotalAmount float64 `json:"totalAmount"`
}

BillingRecord A single time-bucketed record of total spend across all billable Runpod resources, with each cost component broken out. Returned by GET /v2/billing.

type BillingStartTime

type BillingStartTime = time.Time

BillingStartTime defines model for BillingStartTime.

type BillingTimeRange

type BillingTimeRange struct {
	// EndTime End of the range, exclusive (RFC 3339).
	//
	// Examples: 2026-06-02T00:00:00Z
	EndTime time.Time `json:"endTime"`

	// StartTime Start of the range, inclusive (RFC 3339).
	//
	// Examples: 2026-06-01T00:00:00Z
	StartTime time.Time `json:"startTime"`
}

BillingTimeRange Half-open time range [startTime, endTime) in RFC 3339. On a record it is the time bucket; on a query echo it is the resolved window.

type Build

type Build struct {
	// Branch Git branch the commit was pushed to.
	//
	// Examples: main
	Branch *string `json:"branch,omitempty"`

	// CommitDate When the triggering commit was authored.
	//
	// Examples: 2026-06-01T12:00:00Z
	CommitDate *time.Time `json:"commitDate,omitempty"`

	// CommitHash Short hash of the commit that triggered the build.
	//
	// Examples: abc1234
	CommitHash *string `json:"commitHash,omitempty"`

	// CommitMessage Examples: bump model
	CommitMessage *string `json:"commitMessage,omitempty"`

	// CompletedAt When the build reached a terminal state. Null while the build is live.
	//
	// Examples: 2026-06-01T12:04:31Z
	CompletedAt *time.Time `json:"completedAt,omitempty"`

	// Error Failure detail for `FAILED` / `TEST_FAILED` builds; null otherwise.
	Error *string `json:"error,omitempty"`

	// Id Examples: build_abc123
	Id string `json:"id"`

	// ImageName Fully qualified image the build produced (or will produce).
	//
	// Examples: registry.runpod.net/repo:abc1234
	ImageName *string `json:"imageName,omitempty"`

	// StartedAt When the build started. Null while the build is still pending.
	//
	// Examples: 2026-06-01T12:00:05Z
	StartedAt *time.Time `json:"startedAt,omitempty"`

	// Status GitHub build lifecycle state. `COMPLETED`, `FAILED`, `CANCELLED`, and
	// `TEST_FAILED` are terminal; `PENDING`, `BUILDING`, `UPLOADING`, and
	// `TESTING` are live.
	Status BuildState `json:"status"`
}

Build defines model for Build.

type BuildState

type BuildState string

BuildState GitHub build lifecycle state. `COMPLETED`, `FAILED`, `CANCELLED`, and `TEST_FAILED` are terminal; `PENDING`, `BUILDING`, `UPLOADING`, and `TESTING` are live.

const (
	BuildStateBuilding   BuildState = "BUILDING"
	BuildStateCancelled  BuildState = "CANCELLED"
	BuildStateCompleted  BuildState = "COMPLETED"
	BuildStateFailed     BuildState = "FAILED"
	BuildStatePending    BuildState = "PENDING"
	BuildStateTestFailed BuildState = "TEST_FAILED"
	BuildStateTesting    BuildState = "TESTING"
	BuildStateUploading  BuildState = "UPLOADING"
)

Defines values for BuildState.

func (BuildState) Valid

func (e BuildState) Valid() bool

Valid indicates whether the value is a known member of the BuildState enum.

type CatalogInclude

type CatalogInclude string

CatalogInclude Catalog include expansion. `AVAILABILITY` is the only supported value.

const (
	CatalogIncludeAvailability CatalogInclude = "AVAILABILITY"
)

Defines values for CatalogInclude.

func (CatalogInclude) Valid

func (e CatalogInclude) Valid() bool

Valid indicates whether the value is a known member of the CatalogInclude enum.

type CatalogIncludeParam

type CatalogIncludeParam = []CatalogInclude

CatalogIncludeParam defines model for CatalogIncludeParam.

type CatalogResourceAvailability

type CatalogResourceAvailability struct {
	// Availability Catalog stock availability level.
	Availability AvailabilityLevel `json:"availability"`

	// Id Catalog resource identifier.
	//
	// Examples: NVIDIA GeForce RTX 4090
	Id string `json:"id"`

	// Name Human-readable catalog resource name.
	//
	// Examples: RTX 4090
	Name string `json:"name"`
}

CatalogResourceAvailability defines model for CatalogResourceAvailability.

type Cloud

type Cloud string

Cloud Cloud tier. - `SECURE` — Runpod-owned datacenter hardware - `COMMUNITY` — community-hosted hardware

const (
	CloudCommunity Cloud = "COMMUNITY"
	CloudSecure    Cloud = "SECURE"
)

Defines values for Cloud.

func (Cloud) Valid

func (e Cloud) Valid() bool

Valid indicates whether the value is a known member of the Cloud enum.

type Cluster

type Cluster struct {
	// Compute The homogeneous compute shape of a cluster. Every pod in the cluster is identical: `podCount` pods, each with `gpuCountPerPod` GPUs of type `gpuTypeId`. Total GPUs = `podCount` * `gpuCountPerPod`.
	Compute ClusterCompute `json:"compute"`

	// CreatedAt Examples: 2026-06-29T20:00:00Z
	CreatedAt time.Time `json:"createdAt"`

	// DataCenterId Data center the cluster is placed in (a cluster is always within a single data center). Derived from the member pods; omitted until at least one pod is placed.
	//
	// Examples: US-TX-3
	DataCenterId *string `json:"dataCenterId,omitempty"`

	// Id Examples: cluster_abc123
	Id string `json:"id"`

	// Name Examples: my-training-cluster
	Name string `json:"name"`

	// Network The cluster's overlay network; omitted until the network is provisioned.
	Network *ClusterNetwork `json:"network,omitempty"`

	// Pods A lightweight summary of a cluster's member pods. Use `GET /v2/clusters/{id}/pods` to retrieve the full pod objects.
	Pods ClusterPodsSummary `json:"pods"`

	// Primary The primary (master) node; omitted until a primary pod is placed. Its `sshEndpoint` is omitted until that pod is RUNNING with SSH exposed.
	Primary *ClusterPrimary `json:"primary,omitempty"`

	// Template ID of the template this cluster's pods were created from; omitted when they were not created from one.
	//
	// Examples: tpl_abc
	Template *string `json:"template,omitempty"`

	// Type Cluster type. TRAINING is the generic distributed-training cluster; SLURM provisions a managed Slurm controller/compute topology; RAY provisions a managed Ray head/worker topology; APPLICATION is a general multi-node application cluster.
	//
	// Examples: TRAINING
	Type ClusterType `json:"type"`
}

Cluster A cluster. Cluster-level fields describe the identity and homogeneous shape; `pods` is a lightweight summary of the members. Fetch the full member pods — with their container config, mounts, and runtime state — from `GET /v2/clusters/{id}/pods`.

type ClusterBillingAmounts

type ClusterBillingAmounts struct {
	// DiskAmount Cluster disk cost in USD for the bucket.
	DiskAmount float64 `json:"diskAmount"`

	// GpuAmount Cluster GPU compute cost in USD for the bucket.
	GpuAmount float64 `json:"gpuAmount"`

	// NetworkingAmount Cluster inter-node networking cost in USD for the bucket.
	NetworkingAmount float64 `json:"networkingAmount"`

	// TotalAmount Total Instant Cluster cost in USD for the bucket.
	//
	// Examples: 99
	TotalAmount float64 `json:"totalAmount"`
}

ClusterBillingAmounts Cluster cost components (GPU-only, no CPU). Backs a record's amounts and the metadata totals.

type ClusterBillingMetadata

type ClusterBillingMetadata struct {
	Query ClusterBillingQuery `json:"query"`

	// RecordCount Number of records returned (buckets times distinct clusters).
	RecordCount int `json:"recordCount"`

	// Totals Cluster cost components (GPU-only, no CPU). Backs a record's amounts and the metadata totals.
	Totals ClusterBillingAmounts `json:"totals"`

	// UniqueClusterCount Number of distinct clusters the records span.
	UniqueClusterCount int `json:"uniqueClusterCount"`
}

ClusterBillingMetadata defines model for ClusterBillingMetadata.

type ClusterBillingQuery

type ClusterBillingQuery struct {
	// BucketSize Length of each billing time bucket.
	//
	// Examples: day
	BucketSize BillingBucketSize `json:"bucketSize"`

	// ClusterId The clusterId filter applied, if any.
	ClusterId *string `json:"clusterId,omitempty"`

	// EndTime End of the range, exclusive (RFC 3339).
	//
	// Examples: 2026-06-02T00:00:00Z
	EndTime time.Time `json:"endTime"`

	// StartTime Start of the range, inclusive (RFC 3339).
	//
	// Examples: 2026-06-01T00:00:00Z
	StartTime time.Time `json:"startTime"`
}

ClusterBillingQuery defines model for ClusterBillingQuery.

type ClusterBillingRecord

type ClusterBillingRecord struct {
	// ClusterId The cluster this record bills. When the clusterId filter is set every record carries that id; otherwise one record is emitted per cluster per bucket.
	//
	//
	// Examples: cluster_abc123
	ClusterId string `json:"clusterId"`

	// DiskAmount Cluster disk cost in USD for the bucket.
	DiskAmount float64 `json:"diskAmount"`

	// EndTime End of the range, exclusive (RFC 3339).
	//
	// Examples: 2026-06-02T00:00:00Z
	EndTime time.Time `json:"endTime"`

	// GpuAmount Cluster GPU compute cost in USD for the bucket.
	GpuAmount float64 `json:"gpuAmount"`

	// NetworkingAmount Cluster inter-node networking cost in USD for the bucket.
	NetworkingAmount float64 `json:"networkingAmount"`

	// StartTime Start of the range, inclusive (RFC 3339).
	//
	// Examples: 2026-06-01T00:00:00Z
	StartTime time.Time `json:"startTime"`

	// TotalAmount Total Instant Cluster cost in USD for the bucket.
	//
	// Examples: 99
	TotalAmount float64 `json:"totalAmount"`
}

ClusterBillingRecord A single time-bucketed cluster billing record; clusters are GPU-only (no CPU component). Returned by GET /v2/billing/clusters.

type ClusterCompute

type ClusterCompute struct {
	// GpuCountPerPod Number of GPUs on each pod. Bounded above by the GPU type's per-cloud maximum (GpuType.maxCount); the upstream rejects values beyond it.
	//
	// Examples: 8
	GpuCountPerPod int `json:"gpuCountPerPod"`

	// GpuTypeId GPU type for every pod in the cluster, as returned by GET /v2/catalog/gpus.
	//
	// Examples: NVIDIA H100 80GB HBM3
	GpuTypeId string `json:"gpuTypeId"`

	// PodCount Number of pods (nodes) in the cluster.
	//
	// Examples: 4
	PodCount int `json:"podCount"`
}

ClusterCompute The homogeneous compute shape of a cluster. Every pod in the cluster is identical: `podCount` pods, each with `gpuCountPerPod` GPUs of type `gpuTypeId`. Total GPUs = `podCount` * `gpuCountPerPod`.

type ClusterNetwork

type ClusterNetwork struct {
	// Cidr The overlay network's CIDR block.
	//
	// Examples: 10.65.0.0/16
	Cidr string `json:"cidr"`

	// VxlanId VXLAN network identifier; omitted until assigned.
	//
	// Examples: 42
	VxlanId *int `json:"vxlanId,omitempty"`

	// VxlanPort UDP port carrying the VXLAN traffic; omitted until assigned.
	//
	// Examples: 4789
	VxlanPort *int `json:"vxlanPort,omitempty"`
}

ClusterNetwork The cluster's private VXLAN overlay network (shared by all member pods).

type ClusterPodsSummary

type ClusterPodsSummary struct {
	// ByStatus Member pod counts keyed by pod status (the same values as `Pod.status`, e.g. RUNNING, PROVISIONING). Statuses with no pods are omitted.
	ByStatus map[string]int `json:"byStatus"`

	// Total Number of member pods currently provisioned for the cluster.
	//
	// Examples: 4
	Total int `json:"total"`
}

ClusterPodsSummary A lightweight summary of a cluster's member pods. Use `GET /v2/clusters/{id}/pods` to retrieve the full pod objects.

type ClusterPrimary

type ClusterPrimary struct {
	// PodId ID of the primary member pod.
	//
	// Examples: pod_node0
	PodId string `json:"podId"`

	// SshEndpoint Public SSH endpoint (`host:port`) for the primary node; omitted when the primary is not yet RUNNING or does not expose SSH (22/tcp).
	//
	// Examples: 1.2.3.4:22001
	SshEndpoint *string `json:"sshEndpoint,omitempty"`

	// Status Lifecycle status of a pod.
	// - `PROVISIONING` — pod is being allocated
	// - `STARTING`     — container is starting
	// - `RUNNING`      — container is healthy
	// - `EXITED`       — container exited (stopped)
	// - `ERROR`        — container is in an unrecoverable error state
	// - `TERMINATED`   — pod has been permanently deleted
	Status PodStatus `json:"status"`
}

ClusterPrimary The cluster's primary (master) node, through which the cluster is typically driven. Omitted until a primary pod has been placed.

type ClusterType

type ClusterType string

ClusterType Cluster type. TRAINING is the generic distributed-training cluster; SLURM provisions a managed Slurm controller/compute topology; RAY provisions a managed Ray head/worker topology; APPLICATION is a general multi-node application cluster.

Examples: TRAINING

const (
	ClusterTypeApplication ClusterType = "APPLICATION"
	ClusterTypeRay         ClusterType = "RAY"
	ClusterTypeSlurm       ClusterType = "SLURM"
	ClusterTypeTraining    ClusterType = "TRAINING"
)

Defines values for ClusterType.

func (ClusterType) Valid

func (e ClusterType) Valid() bool

Valid indicates whether the value is a known member of the ClusterType enum.

type Compliance

type Compliance string

Compliance Compliance certifications.

const (
	ComplianceFISMAHigh   Compliance = "FISMA_HIGH"
	ComplianceGDPR        Compliance = "GDPR"
	ComplianceHIPAA       Compliance = "HIPAA"
	ComplianceHITRUST     Compliance = "HITRUST"
	ComplianceISO14001    Compliance = "ISO_14001"
	ComplianceISOIEC27001 Compliance = "ISO_IEC_27001"
	ComplianceITAR        Compliance = "ITAR"
	CompliancePCIDSS      Compliance = "PCI_DSS"
	ComplianceRenewable   Compliance = "RENEWABLE"
	ComplianceSOC1Type2   Compliance = "SOC_1_TYPE_2"
	ComplianceSOC2Type2   Compliance = "SOC_2_TYPE_2"
	ComplianceSOC3Type2   Compliance = "SOC_3_TYPE_2"
)

Defines values for Compliance.

func (Compliance) Valid

func (e Compliance) Valid() bool

Valid indicates whether the value is a known member of the Compliance enum.

type ContainerConfig

type ContainerConfig struct {
	// Args The container's command, as a single raw string. This is the field `entrypoint` and `cmd` encode into, exposed in its stored form.
	//
	// Two shapes are accepted. A bare shell string is treated as CMD and split into arguments, which is what the console's "Container start command" field writes. A JSON object of the form `{"entrypoint":[...],"cmd":[...]}` sets either or both explicitly.
	//
	// Responses always return both representations: `args` exactly as stored, plus the deconstructed `entrypoint` and `cmd`. Supplying `args` together with `entrypoint` or `cmd` is allowed only when they describe the same command, so a read-modify-write client can send back everything it received. Send `""` to clear, omit to leave unchanged.
	//
	//
	// Examples: --model meta-llama/Llama-3-8B --max-model-len 8192, {"entrypoint":["/bin/bash","-c"],"cmd":["python -u main.py"]},
	Args *string `json:"args,omitempty"`

	// Cmd Container CMD in exec form. When the image defines an ENTRYPOINT, this is the argument list passed to it. Encoded into the `args` field; supplying both is allowed only when they describe the same command. Send `[]` to clear, omit to leave unchanged.
	//
	//
	// Examples: ["--model","meta-llama/Llama-3-8B","--max-model-len","8192"]
	Cmd *[]string `json:"cmd,omitempty"`

	// Disk Container disk in GB (ephemeral, wiped on restart)
	//
	// Examples: 50
	Disk *int `json:"disk,omitempty"`

	// Entrypoint Container ENTRYPOINT in exec form, overriding the image's own. Encoded into `args` field; supplying both is allowed only when they describe the same command. Send `[]` to clear, omit to leave unchanged.
	//
	//
	// Examples: ["/bin/bash","-c"]
	Entrypoint *[]string `json:"entrypoint,omitempty"`

	// Env Environment variables as key-value pairs
	//
	// Examples: {"JUPYTER_PASSWORD":"changeme"}
	Env *map[string]string `json:"env,omitempty"`

	// Image Docker image reference
	//
	// Examples: runpod/pytorch:1.0.2-cu1281-torch280-ubuntu2404
	Image *string `json:"image,omitempty"`

	// Ports Exposed ports, formatted as port/protocol
	//
	// Examples: ["8888/http","22/tcp"]
	Ports *[]string `json:"ports,omitempty"`

	// Registry Container registry credential ID (for private images)
	//
	// Examples: null
	Registry *string `json:"registry,omitempty"`
}

ContainerConfig Reusable container configuration shared across templates, pods, and serverless endpoints. Adding a field here automatically propagates to all three resources.

type CountryCodesFilter

type CountryCodesFilter = []string

CountryCodesFilter defines model for CountryCodesFilter.

type CpuConfig

type CpuConfig struct {
	// Id CPU flavor identifier, as returned by GET /v2/catalog/cpus.
	//
	// Examples: cpu5c
	Id string `json:"id"`

	// Memory Memory allocated to the pod in GB.
	//
	// Examples: 16
	Memory int `json:"memory"`

	// VcpuCount Number of vCPUs. Must be valid for the selected CPU flavor and must be a power of two.
	//
	// Examples: 4
	VcpuCount int `json:"vcpuCount"`
}

CpuConfig defines model for CpuConfig.

type CpuProduct

type CpuProduct string

CpuProduct CPU catalog product availability context. Availability is product-specific, so this is required whenever availability is requested.

const (
	CpuProductPod        CpuProduct = "POD"
	CpuProductServerless CpuProduct = "SERVERLESS"
)

Defines values for CpuProduct.

func (CpuProduct) Valid

func (e CpuProduct) Valid() bool

Valid indicates whether the value is a known member of the CpuProduct enum.

type CpuProductFilter

type CpuProductFilter = []CpuProduct

CpuProductFilter defines model for CpuProductFilter.

type CpuType

type CpuType struct {
	// Availability Overall CPU availability for the requested `product` contexts. Present only when requested with include=AVAILABILITY, which also requires `product`.
	Availability *AvailabilityLevel `json:"availability,omitempty"`

	// DataCenters Per-datacenter CPU availability for the requested `product`
	// contexts, listing only the datacenters that offer this CPU flavor.
	// Present only when requested with include=AVAILABILITY, which also
	// requires `product`, and omitted entirely when the flavor is
	// unavailable everywhere.
	DataCenters *[]DataCenterAvailability `json:"dataCenters,omitempty"`

	// Group CPU generation group
	//
	// Examples: Gen 5
	Group string `json:"group"`

	// Id CPU flavor identifier (use in cpu.id for pod creation)
	//
	// Examples: cpu5c
	Id string `json:"id"`

	// Name Human-readable flavor name
	//
	// Examples: Compute-Optimized
	Name  string `json:"name"`
	Price struct {
		// SecurePerVcpu Price for secure pods per vCPU. Multiply by the chosen vCPU
		// count (within `vcpu.min`..`vcpu.max`) to get the total price.
		//
		//
		// Examples: 0.04
		SecurePerVcpu float32 `json:"securePerVcpu"`

		// ServerlessPerVcpu Price for serverless per vCPU. Multiply by the chosen vCPU
		// count (within `vcpu.min`..`vcpu.max`) to get the total price.
		//
		//
		// Examples: 0.03
		ServerlessPerVcpu float32 `json:"serverlessPerVcpu"`
	} `json:"price"`

	// RamGbPerVcpu GB of RAM allocated per vCPU. Multiply by the chosen vCPU
	// count (within `vcpu.min`..`vcpu.max`) to get the total RAM
	// for an instance of this flavor. May be fractional.
	//
	//
	// Examples: 2.5
	RamGbPerVcpu float32 `json:"ramGbPerVcpu"`
	Vcpu         struct {
		// Max Examples: 32
		Max int `json:"max"`

		// Min Examples: 2
		Min int `json:"min"`
	} `json:"vcpu"`
}

CpuType defines model for CpuType.

type CpuVCPUCountFilter

type CpuVCPUCountFilter = int

CpuVCPUCountFilter defines model for CpuVCPUCountFilter.

type CreateClusterRequest

type CreateClusterRequest struct {
	// Args The container's command, as a single raw string. This is the field `entrypoint` and `cmd` encode into, exposed in its stored form.
	//
	// Two shapes are accepted. A bare shell string is treated as CMD and split into arguments, which is what the console's "Container start command" field writes. A JSON object of the form `{"entrypoint":[...],"cmd":[...]}` sets either or both explicitly.
	//
	// Responses always return both representations: `args` exactly as stored, plus the deconstructed `entrypoint` and `cmd`. Supplying `args` together with `entrypoint` or `cmd` is allowed only when they describe the same command, so a read-modify-write client can send back everything it received. Send `""` to clear, omit to leave unchanged.
	//
	//
	// Examples: --model meta-llama/Llama-3-8B --max-model-len 8192, {"entrypoint":["/bin/bash","-c"],"cmd":["python -u main.py"]},
	Args *string `json:"args,omitempty"`

	// Cmd Container CMD in exec form. When the image defines an ENTRYPOINT, this is the argument list passed to it. Encoded into the `args` field; supplying both is allowed only when they describe the same command. Send `[]` to clear, omit to leave unchanged.
	//
	//
	// Examples: ["--model","meta-llama/Llama-3-8B","--max-model-len","8192"]
	Cmd *[]string `json:"cmd,omitempty"`

	// Compute The homogeneous compute shape of a cluster. Every pod in the cluster is identical: `podCount` pods, each with `gpuCountPerPod` GPUs of type `gpuTypeId`. Total GPUs = `podCount` * `gpuCountPerPod`.
	Compute ClusterCompute `json:"compute"`

	// DataCenterIds Preferred data centers for placement. Omit or pass an empty
	// array to let the scheduler choose. A cluster is always placed
	// within a single data center.
	DataCenterIds *[]string `json:"dataCenterIds,omitempty"`

	// Disk Container disk in GB (ephemeral, wiped on restart)
	//
	// Examples: 50
	Disk *int `json:"disk,omitempty"`

	// Entrypoint Container ENTRYPOINT in exec form, overriding the image's own. Encoded into `args` field; supplying both is allowed only when they describe the same command. Send `[]` to clear, omit to leave unchanged.
	//
	//
	// Examples: ["/bin/bash","-c"]
	Entrypoint *[]string `json:"entrypoint,omitempty"`

	// Env Environment variables as key-value pairs
	//
	// Examples: {"JUPYTER_PASSWORD":"changeme"}
	Env *map[string]string `json:"env,omitempty"`

	// Image Docker image reference
	//
	// Examples: runpod/pytorch:1.0.2-cu1281-torch280-ubuntu2404
	Image *string `json:"image,omitempty"`

	// Mounts Storage mounts attached to a pod. At most one of `persistent` or
	// `network` may be set: sending both is rejected with 400. The
	// `network` field is an array for forward compatibility with
	// multi-network-volume support; `maxItems` is 1.
	//
	// PATCH semantics:
	// - Omitting `mounts` or sending `{}` leaves the existing mount
	//   unchanged.
	// - An explicit `network: []` is rejected with 400 (clearing mounts
	//   is not supported).
	// - Mount kind is fixed at create — a PATCH that introduces a kind
	//   not present at create (persistent on a network pod, network on
	//   a persistent pod, or any mount on a previously-mountless pod)
	//   is rejected with 400.
	// - The `volumeId` of a network mount is immutable; a PATCH that
	//   names a different `volumeId` is rejected with 400.
	// - Partial mounts are not supported — every mount entry must
	//   include the full schema (`size` + `path` for persistent,
	//   `volumeId` + `path` for network). Missing required fields → 422.
	Mounts *Mounts `json:"mounts,omitempty"`

	// Name Examples: my-training-cluster
	Name string `json:"name"`

	// Ports Exposed ports, formatted as port/protocol
	//
	// Examples: ["8888/http","22/tcp"]
	Ports *[]string `json:"ports,omitempty"`

	// StartJupyter Start Jupyter on every member pod, as on pod create.
	StartJupyter *bool `json:"startJupyter,omitempty"`

	// StartSsh Provision SSH access on every member pod: injects a PUBLIC_KEY environment variable carrying your account's registered SSH public key. Same semantics as the pod create flag.
	StartSsh *bool `json:"startSsh,omitempty"`

	// TemplateId ID of a pod template to provision every member pod from. The
	// template supplies the container settings (image, args, disk,
	// env, ports) and the container registry credential for private
	// images — the only private-image path for clusters. Mutually
	// exclusive with `image`, `args`, `entrypoint`, `cmd`, `disk`,
	// `env`, `ports`, and `mounts` (rejected with 400). The cluster
	// retains the link: the `template` response field is set. Must be
	// a non-serverless pod template accessible to the caller.
	//
	//
	// Examples: 30zmvf89kd
	TemplateId *string `json:"templateId,omitempty"`

	// Type Cluster type. TRAINING is the generic distributed-training cluster; SLURM provisions a managed Slurm controller/compute topology; RAY provisions a managed Ray head/worker topology; APPLICATION is a general multi-node application cluster.
	//
	// Examples: TRAINING
	Type ClusterType `json:"type"`
}

CreateClusterRequest defines model for CreateClusterRequest.

type CreateCpuConfig

type CreateCpuConfig = BaseCpuConfig

CreateCpuConfig defines model for CreateCpuConfig.

type CreateDelegationRequest

type CreateDelegationRequest struct {
	// Name Optional name for the delegation
	//
	// Examples: my-delegation
	Name *string `json:"name,omitempty"`

	// Resource ECR resource ARN
	//
	// Examples: arn:aws:ecr:us-east-2:123456789012:repository/runpod/deployment
	Resource string `json:"resource"`
}

CreateDelegationRequest defines model for CreateDelegationRequest.

type CreateEndpointGpuConfig

type CreateEndpointGpuConfig struct {
	// AllowedCudaVersions Acceptable CUDA versions for worker placement, as
	// `major.minor`. Omit to accept any version (or inherit the
	// template's constraint when creating from `templateId`).
	// Matching is exact — discover valid values per GPU type via
	// `GET /v2/catalog/gpus?include=AVAILABILITY&product=SERVERLESS`
	// (`cudaVersions`).
	//
	// A non-empty set is mutually exclusive with minCudaVersion (400
	// if both are sent). An explicit `[]` states no constraint, so it
	// may accompany a floor.
	//
	//
	// Examples: ["12.8","12.6"]
	AllowedCudaVersions *[]string `json:"allowedCudaVersions,omitempty"`

	// Count GPUs per worker
	//
	// Examples: 1
	Count *int `json:"count,omitempty"`

	// ExcludedTypes GPU **type** IDs to subtract from the selected pools — the `id`
	// field of `GET /v2/catalog/gpus`, the same identifiers pods take in
	// `gpu.id`. Workers run on every type in `pools` except these. Omit to
	// use the whole pool.
	//
	// Pools stay the unit of selection; types are the unit of
	// subtraction. There is no inclusive allowlist: a card later added to
	// one of your pools becomes eligible, which is the honest reading of
	// "this pool, minus these".
	//
	// Tied to `pools`, because the two together are one selection:
	// supplying `pools` replaces that selection wholesale, so a `PATCH`
	// sending `pools` **without `excludedTypes`** **clears** them —
	// restate them to keep them. A `PATCH` that omits `pools` leaves both
	// the pools and the exclusions untouched, so changing only a CUDA
	// constraint cannot widen a pinned endpoint.
	//
	// Rejected with 400 if a value is not a GPU type in one of `pools`;
	// upstream accepts unrecognized exclusions silently, so a typo would
	// otherwise produce a filter that does nothing. Surrounding whitespace
	// is trimmed, so `" NVIDIA L40"` and `"NVIDIA L40"` mean the same card.
	//
	//
	// Examples: ["NVIDIA L40"]
	ExcludedTypes *[]string `json:"excludedTypes,omitempty"`

	// MinCudaVersion Lowest acceptable CUDA version for worker placement, as
	// `major.minor`, compared numerically rather than as a decimal —
	// so 12.11 is above 12.2. Use this for an open-ended floor and
	// allowedCudaVersions for an exact set.
	//
	// Mutually exclusive with a non-empty allowedCudaVersions (400 if
	// both are sent); an explicit `[]` there states no constraint and
	// may accompany this floor.
	//
	//
	// Examples: 12.1
	MinCudaVersion *string `json:"minCudaVersion,omitempty"`

	// Pools Serverless GPU pool IDs (as returned by `GET /v2/catalog/gpus` in
	// `pool`). Workers are placed on whichever listed pool has capacity.
	// Narrow a pool down to specific cards with `excludedTypes`.
	//
	// On `PATCH`, `pools` and `excludedTypes` are one selection and are
	// replaced together, so sending `pools` by itself **clears the
	// exclusions**. Two cases:
	//
	// - **Changing pools, keeping exclusions** — send both fields in one
	//   request: `{"gpu": {"pools": ["ADA_24"], "excludedTypes":
	//   ["NVIDIA L40"]}}`. `GET` the endpoint first to read the current
	//   `excludedTypes` and resend the ones that still apply to the new
	//   pools; an exclusion naming a type outside `pools` is a 400.
	// - **Changing only `count` or a CUDA constraint** — omit `pools`:
	//   `{"gpu": {"minCudaVersion": "12.4"}}`. The pool list and the
	//   exclusions are both left exactly as they are.
	//
	// `excludedTypes` documents the full rule.
	//
	//
	// Examples: ["ADA_24"]
	Pools []string `json:"pools"`
}

CreateEndpointGpuConfig GPU request for an endpoint create. Carries the CUDA constraints, which live here rather than at the body's top level so they are unrepresentable on a CPU endpoint.

type CreateEndpointRequest

type CreateEndpointRequest struct {
	// Args The container's command, as a single raw string. This is the field `entrypoint` and `cmd` encode into, exposed in its stored form.
	//
	// Two shapes are accepted. A bare shell string is treated as CMD and split into arguments, which is what the console's "Container start command" field writes. A JSON object of the form `{"entrypoint":[...],"cmd":[...]}` sets either or both explicitly.
	//
	// Responses always return both representations: `args` exactly as stored, plus the deconstructed `entrypoint` and `cmd`. Supplying `args` together with `entrypoint` or `cmd` is allowed only when they describe the same command, so a read-modify-write client can send back everything it received. Send `""` to clear, omit to leave unchanged.
	//
	//
	// Examples: --model meta-llama/Llama-3-8B --max-model-len 8192, {"entrypoint":["/bin/bash","-c"],"cmd":["python -u main.py"]},
	Args *string `json:"args,omitempty"`

	// Cmd Container CMD in exec form. When the image defines an ENTRYPOINT, this is the argument list passed to it. Encoded into the `args` field; supplying both is allowed only when they describe the same command. Send `[]` to clear, omit to leave unchanged.
	//
	//
	// Examples: ["--model","meta-llama/Llama-3-8B","--max-model-len","8192"]
	Cmd *[]string `json:"cmd,omitempty"`

	// Cpu Eligible CPU configurations for each worker. Memory is derived from the
	// selected flavor's catalog RAM multiplier. Exact duplicate configurations
	// are rejected; the same flavor may be listed at different vCPU counts.
	Cpu *[]CreateCpuConfig `json:"cpu,omitempty"`

	// DataCenterIds Preferred data centers for placement. Omit or pass an empty array to let the scheduler choose.
	DataCenterIds *[]string `json:"dataCenterIds,omitempty"`

	// Disk Container disk in GB (ephemeral, wiped on restart)
	//
	// Examples: 50
	Disk *int `json:"disk,omitempty"`

	// Entrypoint Container ENTRYPOINT in exec form, overriding the image's own. Encoded into `args` field; supplying both is allowed only when they describe the same command. Send `[]` to clear, omit to leave unchanged.
	//
	//
	// Examples: ["/bin/bash","-c"]
	Entrypoint *[]string `json:"entrypoint,omitempty"`

	// Env Environment variables as key-value pairs
	//
	// Examples: {"JUPYTER_PASSWORD":"changeme"}
	Env       *map[string]string `json:"env,omitempty"`
	Flashboot *FlashBoot         `json:"flashboot,omitempty"`

	// Gpu GPU request for an endpoint create. Carries the CUDA constraints, which
	// live here rather than at the body's top level so they are
	// unrepresentable on a CPU endpoint.
	Gpu *CreateEndpointGpuConfig `json:"gpu,omitempty"`

	// Image Docker image reference
	//
	// Examples: runpod/pytorch:1.0.2-cu1281-torch280-ubuntu2404
	Image *string `json:"image,omitempty"`

	// Name Examples: my-inference
	Name           string    `json:"name"`
	NetworkVolumes *[]string `json:"networkVolumes,omitempty"`

	// Ports Exposed ports, formatted as port/protocol
	//
	// Examples: ["8888/http","22/tcp"]
	Ports *[]string `json:"ports,omitempty"`

	// Registry Container registry credential ID (for private images)
	//
	// Examples: null
	Registry *string `json:"registry,omitempty"`

	// Scaling Autoscaling signal — a discriminated union on `type`: `QUEUE_DELAY`
	// (queue-based endpoints only) or `REQUEST_COUNT`. The scaler is chosen
	// independently of the endpoint's routing `type` and can be switched on
	// update.
	Scaling EndpointScaling `json:"scaling"`

	// TemplateId ID of a serverless template to base this endpoint on. The
	// template is resolved at create time into the same container
	// settings you could otherwise spread into this body (image,
	// args, disk, ports, env, registry); explicit body fields
	// override the template's, except `env`, which is merged per
	// key with body values winning. The template's
	// allowedCudaVersions seeds `gpu.allowedCudaVersions` when the
	// body omits it — but only for a GPU create, since a CPU endpoint
	// has no gpu block to seed into, and not when the body sets
	// `gpu.minCudaVersion`, since seeding a set beside a floor would
	// manufacture the mutual-exclusion 400 from a valid request. Its
	// pod-specific startSsh/startJupyter flags are
	// ignored. Later template edits do not affect the endpoint.
	// The template may be one of your own or a public catalog
	// template — see `GET /v2/catalog/templates` (unknown or
	// inaccessible ID → 404) — and must be a serverless template
	// (→ 422).
	//
	//
	// Examples: 30zmvf89kd
	TemplateId *string `json:"templateId,omitempty"`
	Timeout    *int    `json:"timeout,omitempty"`

	// Type Request-routing model. Required — it determines the valid scaler
	// and request URLs, so it must be chosen explicitly on every create.
	Type    EndpointType `json:"type"`
	Workers *struct {
		IdleTimeout *int `json:"idleTimeout,omitempty"`
		Max         *int `json:"max,omitempty"`
		Min         *int `json:"min,omitempty"`
	} `json:"workers,omitempty"`
}

CreateEndpointRequest defines model for CreateEndpointRequest.

type CreateGpuConfig

type CreateGpuConfig struct {
	// AllowedCudaVersions Acceptable CUDA versions for the host machine, as `major.minor`.
	// Omit to accept any version. Matching is exact, so a version no
	// machine reports yields a capacity error rather than a fallback —
	// discover valid values per GPU type via
	// `GET /v2/catalog/gpus?include=AVAILABILITY&product=POD`
	// (`cudaVersions`).
	//
	// A non-empty set is mutually exclusive with minCudaVersion (400
	// if both are sent). An explicit `[]` states no constraint, so it
	// may accompany a floor.
	//
	//
	// Examples: ["12.8","12.6"]
	AllowedCudaVersions *[]string `json:"allowedCudaVersions,omitempty"`

	// Count Number of GPUs
	//
	// Examples: 1
	Count *int `json:"count,omitempty"`

	// Id GPU type identifier
	//
	// Examples: NVIDIA GeForce RTX 4090
	Id string `json:"id"`

	// MinCudaVersion Lowest acceptable CUDA version for the host machine, as
	// `major.minor`, compared numerically rather than as a decimal —
	// so 12.11 is above 12.2. Use this for an open-ended floor and
	// allowedCudaVersions for an exact set.
	//
	// Mutually exclusive with a non-empty allowedCudaVersions (400 if
	// both are sent); an explicit `[]` there states no constraint and
	// may accompany this floor.
	//
	//
	// Examples: 12.1
	MinCudaVersion *string `json:"minCudaVersion,omitempty"`

	// MinRamPerGpu Minimum host system RAM in GB per requested GPU. This is a placement filter, not a resource request. The actual total allocated system RAM may be higher and is returned in gpu.memory.
	//
	// Examples: 8
	MinRamPerGpu *int `json:"minRamPerGpu,omitempty"`

	// MinVcpuCountPerGpu Minimum host vCPU count per requested GPU. This is a placement filter, not a resource request. The actual total allocated vCPU count may be higher and is returned in gpu.vcpuCount.
	//
	// Examples: 2
	MinVcpuCountPerGpu *int `json:"minVcpuCountPerGpu,omitempty"`
}

CreateGpuConfig GPU request for a pod create. Carries the CUDA host constraints, which live here rather than at the body's top level so they are unrepresentable on a CPU pod.

type CreateNetworkVolumeRequest

type CreateNetworkVolumeRequest struct {
	// DataCenter Data center in which to create the volume
	//
	// Examples: EU-RO-1
	DataCenter string `json:"dataCenter"`

	// Name Human-readable name
	//
	// Examples: my-dataset
	Name string `json:"name"`

	// Size Storage to allocate in GB
	//
	// Examples: 50
	Size int `json:"size"`

	// Type Storage tier for the volume. Optional. When omitted, the volume is
	// provisioned using the requested data center's default (primary)
	// storage tier. HIGH_PERFORMANCE provisions a high-performance (HPS)
	// volume; STANDARD provisions a standard volume. A volume's tier is
	// immutable after creation.
	Type *VolumeType `json:"type,omitempty"`
}

CreateNetworkVolumeRequest defines model for CreateNetworkVolumeRequest.

type CreatePodRequest

type CreatePodRequest struct {
	// Args The container's command, as a single raw string. This is the field `entrypoint` and `cmd` encode into, exposed in its stored form.
	//
	// Two shapes are accepted. A bare shell string is treated as CMD and split into arguments, which is what the console's "Container start command" field writes. A JSON object of the form `{"entrypoint":[...],"cmd":[...]}` sets either or both explicitly.
	//
	// Responses always return both representations: `args` exactly as stored, plus the deconstructed `entrypoint` and `cmd`. Supplying `args` together with `entrypoint` or `cmd` is allowed only when they describe the same command, so a read-modify-write client can send back everything it received. Send `""` to clear, omit to leave unchanged.
	//
	//
	// Examples: --model meta-llama/Llama-3-8B --max-model-len 8192, {"entrypoint":["/bin/bash","-c"],"cmd":["python -u main.py"]},
	Args *string `json:"args,omitempty"`

	// Cloud Cloud tier. Defaults to `SECURE` when omitted.
	Cloud *Cloud `json:"cloud,omitempty"`

	// Cmd Container CMD in exec form. When the image defines an ENTRYPOINT, this is the argument list passed to it. Encoded into the `args` field; supplying both is allowed only when they describe the same command. Send `[]` to clear, omit to leave unchanged.
	//
	//
	// Examples: ["--model","meta-llama/Llama-3-8B","--max-model-len","8192"]
	Cmd *[]string        `json:"cmd,omitempty"`
	Cpu *CreateCpuConfig `json:"cpu,omitempty"`

	// DataCenterIds Preferred data centers for placement. Omit or pass an empty
	// array to let the scheduler choose.
	//
	//
	// Examples: ["US-TX-3"]
	DataCenterIds *[]string `json:"dataCenterIds,omitempty"`

	// Disk Container disk in GB (ephemeral, wiped on restart)
	//
	// Examples: 50
	Disk *int `json:"disk,omitempty"`

	// Entrypoint Container ENTRYPOINT in exec form, overriding the image's own. Encoded into `args` field; supplying both is allowed only when they describe the same command. Send `[]` to clear, omit to leave unchanged.
	//
	//
	// Examples: ["/bin/bash","-c"]
	Entrypoint *[]string `json:"entrypoint,omitempty"`

	// Env Environment variables as key-value pairs
	//
	// Examples: {"JUPYTER_PASSWORD":"changeme"}
	Env *map[string]string `json:"env,omitempty"`

	// GlobalNetworking Enable global networking, giving the pod a private IP reachable across data centers. Requires an NVIDIA GPU and a global-networking-enabled data center. See `GET /v2/catalog/datacenters` (`globalNetwork`) for eligible data centers.
	//
	// Examples: false
	GlobalNetworking *bool `json:"globalNetworking,omitempty"`

	// Gpu GPU request for a pod create. Carries the CUDA host constraints, which
	// live here rather than at the body's top level so they are
	// unrepresentable on a CPU pod.
	Gpu *CreateGpuConfig `json:"gpu,omitempty"`

	// Image Docker image reference
	//
	// Examples: runpod/pytorch:1.0.2-cu1281-torch280-ubuntu2404
	Image *string `json:"image,omitempty"`

	// Mounts Storage mounts attached to a pod. At most one of `persistent` or
	// `network` may be set: sending both is rejected with 400. The
	// `network` field is an array for forward compatibility with
	// multi-network-volume support; `maxItems` is 1.
	//
	// PATCH semantics:
	// - Omitting `mounts` or sending `{}` leaves the existing mount
	//   unchanged.
	// - An explicit `network: []` is rejected with 400 (clearing mounts
	//   is not supported).
	// - Mount kind is fixed at create — a PATCH that introduces a kind
	//   not present at create (persistent on a network pod, network on
	//   a persistent pod, or any mount on a previously-mountless pod)
	//   is rejected with 400.
	// - The `volumeId` of a network mount is immutable; a PATCH that
	//   names a different `volumeId` is rejected with 400.
	// - Partial mounts are not supported — every mount entry must
	//   include the full schema (`size` + `path` for persistent,
	//   `volumeId` + `path` for network). Missing required fields → 422.
	Mounts *Mounts `json:"mounts,omitempty"`

	// Name Examples: my-training-pod
	Name string `json:"name"`

	// Ports Exposed ports, formatted as port/protocol
	//
	// Examples: ["8888/http","22/tcp"]
	Ports *[]string `json:"ports,omitempty"`

	// Registry Container registry credential ID (for private images)
	//
	// Examples: null
	Registry *string `json:"registry,omitempty"`

	// StartJupyter Create-time flag telling the provisioner to start JupyterLab:
	// injects a generated `JUPYTER_PASSWORD` environment variable,
	// unless the request already sets one. Only images that honor
	// the convention start Jupyter from it (Runpod official images
	// do); expose `8888/http` in `ports` to reach it.
	//
	// Not part of the pod's readable config — never returned by
	// GET and not changeable by PATCH.
	//
	//
	// Examples: true
	StartJupyter *bool `json:"startJupyter,omitempty"`

	// StartSsh Create-time flag telling the provisioner to set up SSH
	// access: injects a `PUBLIC_KEY` environment variable carrying
	// your account's registered SSH public keys, unless the request
	// already sets one. **Requires registered keys** (`PUT
	// /v2/account/ssh-keys`) — with none registered the flag does
	// nothing and the pod has no SSH access. Only images that honor
	// the convention start sshd from it (all Runpod official images
	// do). Connect using the pod's `ssh` block; the `ssh.direct`
	// variant additionally needs a `22/tcp` entry in `ports`.
	//
	// Not part of the pod's readable config — never returned by
	// GET and not changeable by PATCH.
	//
	//
	// Examples: true
	StartSsh *bool `json:"startSsh,omitempty"`

	// TemplateId ID of a pod template to base this pod on. The template is
	// resolved at create time into the same container settings you
	// could otherwise spread into this body (image, args, disk,
	// ports, env, registry, persistent mount, startSsh,
	// startJupyter, allowedCudaVersions); explicit body fields
	// override the template's, except `env`, which is merged per
	// key with body values winning. Sending either CUDA field
	// (`gpu.allowedCudaVersions` or `gpu.minCudaVersion`) replaces
	// the template's CUDA constraint entirely, and CPU pods ignore
	// it (like the persistent mount). The template is a one-time
	// source of settings: later template edits do not affect the
	// pod, and the created pod does not retain a link to the
	// template (`template` stays null). The template may be one
	// of your own or a public catalog template — see
	// `GET /v2/catalog/templates` (unknown or inaccessible ID →
	// 404) — and must not be a serverless template (→ 422). CPU
	// pods do not inherit a template's persistent mount.
	//
	//
	// Examples: 30zmvf89kd
	TemplateId *string `json:"templateId,omitempty"`
}

CreatePodRequest defines model for CreatePodRequest.

type CreateRegistryRequest

type CreateRegistryRequest struct {
	// Name Examples: my-private-registry
	Name string `json:"name"`

	// Password Registry password (write-only, not returned in responses)
	Password string `json:"password"`

	// Username Registry username (write-only, not returned in responses)
	Username string `json:"username"`
}

CreateRegistryRequest defines model for CreateRegistryRequest.

type CreateSecretRequest

type CreateSecretRequest struct {
	// Description Optional human-readable description, at most 65,535 bytes of UTF-8 text.
	//
	// Examples: Hugging Face read token
	Description *string `json:"description,omitempty"`

	// Name Unique name for the secret — referenced from environment variables as `{{ RUNPOD_SECRET_<name> }}`; immutable after creation. Maximum 191 characters, must start with a letter or underscore, and may contain letters, digits, and `_.-/`. Names beginning with the reserved prefix `RUNPOD` are rejected (case-insensitive).
	//
	// Examples: hf-token
	Name string `json:"name"`

	// Value The secret value. Write-only — never returned by the API. Must be smaller than 16 MiB of UTF-8 text (strictly under 16,777,216 bytes).
	Value string `json:"value"`
}

CreateSecretRequest defines model for CreateSecretRequest.

type CreateTemplateRequest

type CreateTemplateRequest struct {
	// AllowedCudaVersions Acceptable CUDA versions for containers created from this
	// template, as `major.minor`. Omit to accept any version — see
	// the same field on `createPod` for matching semantics.
	// Expanded into GPU pod and serverless endpoint creates; CPU
	// pods ignore it.
	//
	//
	// Examples: ["12.8","12.6"]
	AllowedCudaVersions *[]string `json:"allowedCudaVersions,omitempty"`

	// Args The container's command, as a single raw string. This is the field `entrypoint` and `cmd` encode into, exposed in its stored form.
	//
	// Two shapes are accepted. A bare shell string is treated as CMD and split into arguments, which is what the console's "Container start command" field writes. A JSON object of the form `{"entrypoint":[...],"cmd":[...]}` sets either or both explicitly.
	//
	// Responses always return both representations: `args` exactly as stored, plus the deconstructed `entrypoint` and `cmd`. Supplying `args` together with `entrypoint` or `cmd` is allowed only when they describe the same command, so a read-modify-write client can send back everything it received. Send `""` to clear, omit to leave unchanged.
	//
	//
	// Examples: --model meta-llama/Llama-3-8B --max-model-len 8192, {"entrypoint":["/bin/bash","-c"],"cmd":["python -u main.py"]},
	Args *string `json:"args,omitempty"`

	// Category Optional. Defaults to `NVIDIA` when omitted.
	Category *TemplateCategory `json:"category,omitempty"`

	// Cmd Container CMD in exec form. When the image defines an ENTRYPOINT, this is the argument list passed to it. Encoded into the `args` field; supplying both is allowed only when they describe the same command. Send `[]` to clear, omit to leave unchanged.
	//
	//
	// Examples: ["--model","meta-llama/Llama-3-8B","--max-model-len","8192"]
	Cmd *[]string `json:"cmd,omitempty"`

	// Disk Container disk in GB (ephemeral, wiped on restart)
	//
	// Examples: 50
	Disk *int `json:"disk,omitempty"`

	// Entrypoint Container ENTRYPOINT in exec form, overriding the image's own. Encoded into `args` field; supplying both is allowed only when they describe the same command. Send `[]` to clear, omit to leave unchanged.
	//
	//
	// Examples: ["/bin/bash","-c"]
	Entrypoint *[]string `json:"entrypoint,omitempty"`

	// Env Environment variables as key-value pairs
	//
	// Examples: {"JUPYTER_PASSWORD":"changeme"}
	Env *map[string]string `json:"env,omitempty"`

	// Image Docker image reference
	//
	// Examples: runpod/pytorch:1.0.2-cu1281-torch280-ubuntu2404
	Image string `json:"image"`

	// Mounts Storage mounts attached to a template. Templates support a single
	// persistent mount; any `network` property is rejected with 422.
	//
	// PATCH semantics: omitting `mounts` or sending `{}` leaves the
	// existing mount unchanged.
	Mounts *TemplateMounts `json:"mounts,omitempty"`

	// Name Examples: My PyTorch Template
	Name string `json:"name"`

	// Ports Exposed ports, formatted as port/protocol
	//
	// Examples: ["8888/http","22/tcp"]
	Ports  *[]string `json:"ports,omitempty"`
	Public *bool     `json:"public,omitempty"`

	// Registry Container registry credential ID (for private images)
	//
	// Examples: null
	Registry   *string `json:"registry,omitempty"`
	Serverless *bool   `json:"serverless,omitempty"`

	// StartJupyter Start JupyterLab in containers created from this template:
	// injects a generated `JUPYTER_PASSWORD` environment variable,
	// unless `env` already sets one. Only images that honor the
	// convention start Jupyter from it (Runpod official images do);
	// expose `8888/http` in `ports` to reach it. Defaults to `true`
	// when omitted, matching console-created templates.
	//
	//
	// Examples: false
	StartJupyter *bool `json:"startJupyter,omitempty"`

	// StartSsh Provision SSH access in containers created from this template:
	// injects a `PUBLIC_KEY` environment variable carrying the
	// deployer's registered SSH public keys (`PUT
	// /v2/account/ssh-keys` — with none registered the flag does
	// nothing), unless `env` already sets one. Only images that
	// honor the convention start sshd from it (all Runpod official
	// images do); direct SSH also needs a `22/tcp` entry in
	// `ports`. Defaults to `true` when omitted, matching
	// console-created templates.
	//
	//
	// Examples: true
	StartSsh *bool `json:"startSsh,omitempty"`
}

CreateTemplateRequest defines model for CreateTemplateRequest.

type CudaVersionAvailability

type CudaVersionAvailability struct {
	// Available True when at least one machine on this CUDA version has free capacity now. False means the version is offered for this GPU type but is currently full, so a pod constrained to it will fail on capacity.
	//
	// Examples: true
	Available bool `json:"available"`

	// Version CUDA version as `major.minor`, suitable for `gpu.allowedCudaVersions` on pod create.
	//
	// Examples: 12.8
	Version string `json:"version"`
}

CudaVersionAvailability defines model for CudaVersionAvailability.

type CudaVersionsFilter

type CudaVersionsFilter = []string

CudaVersionsFilter defines model for CudaVersionsFilter.

type DataCenter

type DataCenter struct {
	// Compliance Compliance certifications held by this data center
	//
	// Examples: ["GDPR","ISO_IEC_27001","SOC_2_TYPE_2"]
	Compliance []Compliance `json:"compliance"`

	// CpuAvailability Availability of each CPU flavor this data center offers. Present
	// only when requested with include=CPU_AVAILABILITY, and omitted
	// entirely when the data center offers no CPU flavors.
	CpuAvailability *[]CatalogResourceAvailability `json:"cpuAvailability,omitempty"`

	// GlobalNetwork Whether this data center supports global networking (private cross-datacenter pod-to-pod network).
	//
	// Examples: true
	GlobalNetwork bool `json:"globalNetwork"`

	// GpuAvailability Availability of each GPU this data center offers. Present only when
	// requested with include=GPU_AVAILABILITY, and omitted entirely when
	// the data center offers no GPUs.
	GpuAvailability *[]CatalogResourceAvailability `json:"gpuAvailability,omitempty"`

	// Id Examples: US-TX-3
	Id string `json:"id"`

	// Name Examples: US Texas 3
	Name string `json:"name"`

	// NetworkVolumeTypes Network volume tiers this DC supports. Empty = none.
	NetworkVolumeTypes []VolumeType `json:"networkVolumeTypes"`

	// Region Continental region containing the data center.
	//
	// Examples: EUROPE
	Region DataCenterRegion `json:"region"`
}

DataCenter defines model for DataCenter.

type DataCenterAvailability

type DataCenterAvailability struct {
	// Availability Catalog stock availability level.
	Availability AvailabilityLevel `json:"availability"`

	// Id Data center identifier.
	//
	// Examples: US-CA-2
	Id string `json:"id"`

	// Name Human-readable data center name.
	//
	// Examples: US California 2
	Name string `json:"name"`
}

DataCenterAvailability defines model for DataCenterAvailability.

type DataCenterInclude

type DataCenterInclude string

DataCenterInclude Data center catalog availability expansion.

const (
	DataCenterIncludeCpuAvailability DataCenterInclude = "CPU_AVAILABILITY"
	DataCenterIncludeGpuAvailability DataCenterInclude = "GPU_AVAILABILITY"
)

Defines values for DataCenterInclude.

func (DataCenterInclude) Valid

func (e DataCenterInclude) Valid() bool

Valid indicates whether the value is a known member of the DataCenterInclude enum.

type DataCenterRegion

type DataCenterRegion string

DataCenterRegion Continental region containing the data center.

Examples: EUROPE

const (
	DataCenterRegionAfrica       DataCenterRegion = "AFRICA"
	DataCenterRegionAntarctica   DataCenterRegion = "ANTARCTICA"
	DataCenterRegionAsia         DataCenterRegion = "ASIA"
	DataCenterRegionEurope       DataCenterRegion = "EUROPE"
	DataCenterRegionMiddleEast   DataCenterRegion = "MIDDLE_EAST"
	DataCenterRegionNorthAmerica DataCenterRegion = "NORTH_AMERICA"
	DataCenterRegionOceania      DataCenterRegion = "OCEANIA"
	DataCenterRegionSouthAmerica DataCenterRegion = "SOUTH_AMERICA"
	DataCenterRegionUnknown      DataCenterRegion = "UNKNOWN"
)

Defines values for DataCenterRegion.

func (DataCenterRegion) Valid

func (e DataCenterRegion) Valid() bool

Valid indicates whether the value is a known member of the DataCenterRegion enum.

type EcrDelegation

type EcrDelegation struct {
	// AwsRegion AWS region
	//
	// Examples: us-east-2
	AwsRegion string `json:"awsRegion"`

	// AwsUser AWS user/role being delegated
	//
	// Examples: 123456789012
	AwsUser string `json:"awsUser"`

	// CreatedAt When the delegation was created
	//
	// Examples: 2026-03-13T20:00:00Z
	CreatedAt time.Time `json:"createdAt"`

	// DelegatorUserId User ID that created the delegation
	//
	// Examples: user_xyz
	DelegatorUserId string `json:"delegatorUserId"`

	// DockerRegistryUri Formatted ECR registry URI for Docker login
	//
	// Examples: 123456789012.dkr.ecr.us-east-2.amazonaws.com
	DockerRegistryUri *string `json:"dockerRegistryUri,omitempty"`

	// Id Delegation identifier
	//
	// Examples: deleg_abc123
	Id string `json:"id"`

	// Name Optional name for the delegation
	//
	// Examples: my-delegation
	Name *string `json:"name,omitempty"`

	// Repository ECR repository name
	//
	// Examples: runpod/deployment
	Repository string `json:"repository"`

	// Tag ECR image tag
	//
	// Examples: latest
	Tag string `json:"tag"`
}

EcrDelegation defines model for EcrDelegation.

type Endpoint

type Endpoint struct {
	// Args The container's command, as a single raw string. This is the field `entrypoint` and `cmd` encode into, exposed in its stored form.
	//
	// Two shapes are accepted. A bare shell string is treated as CMD and split into arguments, which is what the console's "Container start command" field writes. A JSON object of the form `{"entrypoint":[...],"cmd":[...]}` sets either or both explicitly.
	//
	// Responses always return both representations: `args` exactly as stored, plus the deconstructed `entrypoint` and `cmd`. Supplying `args` together with `entrypoint` or `cmd` is allowed only when they describe the same command, so a read-modify-write client can send back everything it received. Send `""` to clear, omit to leave unchanged.
	//
	//
	// Examples: --model meta-llama/Llama-3-8B --max-model-len 8192, {"entrypoint":["/bin/bash","-c"],"cmd":["python -u main.py"]},
	Args *string `json:"args,omitempty"`

	// Cmd Container CMD in exec form. When the image defines an ENTRYPOINT, this is the argument list passed to it. Encoded into the `args` field; supplying both is allowed only when they describe the same command. Send `[]` to clear, omit to leave unchanged.
	//
	//
	// Examples: ["--model","meta-llama/Llama-3-8B","--max-model-len","8192"]
	Cmd *[]string `json:"cmd,omitempty"`

	// Cpu Eligible CPU configurations for each worker, in the order they
	// were submitted. Present for CPU endpoints and omitted for GPU
	// endpoints. Memory is derived from the selected flavor's catalog
	// RAM multiplier.
	Cpu *[]CpuConfig `json:"cpu,omitempty"`

	// CreatedAt Examples: 2026-03-13T20:00:00Z
	CreatedAt time.Time `json:"createdAt"`

	// DataCenterIds Examples: ["US-TX-3"]
	DataCenterIds []string `json:"dataCenterIds"`

	// Disk Container disk in GB (ephemeral, wiped on restart)
	//
	// Examples: 50
	Disk *int `json:"disk,omitempty"`

	// Entrypoint Container ENTRYPOINT in exec form, overriding the image's own. Encoded into `args` field; supplying both is allowed only when they describe the same command. Send `[]` to clear, omit to leave unchanged.
	//
	//
	// Examples: ["/bin/bash","-c"]
	Entrypoint *[]string `json:"entrypoint,omitempty"`

	// Env Environment variables as key-value pairs
	//
	// Examples: {"JUPYTER_PASSWORD":"changeme"}
	Env *map[string]string `json:"env,omitempty"`

	// Flashboot FlashBoot cold-start acceleration mode.
	// - `OFF`                — disabled
	// - `FLASHBOOT`          — enabled
	// - `PRIORITY_FLASHBOOT` — enabled with priority capacity
	Flashboot FlashBoot          `json:"flashboot"`
	Gpu       *EndpointGpuConfig `json:"gpu,omitempty"`

	// Id Examples: ep_abc123
	Id string `json:"id"`

	// Image Docker image reference
	//
	// Examples: runpod/pytorch:1.0.2-cu1281-torch280-ubuntu2404
	Image *string `json:"image,omitempty"`

	// Name Examples: my-inference
	Name string `json:"name"`

	// NetworkVolumes Examples: ["vol_abc"]
	NetworkVolumes []string `json:"networkVolumes"`

	// Ports Exposed ports, formatted as port/protocol
	//
	// Examples: ["8888/http","22/tcp"]
	Ports *[]string `json:"ports,omitempty"`

	// Registry Container registry credential ID (for private images)
	//
	// Examples: null
	Registry *string `json:"registry,omitempty"`

	// RequestUrls Request URLs appropriate to the endpoint's top-level `type`.
	// Queue-based endpoints provide job submission and management URLs;
	// load-balancing endpoints provide `base` and `health` because their
	// remaining paths are worker-defined.
	//
	// Request and response bodies for the queue-based URLs are documented in
	// the [serverless operation reference](https://docs.runpod.io/serverless/endpoints/operation-reference).
	// Load-balancing endpoints are documented in
	// [Load balancing endpoints](https://docs.runpod.io/serverless/load-balancing/overview).
	RequestUrls *EndpointRequestUrls `json:"requestUrls,omitempty"`

	// Scaling Autoscaling signal — a discriminated union on `type`: `QUEUE_DELAY`
	// (queue-based endpoints only) or `REQUEST_COUNT`. The scaler is chosen
	// independently of the endpoint's routing `type` and can be switched on
	// update.
	Scaling EndpointScaling `json:"scaling"`

	// Timeout Per-request execution timeout in milliseconds
	//
	// Examples: 300000
	Timeout int `json:"timeout"`

	// Type Request-routing semantics for a serverless endpoint.
	// - `QUEUE` — submit asynchronous or synchronous jobs through the managed queue.
	// - `LOAD_BALANCER` — send requests directly to worker-defined HTTP paths.
	//   Configure via `env`: `PORT` (server port, default 80), `PORT_HEALTH`
	//   (health-check port, default 80), and `HEALTH_CHECK_PATH` (path the
	//   load balancer polls for worker health, default `/ping`).
	Type    *EndpointType `json:"type,omitempty"`
	Workers struct {
		// IdleTimeout Seconds before idle workers scale down. Not applicable to queue-based
		// endpoints scaling on `requestCount` — rejected on create/update and
		// omitted from responses for that combination.
		//
		//
		// Examples: 5
		IdleTimeout *int `json:"idleTimeout,omitempty"`

		// Max Maximum number of workers.
		//
		// Examples: 5
		Max int `json:"max"`

		// Min Minimum number of workers.
		//
		// Examples: 0
		Min int `json:"min"`
	} `json:"workers"`
}

Endpoint defines model for Endpoint.

type EndpointBillingAmounts

type EndpointBillingAmounts struct {
	// TotalAmount Total public endpoint cost in USD for the bucket.
	//
	// Examples: 3.21
	TotalAmount float64 `json:"totalAmount"`
}

EndpointBillingAmounts Runpod public endpoint cost. Backs a record's amounts and the metadata totals.

type EndpointBillingMetadata

type EndpointBillingMetadata struct {
	// Query Resolved query window and granularity (routes without a filter).
	Query       BillingQuery `json:"query"`
	RecordCount int          `json:"recordCount"`

	// Totals Runpod public endpoint cost. Backs a record's amounts and the metadata totals.
	Totals EndpointBillingAmounts `json:"totals"`
}

EndpointBillingMetadata defines model for EndpointBillingMetadata.

type EndpointBillingRecord

type EndpointBillingRecord struct {
	// EndTime End of the range, exclusive (RFC 3339).
	//
	// Examples: 2026-06-02T00:00:00Z
	EndTime time.Time `json:"endTime"`

	// StartTime Start of the range, inclusive (RFC 3339).
	//
	// Examples: 2026-06-01T00:00:00Z
	StartTime time.Time `json:"startTime"`

	// TotalAmount Total public endpoint cost in USD for the bucket.
	//
	// Examples: 3.21
	TotalAmount float64 `json:"totalAmount"`
}

EndpointBillingRecord A single time-bucketed Runpod public endpoint billing record. Returned by GET /v2/billing/endpoints.

type EndpointGpuConfig

type EndpointGpuConfig struct {
	// AllowedCudaVersions Acceptable CUDA versions for worker placement, as `major.minor`. Empty means any version.
	//
	// Examples: []
	AllowedCudaVersions []string `json:"allowedCudaVersions"`

	// Count GPUs per worker
	//
	// Examples: 1
	Count *int `json:"count,omitempty"`

	// ExcludedTypes GPU **type** IDs to subtract from the selected pools — the `id`
	// field of `GET /v2/catalog/gpus`, the same identifiers pods take in
	// `gpu.id`. Workers run on every type in `pools` except these. Omit to
	// use the whole pool.
	//
	// Pools stay the unit of selection; types are the unit of
	// subtraction. There is no inclusive allowlist: a card later added to
	// one of your pools becomes eligible, which is the honest reading of
	// "this pool, minus these".
	//
	// Tied to `pools`, because the two together are one selection:
	// supplying `pools` replaces that selection wholesale, so a `PATCH`
	// sending `pools` **without `excludedTypes`** **clears** them —
	// restate them to keep them. A `PATCH` that omits `pools` leaves both
	// the pools and the exclusions untouched, so changing only a CUDA
	// constraint cannot widen a pinned endpoint.
	//
	// Rejected with 400 if a value is not a GPU type in one of `pools`;
	// upstream accepts unrecognized exclusions silently, so a typo would
	// otherwise produce a filter that does nothing. Surrounding whitespace
	// is trimmed, so `" NVIDIA L40"` and `"NVIDIA L40"` mean the same card.
	//
	//
	// Examples: ["NVIDIA L40"]
	ExcludedTypes *[]string `json:"excludedTypes,omitempty"`

	// MinCudaVersion Lowest acceptable CUDA version for worker placement, as `major.minor`. Null means no floor.
	//
	// Examples: null
	MinCudaVersion *string `json:"minCudaVersion"`

	// Pools Serverless GPU pool IDs (as returned by `GET /v2/catalog/gpus` in
	// `pool`). Workers are placed on whichever listed pool has capacity.
	// Narrow a pool down to specific cards with `excludedTypes`.
	//
	// On `PATCH`, `pools` and `excludedTypes` are one selection and are
	// replaced together, so sending `pools` by itself **clears the
	// exclusions**. Two cases:
	//
	// - **Changing pools, keeping exclusions** — send both fields in one
	//   request: `{"gpu": {"pools": ["ADA_24"], "excludedTypes":
	//   ["NVIDIA L40"]}}`. `GET` the endpoint first to read the current
	//   `excludedTypes` and resend the ones that still apply to the new
	//   pools; an exclusion naming a type outside `pools` is a 400.
	// - **Changing only `count` or a CUDA constraint** — omit `pools`:
	//   `{"gpu": {"minCudaVersion": "12.4"}}`. The pool list and the
	//   exclusions are both left exactly as they are.
	//
	// `excludedTypes` documents the full rule.
	//
	//
	// Examples: ["ADA_24"]
	Pools []string `json:"pools"`
}

EndpointGpuConfig defines model for EndpointGpuConfig.

type EndpointRequestUrls

type EndpointRequestUrls struct {
	// contains filtered or unexported fields
}

EndpointRequestUrls Request URLs appropriate to the endpoint's top-level `type`. Queue-based endpoints provide job submission and management URLs; load-balancing endpoints provide `base` and `health` because their remaining paths are worker-defined.

Request and response bodies for the queue-based URLs are documented in the [serverless operation reference](https://docs.runpod.io/serverless/endpoints/operation-reference). Load-balancing endpoints are documented in [Load balancing endpoints](https://docs.runpod.io/serverless/load-balancing/overview).

func (EndpointRequestUrls) AsLoadBalancingRequestUrls

func (t EndpointRequestUrls) AsLoadBalancingRequestUrls() (LoadBalancingRequestUrls, error)

AsLoadBalancingRequestUrls returns the union data inside the EndpointRequestUrls as a LoadBalancingRequestUrls

func (EndpointRequestUrls) AsQueueBasedRequestUrls

func (t EndpointRequestUrls) AsQueueBasedRequestUrls() (QueueBasedRequestUrls, error)

AsQueueBasedRequestUrls returns the union data inside the EndpointRequestUrls as a QueueBasedRequestUrls

func (*EndpointRequestUrls) FromLoadBalancingRequestUrls

func (t *EndpointRequestUrls) FromLoadBalancingRequestUrls(v LoadBalancingRequestUrls) error

FromLoadBalancingRequestUrls overwrites any union data inside the EndpointRequestUrls as the provided LoadBalancingRequestUrls

func (*EndpointRequestUrls) FromQueueBasedRequestUrls

func (t *EndpointRequestUrls) FromQueueBasedRequestUrls(v QueueBasedRequestUrls) error

FromQueueBasedRequestUrls overwrites any union data inside the EndpointRequestUrls as the provided QueueBasedRequestUrls

func (EndpointRequestUrls) MarshalJSON

func (t EndpointRequestUrls) MarshalJSON() ([]byte, error)

func (*EndpointRequestUrls) MergeLoadBalancingRequestUrls

func (t *EndpointRequestUrls) MergeLoadBalancingRequestUrls(v LoadBalancingRequestUrls) error

MergeLoadBalancingRequestUrls performs a merge with any union data inside the EndpointRequestUrls, using the provided LoadBalancingRequestUrls

func (*EndpointRequestUrls) MergeQueueBasedRequestUrls

func (t *EndpointRequestUrls) MergeQueueBasedRequestUrls(v QueueBasedRequestUrls) error

MergeQueueBasedRequestUrls performs a merge with any union data inside the EndpointRequestUrls, using the provided QueueBasedRequestUrls

func (*EndpointRequestUrls) UnmarshalJSON

func (t *EndpointRequestUrls) UnmarshalJSON(b []byte) error

type EndpointScaling

type EndpointScaling struct {
	// contains filtered or unexported fields
}

EndpointScaling Autoscaling signal — a discriminated union on `type`: `QUEUE_DELAY` (queue-based endpoints only) or `REQUEST_COUNT`. The scaler is chosen independently of the endpoint's routing `type` and can be switched on update.

func (EndpointScaling) AsQueueDelayScaling

func (t EndpointScaling) AsQueueDelayScaling() (QueueDelayScaling, error)

AsQueueDelayScaling returns the union data inside the EndpointScaling as a QueueDelayScaling

func (EndpointScaling) AsRequestCountScaling

func (t EndpointScaling) AsRequestCountScaling() (RequestCountScaling, error)

AsRequestCountScaling returns the union data inside the EndpointScaling as a RequestCountScaling

func (EndpointScaling) Discriminator

func (t EndpointScaling) Discriminator() (string, error)

func (*EndpointScaling) FromQueueDelayScaling

func (t *EndpointScaling) FromQueueDelayScaling(v QueueDelayScaling) error

FromQueueDelayScaling overwrites any union data inside the EndpointScaling as the provided QueueDelayScaling

func (*EndpointScaling) FromRequestCountScaling

func (t *EndpointScaling) FromRequestCountScaling(v RequestCountScaling) error

FromRequestCountScaling overwrites any union data inside the EndpointScaling as the provided RequestCountScaling

func (EndpointScaling) MarshalJSON

func (t EndpointScaling) MarshalJSON() ([]byte, error)

func (*EndpointScaling) MergeQueueDelayScaling

func (t *EndpointScaling) MergeQueueDelayScaling(v QueueDelayScaling) error

MergeQueueDelayScaling performs a merge with any union data inside the EndpointScaling, using the provided QueueDelayScaling

func (*EndpointScaling) MergeRequestCountScaling

func (t *EndpointScaling) MergeRequestCountScaling(v RequestCountScaling) error

MergeRequestCountScaling performs a merge with any union data inside the EndpointScaling, using the provided RequestCountScaling

func (*EndpointScaling) UnmarshalJSON

func (t *EndpointScaling) UnmarshalJSON(b []byte) error

func (EndpointScaling) ValueByDiscriminator

func (t EndpointScaling) ValueByDiscriminator() (interface{}, error)

type EndpointType

type EndpointType string

EndpointType Request-routing semantics for a serverless endpoint.

  • `QUEUE` — submit asynchronous or synchronous jobs through the managed queue.
  • `LOAD_BALANCER` — send requests directly to worker-defined HTTP paths. Configure via `env`: `PORT` (server port, default 80), `PORT_HEALTH` (health-check port, default 80), and `HEALTH_CHECK_PATH` (path the load balancer polls for worker health, default `/ping`).
const (
	EndpointTypeLoadBalancer EndpointType = "LOAD_BALANCER"
	EndpointTypeQueue        EndpointType = "QUEUE"
)

Defines values for EndpointType.

func (EndpointType) Valid

func (e EndpointType) Valid() bool

Valid indicates whether the value is a known member of the EndpointType enum.

type EndpointWorkers

type EndpointWorkers struct {
	// IdleTimeout Seconds before idle workers scale down. Not applicable to queue-based
	// endpoints scaling on `requestCount` — rejected on create/update and
	// omitted from responses for that combination.
	//
	//
	// Examples: 5
	IdleTimeout *int `json:"idleTimeout,omitempty"`

	// Max Maximum number of workers.
	//
	// Examples: 5
	Max *int `json:"max,omitempty"`

	// Min Minimum number of workers.
	//
	// Examples: 0
	Min *int `json:"min,omitempty"`
}

EndpointWorkers defines model for EndpointWorkers.

type ErrorResponse

type ErrorResponse struct {
	// Detail Human-readable explanation
	//
	// Examples: pod not found
	Detail string `json:"detail"`

	// Errors Individual request-validation failures.
	//
	// Examples: ["$: additional properties 'bogus' not allowed"]
	Errors *[]string `json:"errors,omitempty"`

	// Status HTTP status code
	//
	// Examples: 404
	Status int `json:"status"`

	// Title Short human-readable summary
	//
	// Examples: Not Found
	Title string `json:"title"`
}

ErrorResponse defines model for ErrorResponse.

type FlashBoot

type FlashBoot string

FlashBoot FlashBoot cold-start acceleration mode. - `OFF` — disabled - `FLASHBOOT` — enabled - `PRIORITY_FLASHBOOT` — enabled with priority capacity

const (
	FlashBootEnabled  FlashBoot = "FLASHBOOT"
	FlashBootOff      FlashBoot = "OFF"
	FlashBootPriority FlashBoot = "PRIORITY_FLASHBOOT"
)

Defines values for FlashBoot.

func (FlashBoot) Valid

func (e FlashBoot) Valid() bool

Valid indicates whether the value is a known member of the FlashBoot enum.

type ForbiddenError

type ForbiddenError = ErrorResponse

ForbiddenError defines model for ForbiddenError.

type GpuCloudFilter

type GpuCloudFilter string

GpuCloudFilter GPU availability cloud filter.

const (
	GpuCloudFilterCommunity GpuCloudFilter = "COMMUNITY"
	GpuCloudFilterSecure    GpuCloudFilter = "SECURE"
)

Defines values for GpuCloudFilter.

func (GpuCloudFilter) Valid

func (e GpuCloudFilter) Valid() bool

Valid indicates whether the value is a known member of the GpuCloudFilter enum.

type GpuConfig

type GpuConfig struct {
	// Count Number of GPUs
	//
	// Examples: 1
	Count *int `json:"count,omitempty"`

	// Id GPU type identifier
	//
	// Examples: NVIDIA GeForce RTX 4090
	Id string `json:"id"`

	// Memory Total system RAM in GB allocated to the pod across all requested GPUs.
	//
	// Examples: 8
	Memory float64 `json:"memory"`

	// VcpuCount Total vCPU count allocated to the pod across all requested GPUs.
	//
	// Examples: 2
	VcpuCount float64 `json:"vcpuCount"`
}

GpuConfig defines model for GpuConfig.

type GpuCountFilter

type GpuCountFilter = int

GpuCountFilter defines model for GpuCountFilter.

type GpuManufacturer

type GpuManufacturer string

GpuManufacturer Canonical GPU hardware manufacturer.

const (
	GpuManufacturerAMD     GpuManufacturer = "AMD"
	GpuManufacturerNVIDIA  GpuManufacturer = "NVIDIA"
	GpuManufacturerUNKNOWN GpuManufacturer = "UNKNOWN"
)

Defines values for GpuManufacturer.

func (GpuManufacturer) Valid

func (e GpuManufacturer) Valid() bool

Valid indicates whether the value is a known member of the GpuManufacturer enum.

type GpuProductFilter

type GpuProductFilter = []Product

GpuProductFilter defines model for GpuProductFilter.

type GpuType

type GpuType struct {
	// Availability Overall GPU availability for the requested `product` contexts. Present only when requested with include=AVAILABILITY, which also requires `product`.
	Availability *AvailabilityLevel `json:"availability,omitempty"`

	// Community Available on community cloud
	//
	// Examples: true
	Community bool `json:"community"`

	// CudaVersions CUDA versions offered by machines with this GPU type, each tagged
	// with current capacity. Present only when requested with
	// include=AVAILABILITY, and scoped by the same filters as
	// `availability` (`count`, `cloud`, `product`, and whichever of
	// `cudaVersions` / `minCudaVersion` was supplied).
	//
	// Machines that report no CUDA version are skipped, so this property
	// is absent entirely for a GPU type with none — AMD, for instance.
	// Treat a missing `cudaVersions` the same as an empty one. A version
	// absent from a populated list is not offered for this GPU type.
	CudaVersions *[]CudaVersionAvailability `json:"cudaVersions,omitempty"`

	// DataCenters Per-datacenter GPU availability for the requested `product`
	// contexts, listing only the datacenters that offer this GPU in the
	// requested configuration. Present only when requested with
	// include=AVAILABILITY, which also requires `product`, and omitted
	// entirely when the configuration is unavailable everywhere.
	DataCenters *[]DataCenterAvailability `json:"dataCenters,omitempty"`

	// Id Individual GPU type identifier (use for pod creation)
	//
	// Examples: NVIDIA GeForce RTX 4090
	Id string `json:"id"`

	// Manufacturer Canonical GPU hardware manufacturer.
	Manufacturer GpuManufacturer `json:"manufacturer"`

	// MaxCount The largest number of GPUs you can request on a single pod of this
	// type, quoted separately per cloud. A pod runs on one machine, so
	// this is the GPU count of the largest machine of this type Runpod
	// operates in that cloud.
	//
	// This is a ceiling, not a stock level — it does not mean that many
	// GPUs are free right now. For current availability, request
	// `include=AVAILABILITY&product=POD` and read `availability`
	// (overall) or `dataCenters` (per data center).
	MaxCount struct {
		// Community Examples: 4
		Community int `json:"community"`

		// Secure Examples: 8
		Secure int `json:"secure"`
	} `json:"maxCount"`

	// Memory VRAM in GB
	//
	// Examples: 24
	Memory int `json:"memory"`

	// Name Examples: RTX 4090
	Name string `json:"name"`

	// Pool Serverless GPU pool ID (use for serverless endpoint creation). Null if GPU is not in a serverless pool.
	//
	// Examples: ADA_24
	Pool *string `json:"pool"`

	// Price List price in USD per hour for a **single** GPU of this type. Pod
	// rates are quoted separately per cloud (`secure`, `community`);
	// `serverless` is the rate for this GPU's pool. In every case the
	// rate for a unit is the figure times `gpu.count`; the rate actually
	// billed for a pod is reported as `cost` on the pod itself.
	Price struct {
		// Community Examples: 0.31
		Community float32 `json:"community"`

		// Secure Examples: 0.44
		Secure float32 `json:"secure"`

		// Serverless Serverless list price per GPU per hour, from the `pool` this GPU
		// belongs to. Multiply by `gpu.count` for the per-worker rate.
		// Absent when the GPU is not in a serverless pool available to the
		// caller. Negotiated account discounts are not reflected.
		//
		//
		// Examples: 1.1
		Serverless *float32 `json:"serverless,omitempty"`
	} `json:"price"`

	// Secure Available on secure cloud
	//
	// Examples: true
	Secure bool `json:"secure"`
}

GpuType defines model for GpuType.

type ListBillingResponse

type ListBillingResponse struct {
	Metadata BillingMetadata `json:"metadata"`
	Records  []BillingRecord `json:"records"`
}

ListBillingResponse Aggregated billing records across all Runpod resources.

type ListClusterBillingResponse

type ListClusterBillingResponse struct {
	Metadata ClusterBillingMetadata `json:"metadata"`
	Records  []ClusterBillingRecord `json:"records"`
}

ListClusterBillingResponse Time-bucketed Cluster billing records plus metadata for the resolved query, record count, distinct cluster count, and compute totals.

type ListClustersResponse

type ListClustersResponse struct {
	Clusters []Cluster `json:"clusters"`
}

ListClustersResponse defines model for ListClustersResponse.

type ListCpuTypesResponse

type ListCpuTypesResponse struct {
	Cpus []CpuType `json:"cpus"`
}

ListCpuTypesResponse defines model for ListCpuTypesResponse.

type ListDataCentersResponse

type ListDataCentersResponse struct {
	DataCenters []DataCenter `json:"dataCenters"`
}

ListDataCentersResponse defines model for ListDataCentersResponse.

type ListDelegationsResponse

type ListDelegationsResponse struct {
	Delegations []EcrDelegation `json:"delegations"`
}

ListDelegationsResponse defines model for ListDelegationsResponse.

type ListEndpointBillingResponse

type ListEndpointBillingResponse struct {
	Metadata EndpointBillingMetadata `json:"metadata"`
	Records  []EndpointBillingRecord `json:"records"`
}

ListEndpointBillingResponse Time-bucketed Runpod public endpoint billing records plus metadata for the resolved query, record count, and total endpoint amount.

type ListEndpointBuildsResponse

type ListEndpointBuildsResponse struct {
	// Builds Build history, newest first, cursor-paginated (an omitted `limit`
	// defaults to 100). Page with `cursor`/`limit` to walk the full
	// history, or fetch any build by id via
	// `GET /v2/serverless/{id}/builds/{buildId}`.
	Builds []Build `json:"builds"`

	// Pagination Cursor-pagination metadata. A list response carries it only where the operation takes the `cursor` and `limit` query parameters; every other list endpoint returns its bare list. Where it is present, follow `nextCursor` while `hasNextPage` is true to walk the full result set.
	Pagination Pagination `json:"pagination"`
}

ListEndpointBuildsResponse defines model for ListEndpointBuildsResponse.

type ListEndpointReleasesResponse

type ListEndpointReleasesResponse struct {
	// EndpointVersion The endpoint's current configuration version. Null if unknown.
	//
	// Examples: 4
	EndpointVersion *int `json:"endpointVersion,omitempty"`

	// Pagination Cursor-pagination metadata. A list response carries it only where the operation takes the `cursor` and `limit` query parameters; every other list endpoint returns its bare list. Where it is present, follow `nextCursor` while `hasNextPage` is true to walk the full result set.
	Pagination Pagination `json:"pagination"`

	// Releases Release history, newest first.
	Releases []Release      `json:"releases"`
	Rollout  RolloutSummary `json:"rollout"`
}

ListEndpointReleasesResponse defines model for ListEndpointReleasesResponse.

type ListEndpointWorkersResponse

type ListEndpointWorkersResponse struct {
	// EndpointVersion The endpoint's current configuration version. A worker whose
	// `version` differs is running stale config (see `worker.isStale`).
	// Null if unknown.
	//
	//
	// Examples: 4
	EndpointVersion *int `json:"endpointVersion,omitempty"`

	// Summary Histogram of the returned workers by status. The per-status counts are a
	// roll-up of the `workers` array, so `running + idle + initializing +
	// throttled + unhealthy == total == len(workers)`.
	Summary WorkerSummary `json:"summary"`
	Workers []Worker      `json:"workers"`
}

ListEndpointWorkersResponse defines model for ListEndpointWorkersResponse.

type ListEndpointsResponse

type ListEndpointsResponse struct {
	Endpoints []Endpoint `json:"endpoints"`

	// Pagination Cursor-pagination metadata. A list response carries it only where the operation takes the `cursor` and `limit` query parameters; every other list endpoint returns its bare list. Where it is present, follow `nextCursor` while `hasNextPage` is true to walk the full result set.
	Pagination Pagination `json:"pagination"`
}

ListEndpointsResponse defines model for ListEndpointsResponse.

type ListGpuTypesResponse

type ListGpuTypesResponse struct {
	Gpus []GpuType `json:"gpus"`
}

ListGpuTypesResponse defines model for ListGpuTypesResponse.

type ListNetworkVolumeBillingResponse

type ListNetworkVolumeBillingResponse struct {
	Metadata NetworkVolumeBillingMetadata `json:"metadata"`
	Records  []NetworkVolumeBillingRecord `json:"records"`
}

ListNetworkVolumeBillingResponse Time-bucketed network volume billing records plus metadata for the resolved query, record count, distinct volume count, and storage totals.

type ListNetworkVolumesResponse

type ListNetworkVolumesResponse struct {
	NetworkVolumes []NetworkVolume `json:"networkVolumes"`
}

ListNetworkVolumesResponse defines model for ListNetworkVolumesResponse.

type ListPodBillingResponse

type ListPodBillingResponse struct {
	Metadata PodBillingMetadata `json:"metadata"`
	Records  []PodBillingRecord `json:"records"`
}

ListPodBillingResponse Billing records for pods.

type ListPodsResponse

type ListPodsResponse struct {
	// Pagination Cursor-pagination metadata. A list response carries it only where the operation takes the `cursor` and `limit` query parameters; every other list endpoint returns its bare list. Where it is present, follow `nextCursor` while `hasNextPage` is true to walk the full result set.
	Pagination Pagination `json:"pagination"`
	Pods       []Pod      `json:"pods"`
}

ListPodsResponse defines model for ListPodsResponse.

type ListRegistriesResponse

type ListRegistriesResponse struct {
	Registries []Registry `json:"registries"`
}

ListRegistriesResponse defines model for ListRegistriesResponse.

type ListSecretsResponse

type ListSecretsResponse struct {
	Secrets []Secret `json:"secrets"`
}

ListSecretsResponse defines model for ListSecretsResponse.

type ListServerlessBillingResponse

type ListServerlessBillingResponse struct {
	Metadata ServerlessBillingMetadata `json:"metadata"`
	Records  []ServerlessBillingRecord `json:"records"`
}

ListServerlessBillingResponse Billing records for serverless.

type ListTemplatesResponse

type ListTemplatesResponse struct {
	// Pagination Cursor-pagination metadata. A list response carries it only where the operation takes the `cursor` and `limit` query parameters; every other list endpoint returns its bare list. Where it is present, follow `nextCursor` while `hasNextPage` is true to walk the full result set.
	Pagination Pagination `json:"pagination"`
	Templates  []Template `json:"templates"`
}

ListTemplatesResponse defines model for ListTemplatesResponse.

type LoadBalancingRequestUrls

type LoadBalancingRequestUrls struct {
	// Base Base URL for worker-defined HTTP and WebSocket paths.
	// See [Load balancing endpoints](https://docs.runpod.io/serverless/load-balancing/overview).
	//
	// Examples: https://4m7x2k9q.api.runpod.ai
	Base string `json:"base"`

	// Health Health check endpoint the load balancer will periodically ping to decide if the worker is healthy enough to receive traffic. Configurable by setting the `HEALTH_CHECK_PATH` environment variable. Defaults to `/ping` if the variable is not set.
	// See [Health checks](https://docs.runpod.io/serverless/load-balancing/overview#health-checks) for the response codes it interprets.
	//
	// Examples: https://4m7x2k9q.api.runpod.ai/ping
	Health string `json:"health"`
}

LoadBalancingRequestUrls defines model for LoadBalancingRequestUrls.

type LogLastEventID

type LogLastEventID = time.Time

LogLastEventID defines model for LogLastEventID.

type LogSince

type LogSince = time.Time

LogSince defines model for LogSince.

type LogSource

type LogSource string

LogSource Log source to include in a log stream. - `container` — container stdout/stderr log stream - `system` — host lifecycle/userlogs stream

const (
	LogSourceContainer LogSource = "container"
	LogSourceSystem    LogSource = "system"
)

Defines values for LogSource.

func (LogSource) Valid

func (e LogSource) Valid() bool

Valid indicates whether the value is a known member of the LogSource enum.

type LogSourceParam

type LogSourceParam = LogSource

LogSourceParam Log source to include in a log stream. - `container` — container stdout/stderr log stream - `system` — host lifecycle/userlogs stream

type LogTail

type LogTail = int

LogTail defines model for LogTail.

type MethodNotAllowedError

type MethodNotAllowedError = ErrorResponse

MethodNotAllowedError defines model for MethodNotAllowedError.

type MinCudaVersionFilter

type MinCudaVersionFilter = string

MinCudaVersionFilter defines model for MinCudaVersionFilter.

type Mounts

type Mounts struct {
	Network *[]NetworkMount `json:"network,omitempty"`

	// Persistent Host-local persistent storage. Pinned to the pod's host machine — data
	// does not survive a host failure. Disallowed on CPU pods. Mutually
	// exclusive with NetworkMount. Deprecated: prefer NetworkMount for any
	// data you cannot recreate.
	Persistent *PersistentMount `json:"persistent,omitempty"`
}

Mounts Storage mounts attached to a pod. At most one of `persistent` or `network` may be set: sending both is rejected with 400. The `network` field is an array for forward compatibility with multi-network-volume support; `maxItems` is 1.

PATCH semantics:

  • Omitting `mounts` or sending `{}` leaves the existing mount unchanged.
  • An explicit `network: []` is rejected with 400 (clearing mounts is not supported).
  • Mount kind is fixed at create — a PATCH that introduces a kind not present at create (persistent on a network pod, network on a persistent pod, or any mount on a previously-mountless pod) is rejected with 400.
  • The `volumeId` of a network mount is immutable; a PATCH that names a different `volumeId` is rejected with 400.
  • Partial mounts are not supported — every mount entry must include the full schema (`size` + `path` for persistent, `volumeId` + `path` for network). Missing required fields → 422.

type NetworkMount

type NetworkMount struct {
	// Path Mount path inside the container. No default — must be specified explicitly.
	//
	// Examples: /runpod-volume
	Path string `json:"path"`

	// VolumeId ID of an existing NetworkVolume in the same data center as the pod.
	//
	// Examples: vol_xyz
	VolumeId string `json:"volumeId"`
}

NetworkMount Reference to a NetworkVolume. Custom paths are honored at runtime on both GPU and CPU pods. The underlying `volumeId` is immutable post-create; the mount `path` may be changed via PATCH.

type NetworkVolume

type NetworkVolume struct {
	// DataCenter Data center location; immutable after creation
	//
	// Examples: EU-RO-1
	DataCenter string `json:"dataCenter"`

	// Id Unique network volume identifier
	//
	// Examples: agv6w2qcg7
	Id string `json:"id"`

	// Name Human-readable name (not required to be unique)
	//
	// Examples: my-dataset
	Name string `json:"name"`

	// Size Allocated storage in GB
	//
	// Examples: 50
	Size int `json:"size"`

	// Type Storage tier of this volume. Set at creation and immutable.
	Type VolumeType `json:"type"`
}

NetworkVolume defines model for NetworkVolume.

type NetworkVolumeBillingAmounts

type NetworkVolumeBillingAmounts struct {
	// HighPerformanceAmount High-performance storage cost in USD for the bucket.
	HighPerformanceAmount float64 `json:"highPerformanceAmount"`

	// StandardAmount Standard storage cost in USD for the bucket.
	StandardAmount float64 `json:"standardAmount"`

	// TotalAmount Total network volume cost in USD for the bucket, across standard and high-performance storage.
	//
	//
	// Examples: 5.79
	TotalAmount float64 `json:"totalAmount"`
}

NetworkVolumeBillingAmounts Network volume storage cost, split into standard and high-performance. Backs a record's amounts and the metadata totals.

type NetworkVolumeBillingMetadata

type NetworkVolumeBillingMetadata struct {
	Query NetworkVolumeBillingQuery `json:"query"`

	// RecordCount Number of records returned (buckets times distinct volumes).
	RecordCount int `json:"recordCount"`

	// Totals Network volume storage cost, split into standard and high-performance. Backs a record's amounts and the metadata totals.
	Totals NetworkVolumeBillingAmounts `json:"totals"`

	// UniqueNetworkVolumeCount Number of distinct network volumes the records span.
	UniqueNetworkVolumeCount int `json:"uniqueNetworkVolumeCount"`
}

NetworkVolumeBillingMetadata defines model for NetworkVolumeBillingMetadata.

type NetworkVolumeBillingQuery

type NetworkVolumeBillingQuery struct {
	// BucketSize Length of each billing time bucket.
	//
	// Examples: day
	BucketSize BillingBucketSize `json:"bucketSize"`

	// EndTime End of the range, exclusive (RFC 3339).
	//
	// Examples: 2026-06-02T00:00:00Z
	EndTime time.Time `json:"endTime"`

	// NetworkVolumeId The networkVolumeId filter applied, if any.
	NetworkVolumeId *string `json:"networkVolumeId,omitempty"`

	// StartTime Start of the range, inclusive (RFC 3339).
	//
	// Examples: 2026-06-01T00:00:00Z
	StartTime time.Time `json:"startTime"`
}

NetworkVolumeBillingQuery defines model for NetworkVolumeBillingQuery.

type NetworkVolumeBillingRecord

type NetworkVolumeBillingRecord struct {
	// EndTime End of the range, exclusive (RFC 3339).
	//
	// Examples: 2026-06-02T00:00:00Z
	EndTime time.Time `json:"endTime"`

	// HighPerformanceAmount High-performance storage cost in USD for the bucket.
	HighPerformanceAmount float64 `json:"highPerformanceAmount"`

	// NetworkVolumeId The network volume this record bills. When the networkVolumeId filter is set every record carries that id; otherwise one record is emitted per network volume per bucket.
	//
	//
	// Examples: vol_abc123
	NetworkVolumeId string `json:"networkVolumeId"`

	// StandardAmount Standard storage cost in USD for the bucket.
	StandardAmount float64 `json:"standardAmount"`

	// StartTime Start of the range, inclusive (RFC 3339).
	//
	// Examples: 2026-06-01T00:00:00Z
	StartTime time.Time `json:"startTime"`

	// TotalAmount Total network volume cost in USD for the bucket, across standard and high-performance storage.
	//
	//
	// Examples: 5.79
	TotalAmount float64 `json:"totalAmount"`
}

NetworkVolumeBillingRecord A single time-bucketed network volume billing record, split into standard and high-performance storage. Returned by GET /v2/billing/network-volumes.

type NotFoundError

type NotFoundError = ErrorResponse

NotFoundError defines model for NotFoundError.

type Paginated

type Paginated struct {
	// Pagination Cursor-pagination metadata. A list response carries it only where the operation takes the `cursor` and `limit` query parameters; every other list endpoint returns its bare list. Where it is present, follow `nextCursor` while `hasNextPage` is true to walk the full result set.
	Pagination Pagination `json:"pagination"`
}

Paginated Mixin for cursor-paginated list responses. Compose it with `allOf` next to the resource's bare list schema so that a list shape shared with a non-paginated endpoint (e.g. a cluster's member pods) does not inherit a pagination block it cannot honour.

type Pagination

type Pagination struct {
	// HasNextPage Whether more items exist after this page.
	//
	// Examples: false
	HasNextPage bool `json:"hasNextPage"`

	// NextCursor Pass as the `cursor` query parameter to fetch the next page. Null on the last page.
	//
	//
	// Examples: null
	NextCursor *string `json:"nextCursor"`
}

Pagination Cursor-pagination metadata. A list response carries it only where the operation takes the `cursor` and `limit` query parameters; every other list endpoint returns its bare list. Where it is present, follow `nextCursor` while `hasNextPage` is true to walk the full result set.

type PaginationCursor

type PaginationCursor = string

PaginationCursor defines model for PaginationCursor.

type PaginationLimit

type PaginationLimit = int

PaginationLimit defines model for PaginationLimit.

type PaginationLimitBuilds

type PaginationLimitBuilds = int

PaginationLimitBuilds defines model for PaginationLimitBuilds.

type PersistentMount

type PersistentMount struct {
	// Path Mount path inside the container. May be changed via PATCH.
	//
	// Examples: /workspace
	Path string `json:"path"`

	// Size Host-local persistent storage in GB. Upstream enforces a 10 GB floor.
	//
	// Examples: 20
	Size int `json:"size"`
}

PersistentMount Host-local persistent storage. Pinned to the pod's host machine — data does not survive a host failure. Disallowed on CPU pods. Mutually exclusive with NetworkMount. Deprecated: prefer NetworkMount for any data you cannot recreate.

type Pod

type Pod struct {
	// Actions Valid state transitions for the current status.
	Actions []PodAction `json:"actions"`

	// Args The container's command, as a single raw string. This is the field `entrypoint` and `cmd` encode into, exposed in its stored form.
	//
	// Two shapes are accepted. A bare shell string is treated as CMD and split into arguments, which is what the console's "Container start command" field writes. A JSON object of the form `{"entrypoint":[...],"cmd":[...]}` sets either or both explicitly.
	//
	// Responses always return both representations: `args` exactly as stored, plus the deconstructed `entrypoint` and `cmd`. Supplying `args` together with `entrypoint` or `cmd` is allowed only when they describe the same command, so a read-modify-write client can send back everything it received. Send `""` to clear, omit to leave unchanged.
	//
	//
	// Examples: --model meta-llama/Llama-3-8B --max-model-len 8192, {"entrypoint":["/bin/bash","-c"],"cmd":["python -u main.py"]},
	Args string `json:"args"`

	// Cloud Cloud tier.
	// - `SECURE`    — Runpod-owned datacenter hardware
	// - `COMMUNITY` — community-hosted hardware
	Cloud Cloud `json:"cloud"`

	// Cluster Cluster membership; omitted from a standalone pod. Member pods are managed through `/v2/clusters/{id}` — they are excluded from `GET /v2/pods` by default (pass `includeClusterPods=true` to include them) and cannot be modified or deleted via the pod endpoints.
	Cluster *PodCluster `json:"cluster,omitempty"`

	// Cmd Container CMD in exec form. When the image defines an ENTRYPOINT, this is the argument list passed to it. Encoded into the `args` field; supplying both is allowed only when they describe the same command. Send `[]` to clear, omit to leave unchanged.
	//
	//
	// Examples: ["--model","meta-llama/Llama-3-8B","--max-model-len","8192"]
	Cmd *[]string `json:"cmd,omitempty"`

	// Cost Current cost in USD per hour (0.0 when EXITED or TERMINATED)
	//
	// Examples: 0.35
	Cost float32 `json:"cost"`

	// Cpu Present for CPU pods; omitted from GPU pods.
	Cpu *CpuConfig `json:"cpu,omitempty"`

	// CreatedAt Examples: 2026-03-13T20:00:00Z
	CreatedAt time.Time `json:"createdAt"`

	// CudaVersion CUDA version reported by the host machine. Retained while the pod is stopped — a stopped pod keeps its machine assignment and resumes onto the same host. Null means unknown or not applicable (CPU pods, or a host that has not reported one), not that CUDA is absent.
	//
	// Examples: 12.8
	CudaVersion *string `json:"cudaVersion"`

	// DataCenterId Data center where the pod is running (assigned by scheduler)
	//
	// Examples: US-TX-3
	DataCenterId *string `json:"dataCenterId"`

	// Disk Container disk in GB (ephemeral, wiped on restart)
	//
	// Examples: 50
	Disk int `json:"disk"`

	// Entrypoint Container ENTRYPOINT in exec form, overriding the image's own. Encoded into `args` field; supplying both is allowed only when they describe the same command. Send `[]` to clear, omit to leave unchanged.
	//
	//
	// Examples: ["/bin/bash","-c"]
	Entrypoint *[]string `json:"entrypoint,omitempty"`

	// Env Environment variables as key-value pairs
	//
	// Examples: {"JUPYTER_PASSWORD":"changeme"}
	Env              map[string]string   `json:"env"`
	GlobalNetworking PodGlobalNetworking `json:"globalNetworking"`

	// Gpu Present for GPU pods; omitted from CPU pods.
	Gpu *GpuConfig `json:"gpu,omitempty"`

	// Id Examples: pod_abc123
	Id string `json:"id"`

	// Image Docker image reference
	//
	// Examples: runpod/pytorch:1.0.2-cu1281-torch280-ubuntu2404
	Image string `json:"image"`

	// Locked Whether the pod is locked (prevents stopping or resetting)
	//
	// Examples: false
	Locked bool `json:"locked"`

	// Mounts Storage mounts attached to a pod. At most one of `persistent` or
	// `network` may be set: sending both is rejected with 400. The
	// `network` field is an array for forward compatibility with
	// multi-network-volume support; `maxItems` is 1.
	//
	// PATCH semantics:
	// - Omitting `mounts` or sending `{}` leaves the existing mount
	//   unchanged.
	// - An explicit `network: []` is rejected with 400 (clearing mounts
	//   is not supported).
	// - Mount kind is fixed at create — a PATCH that introduces a kind
	//   not present at create (persistent on a network pod, network on
	//   a persistent pod, or any mount on a previously-mountless pod)
	//   is rejected with 400.
	// - The `volumeId` of a network mount is immutable; a PATCH that
	//   names a different `volumeId` is rejected with 400.
	// - Partial mounts are not supported — every mount entry must
	//   include the full schema (`size` + `path` for persistent,
	//   `volumeId` + `path` for network). Missing required fields → 422.
	Mounts Mounts `json:"mounts"`

	// Name Examples: my-training-pod
	Name string `json:"name"`

	// Ports Exposed ports, formatted as port/protocol
	//
	// Examples: ["8888/http","22/tcp"]
	Ports []string `json:"ports"`

	// Registry Container registry credential ID (for private images)
	//
	// Examples: null
	Registry *string `json:"registry"`

	// Runtime Live utilization metrics. Null when the pod is not RUNNING.
	Runtime *PodRuntime `json:"runtime"`

	// Ssh SSH connection details, via the Runpod proxy or directly to the pod's published `22/tcp` port.
	Ssh PodSsh `json:"ssh"`

	// StartedAt Examples: 2026-03-13T20:00:00Z
	StartedAt *time.Time `json:"startedAt"`

	// Status Lifecycle status of a pod.
	// - `PROVISIONING` — pod is being allocated
	// - `STARTING`     — container is starting
	// - `RUNNING`      — container is healthy
	// - `EXITED`       — container exited (stopped)
	// - `ERROR`        — container is in an unrecoverable error state
	// - `TERMINATED`   — pod has been permanently deleted
	Status PodStatus `json:"status"`

	// Template ID of the template this pod was created from
	//
	// Examples: null
	Template *string `json:"template"`
}

Pod defines model for Pod.

type PodAction

type PodAction string

PodAction State transition to trigger on a pod.

const (
	PodActionRestart   PodAction = "restart"
	PodActionStart     PodAction = "start"
	PodActionStop      PodAction = "stop"
	PodActionTerminate PodAction = "terminate"
)

Defines values for PodAction.

func (PodAction) Valid

func (e PodAction) Valid() bool

Valid indicates whether the value is a known member of the PodAction enum.

type PodActionRequest

type PodActionRequest struct {
	// Action State transition to trigger on a pod.
	Action PodAction `json:"action"`
}

PodActionRequest defines model for PodActionRequest.

type PodBillingAmounts

type PodBillingAmounts struct {
	// CpuAmount CPU pod compute cost in USD for the bucket.
	CpuAmount float64 `json:"cpuAmount"`

	// DiskAmount Pod disk cost in USD for the bucket.
	DiskAmount float64 `json:"diskAmount"`

	// GpuAmount GPU pod compute cost in USD for the bucket.
	GpuAmount float64 `json:"gpuAmount"`

	// TotalAmount Total pod cost in USD for the bucket.
	//
	// Examples: 12.34
	TotalAmount float64 `json:"totalAmount"`
}

PodBillingAmounts Pod cost components covering both GPU and CPU pods. Backs a record's amounts and the metadata totals.

type PodBillingMetadata

type PodBillingMetadata struct {
	Query PodBillingQuery `json:"query"`

	// RecordCount Number of records returned (buckets times distinct pods).
	RecordCount int `json:"recordCount"`

	// Totals Pod cost components covering both GPU and CPU pods. Backs a record's amounts and the metadata totals.
	Totals PodBillingAmounts `json:"totals"`

	// UniquePodCount Number of distinct pods the records span.
	UniquePodCount int `json:"uniquePodCount"`
}

PodBillingMetadata defines model for PodBillingMetadata.

type PodBillingQuery

type PodBillingQuery struct {
	// BucketSize Length of each billing time bucket.
	//
	// Examples: day
	BucketSize BillingBucketSize `json:"bucketSize"`

	// EndTime End of the range, exclusive (RFC 3339).
	//
	// Examples: 2026-06-02T00:00:00Z
	EndTime time.Time `json:"endTime"`

	// PodId The podId filter applied, if any.
	PodId *string `json:"podId,omitempty"`

	// StartTime Start of the range, inclusive (RFC 3339).
	//
	// Examples: 2026-06-01T00:00:00Z
	StartTime time.Time `json:"startTime"`
}

PodBillingQuery defines model for PodBillingQuery.

type PodBillingRecord

type PodBillingRecord struct {
	// CpuAmount CPU pod compute cost in USD for the bucket.
	CpuAmount float64 `json:"cpuAmount"`

	// DiskAmount Pod disk cost in USD for the bucket.
	DiskAmount float64 `json:"diskAmount"`

	// EndTime End of the range, exclusive (RFC 3339).
	//
	// Examples: 2026-06-02T00:00:00Z
	EndTime time.Time `json:"endTime"`

	// GpuAmount GPU pod compute cost in USD for the bucket.
	GpuAmount float64 `json:"gpuAmount"`

	// PodId The pod this record bills. When the podId filter is set every record carries that id; otherwise one record is emitted per pod per bucket.
	//
	//
	// Examples: pod_abc123
	PodId string `json:"podId"`

	// StartTime Start of the range, inclusive (RFC 3339).
	//
	// Examples: 2026-06-01T00:00:00Z
	StartTime time.Time `json:"startTime"`

	// TotalAmount Total pod cost in USD for the bucket.
	//
	// Examples: 12.34
	TotalAmount float64 `json:"totalAmount"`
}

PodBillingRecord A single time-bucketed pod billing record, covering both GPU and CPU pods. Returned by GET /v2/billing/pods.

type PodCluster

type PodCluster struct {
	// Id ID of the cluster this pod belongs to.
	//
	// Examples: cluster_abc123
	Id string `json:"id"`

	// Ip The pod's address on the cluster's private overlay network; omitted until the address is assigned.
	//
	// Examples: 10.65.0.2
	Ip *string `json:"ip,omitempty"`

	// Rank The pod's node rank within the cluster (NODE_RANK), or null until the index is assigned during provisioning. Rank 0 is the cluster's entry node (`Cluster.primary`); for SLURM it is the controller.
	//
	// Examples: 0
	Rank *int `json:"rank"`

	// Role SLURM or RAY role; omitted for TRAINING/APPLICATION clusters, which do not assign roles.
	Role *PodClusterRole `json:"role,omitempty"`
}

PodCluster A pod's membership in a cluster.

type PodClusterRole

type PodClusterRole string

PodClusterRole A cluster member's role. Assigned for SLURM and RAY clusters; omitted for TRAINING/APPLICATION members.

const (
	PodClusterRoleRayHead         PodClusterRole = "RAY_HEAD"
	PodClusterRoleRayWorker       PodClusterRole = "RAY_WORKER"
	PodClusterRoleSlurmCompute    PodClusterRole = "SLURM_COMPUTE"
	PodClusterRoleSlurmController PodClusterRole = "SLURM_CONTROLLER"
)

Defines values for PodClusterRole.

func (PodClusterRole) Valid

func (e PodClusterRole) Valid() bool

Valid indicates whether the value is a known member of the PodClusterRole enum.

type PodGlobalNetworking

type PodGlobalNetworking struct {
	// Enabled Whether global networking is enabled, giving the pod a private IP reachable across data centers. Derived from whether the pod has an assigned global-network address.
	//
	// Examples: true
	Enabled bool `json:"enabled"`

	// InternalDns Internal DNS name (`<podId>.runpod.internal`), reachable from other globally-networked pods in the same account. Present only when enabled.
	//
	// Examples: gfj8b292vyg08g.runpod.internal
	InternalDns *string `json:"internalDns,omitempty"`

	// Ip The pod's assigned global-networking IP. Present only when enabled.
	//
	// Examples: 10.65.1.42
	Ip *string `json:"ip,omitempty"`
}

PodGlobalNetworking defines model for PodGlobalNetworking.

type PodGpuUtilization

type PodGpuUtilization struct {
	// MemoryUtil Examples: 78
	MemoryUtil *int `json:"memoryUtil,omitempty"`

	// Util Examples: 94
	Util *int `json:"util,omitempty"`
}

PodGpuUtilization Per-GPU utilization metrics.

type PodList

type PodList struct {
	Pods []Pod `json:"pods"`
}

PodList A bare list of pods. `GET /v2/clusters/{id}/pods` returns it as-is (a cluster's members are a small, complete set); `GET /v2/pods` composes it with the pagination block via ListPodsResponse.

type PodRuntime

type PodRuntime struct {
	// Cpu Single-value utilization percentage (0–100). Shared by `cpu` and `memory`.
	Cpu  *Utilization         `json:"cpu,omitempty"`
	Gpus *[]PodGpuUtilization `json:"gpus,omitempty"`

	// Memory Single-value utilization percentage (0–100). Shared by `cpu` and `memory`.
	Memory *Utilization      `json:"memory,omitempty"`
	Ports  *[]PodRuntimePort `json:"ports,omitempty"`

	// Uptime Seconds since the container started
	//
	// Examples: 3600
	Uptime *int `json:"uptime,omitempty"`
}

PodRuntime Live utilization metrics for a running pod.

type PodRuntimePort

type PodRuntimePort struct {
	// Ip Examples: 45.23.12.1
	Ip *string `json:"ip,omitempty"`

	// Private Examples: 8888
	Private *int `json:"private,omitempty"`

	// Public Examples: 43210
	Public *int `json:"public,omitempty"`

	// Type Examples: http
	Type *string `json:"type,omitempty"`
}

PodRuntimePort Live port mapping for a running pod.

type PodSsh

type PodSsh struct {
	// Direct Connection straight to the pod's sshd over its published `22/tcp` mapping. Supports the full SSH feature set. Null unless `22/tcp` is in `ports` and the running pod has been assigned a public port for it — so it is absent while the pod is provisioning or stopped.
	Direct *PodSshEndpoint `json:"direct"`

	// Proxy Connection through Runpod's SSH proxy. Works without exposing a port and without a public IP, but carries an interactive shell only — SCP, SFTP, rsync, and port forwarding need `direct`. Null until the pod has a machine assignment.
	Proxy *PodSshEndpoint `json:"proxy"`
}

PodSsh How to connect to this pod over SSH. Both variants authenticate with the account's registered SSH public keys (`PUT /v2/account/ssh-keys`), which reach the pod only if it was created with `startSsh` — a pod created without it has no SSH access regardless of what this block reports.

type PodSshEndpoint

type PodSshEndpoint struct {
	// Command The equivalent `ssh` invocation, ready to run. Add `-i <path>` if the matching private key is not one of your default identities, and `-o StrictHostKeyChecking=no` to skip the host-key prompt on short-lived pods.
	//
	// Examples: ssh 7h9k2m4n6p-64411eb2@ssh.runpod.io
	Command string `json:"command"`

	// Host Hostname or IP to connect to.
	//
	// Examples: ssh.runpod.io
	Host string `json:"host"`

	// Port TCP port to connect to.
	//
	// Examples: 22
	Port int `json:"port"`

	// Username SSH username. For the proxy this is an opaque routing token, not a user account on the pod.
	//
	// Examples: 7h9k2m4n6p-64411eb2
	Username string `json:"username"`
}

PodSshEndpoint One way to reach the pod over SSH, as both its parts and a ready-to-run invocation.

type PodStatus

type PodStatus string

PodStatus Lifecycle status of a pod. - `PROVISIONING` — pod is being allocated - `STARTING` — container is starting - `RUNNING` — container is healthy - `EXITED` — container exited (stopped) - `ERROR` — container is in an unrecoverable error state - `TERMINATED` — pod has been permanently deleted

const (
	PodStatusError        PodStatus = "ERROR"
	PodStatusExited       PodStatus = "EXITED"
	PodStatusProvisioning PodStatus = "PROVISIONING"
	PodStatusRunning      PodStatus = "RUNNING"
	PodStatusStarting     PodStatus = "STARTING"
	PodStatusTerminated   PodStatus = "TERMINATED"
)

Defines values for PodStatus.

func (PodStatus) Valid

func (e PodStatus) Valid() bool

Valid indicates whether the value is a known member of the PodStatus enum.

type Product

type Product string

Product Catalog product availability context. Availability is product-specific, so this is required whenever availability is requested.

const (
	ProductCluster    Product = "CLUSTER"
	ProductPod        Product = "POD"
	ProductServerless Product = "SERVERLESS"
)

Defines values for Product.

func (Product) Valid

func (e Product) Valid() bool

Valid indicates whether the value is a known member of the Product enum.

type QueueBasedRequestUrls

type QueueBasedRequestUrls struct {
	// Cancel Stop an in-progress job or remove a queued job before it starts.
	// See the [/cancel operation reference](https://docs.runpod.io/serverless/endpoints/operation-reference#/cancel) for request and response bodies.
	//
	// Examples: https://api.runpod.ai/v2/4m7x2k9q/cancel/{job_id}
	Cancel string `json:"cancel"`

	// Health Overview of an endpoint's operational status.
	// See the [/health operation reference](https://docs.runpod.io/serverless/endpoints/operation-reference#/health) for request and response bodies.
	//
	// Examples: https://api.runpod.ai/v2/4m7x2k9q/health
	Health string `json:"health"`

	// PurgeQueue Remove all pending jobs from the queue. Does not affect in-progress jobs.
	// See the [/purge-queue operation reference](https://docs.runpod.io/serverless/endpoints/operation-reference#/purge-queue) for request and response bodies.
	//
	// Examples: https://api.runpod.ai/v2/4m7x2k9q/purge-queue
	PurgeQueue string `json:"purgeQueue"`

	// Retry Requeue a failed or timed-out job without submitting a new request.
	// See the [/retry operation reference](https://docs.runpod.io/serverless/endpoints/operation-reference#/retry) for request and response bodies.
	//
	// Examples: https://api.runpod.ai/v2/4m7x2k9q/retry/{job_id}
	Retry string `json:"retry"`

	// Run URL for asynchronously submitting a queued job.
	// See the [/run operation reference](https://docs.runpod.io/serverless/endpoints/operation-reference#/run) for request and response bodies.
	//
	// Examples: https://api.runpod.ai/v2/4m7x2k9q/run
	Run string `json:"run"`

	// RunSync URL for synchronously submitting a queued job. Accepts an optional `?wait=x` query parameter to control how long the request waits for job completion, defaulting to 90 seconds.
	// See the [/runsync operation reference](https://docs.runpod.io/serverless/endpoints/operation-reference#/runsync) for request and response bodies.
	//
	// Examples: https://api.runpod.ai/v2/4m7x2k9q/runsync
	RunSync string `json:"runSync"`

	// Status Check the current state, execution statistics, and results of a previously submitted job.
	// See the [/status operation reference](https://docs.runpod.io/serverless/endpoints/operation-reference#/status) for request and response bodies.
	//
	// Examples: https://api.runpod.ai/v2/4m7x2k9q/status/{job_id}
	Status string `json:"status"`

	// Stream Receive incremental results as they become available from a job that generates output progressively.
	// See the [/stream operation reference](https://docs.runpod.io/serverless/endpoints/operation-reference#/stream) for request and response bodies.
	//
	// Examples: https://api.runpod.ai/v2/4m7x2k9q/stream/{job_id}
	Stream string `json:"stream"`
}

QueueBasedRequestUrls defines model for QueueBasedRequestUrls.

type QueueDelayScaling

type QueueDelayScaling struct {
	// QueueDelay Adjusts the number of workers based on how long requests wait in the queue.
	//
	// Examples: 4
	QueueDelay float32 `json:"queueDelay"`

	// Type Scaler discriminator. Always `QUEUE_DELAY` for this variant.
	Type QueueDelayScalingType `json:"type"`
}

QueueDelayScaling Scale on queue wait time. Queue-based endpoints only.

type QueueDelayScalingType

type QueueDelayScalingType string

QueueDelayScalingType Scaler discriminator. Always `QUEUE_DELAY` for this variant.

const (
	QueueDelayScalingTypeQueueDelay QueueDelayScalingType = "QUEUE_DELAY"
)

Defines values for QueueDelayScalingType.

func (QueueDelayScalingType) Valid

func (e QueueDelayScalingType) Valid() bool

Valid indicates whether the value is a known member of the QueueDelayScalingType enum.

type RateLimitHeader

type RateLimitHeader = string

RateLimitHeader Live per-window quota state. Optional — omitted for rate-limit-exempt callers.

A structured-field list with one member per window (`minute`, `hour`, `day`), each carrying the remaining request count `r` and seconds until the window resets `t`. Returned on responses to authenticated requests, not only on 429s.

Examples: "minute";r=0;t=12, "hour";r=2800;t=1812, "day";r=49500;t=45012

type RateLimitPolicyHeader

type RateLimitPolicyHeader = string

RateLimitPolicyHeader Static per-window quota policy. Optional — omitted for rate-limit-exempt callers.

A structured-field list with one member per window (`minute`, `hour`, `day`), each carrying the quota `q` and the window length in seconds `w`. Returned on responses to authenticated requests, not only on 429s.

Examples: "minute";q=60;w=60, "hour";q=3000;w=3600, "day";q=50000;w=86400

type Registry

type Registry struct {
	// Id Examples: reg_abc
	Id string `json:"id"`

	// Name Examples: my-private-registry
	Name string `json:"name"`
}

Registry defines model for Registry.

type Release

type Release struct {
	// BuildId The GitHub build that produced this release. Set when `source` is
	// `GIT_BUILD`; null for `MANUAL` releases. Fetch build detail/logs via
	// `/v2/serverless/{id}/builds/{buildId}`.
	//
	//
	// Examples: build_abc123
	BuildId *string `json:"buildId,omitempty"`

	// CreatedAt Examples: 2026-03-13T20:00:00Z
	CreatedAt time.Time `json:"createdAt"`

	// CreatedByUserId ID of the user who created the release.
	CreatedByUserId *string `json:"createdByUserId,omitempty"`

	// Diff Configuration fields that changed in this release.
	Diff []ReleaseDiffEntry `json:"diff"`

	// Id Examples: rel_abc123
	Id string `json:"id"`

	// Source What produced the release.
	// - `GIT_BUILD` — a completed GitHub build (see `buildId`)
	// - `MANUAL`    — a manual configuration change
	Source ReleaseSource `json:"source"`

	// Version The endpoint configuration version this release produced.
	//
	// Examples: 4
	Version *int `json:"version,omitempty"`

	// WorkerCount Workers currently running this release's version.
	//
	// Examples: 2
	WorkerCount int `json:"workerCount"`
}

Release defines model for Release.

type ReleaseDiffEntry

type ReleaseDiffEntry struct {
	// Field The changed configuration field. Top-level (e.g. `gpuCount`,
	// `locations`) or template-scoped (e.g. `template.imageName`,
	// `template.env`).
	//
	//
	// Examples: template.imageName
	Field string `json:"field"`

	// New New value, as raw JSON. Null when the field was removed.
	New interface{} `json:"new"`

	// Old Previous value, as raw JSON. Null when the field was added.
	Old interface{} `json:"old"`
}

ReleaseDiffEntry defines model for ReleaseDiffEntry.

type ReleaseSource

type ReleaseSource string

ReleaseSource What produced the release. - `GIT_BUILD` — a completed GitHub build (see `buildId`) - `MANUAL` — a manual configuration change

const (
	ReleaseSourceGitBuild ReleaseSource = "GIT_BUILD"
	ReleaseSourceManual   ReleaseSource = "MANUAL"
)

Defines values for ReleaseSource.

func (ReleaseSource) Valid

func (e ReleaseSource) Valid() bool

Valid indicates whether the value is a known member of the ReleaseSource enum.

type RequestCountScaling

type RequestCountScaling struct {
	// RequestCount Adjusts the number of workers based on active in-flight requests.
	//
	// Examples: 4
	RequestCount int `json:"requestCount"`

	// Type Scaler discriminator. Always `REQUEST_COUNT` for this variant.
	Type RequestCountScalingType `json:"type"`
}

RequestCountScaling Scale on concurrent in-flight requests per worker. Required for load-balancing endpoints; also selectable for queue-based.

type RequestCountScalingType

type RequestCountScalingType string

RequestCountScalingType Scaler discriminator. Always `REQUEST_COUNT` for this variant.

const (
	RequestCountScalingTypeRequestCount RequestCountScalingType = "REQUEST_COUNT"
)

Defines values for RequestCountScalingType.

func (RequestCountScalingType) Valid

func (e RequestCountScalingType) Valid() bool

Valid indicates whether the value is a known member of the RequestCountScalingType enum.

type RolloutSummary

type RolloutSummary struct {
	// InProgress True while any worker is still running an older version.
	//
	// Examples: true
	InProgress bool `json:"inProgress"`

	// PercentOnLatest Percentage of workers on the current version (0 when there are no workers).
	//
	// Examples: 67
	PercentOnLatest int `json:"percentOnLatest"`

	// WorkersOnLatest Workers running the endpoint's current version.
	//
	// Examples: 2
	WorkersOnLatest int `json:"workersOnLatest"`

	// WorkersTotal All workers currently allocated to the endpoint.
	//
	// Examples: 3
	WorkersTotal int `json:"workersTotal"`
}

RolloutSummary defines model for RolloutSummary.

type Secret

type Secret struct {
	// CreatedAt When the secret was created
	CreatedAt time.Time `json:"createdAt"`

	// Description Human-readable description
	//
	// Examples: Hugging Face read token
	Description *string `json:"description,omitempty"`

	// Id Unique secret identifier
	//
	// Examples: 2q9m7x4cavgd
	Id string `json:"id"`

	// Name Unique, human-readable name — the `<name>` referenced by the `RUNPOD_SECRET_<name>` placeholder. Immutable after creation.
	//
	// Examples: hf-token
	Name string `json:"name"`

	// ValueLastUpdatedAt When the secret's value was last set (creation or rotation)
	ValueLastUpdatedAt *time.Time `json:"valueLastUpdatedAt,omitempty"`
}

Secret An account-scoped secret: an encrypted string stored by Runpod, referenced from pod, serverless, and template environment variables with the `{{ RUNPOD_SECRET_<name> }}` placeholder, substituted with the secret's value when the pod or worker boots. The value is write-only and never returned by the API.

type ServerlessBillingAmounts

type ServerlessBillingAmounts struct {
	// CpuAmount Serverless CPU compute cost in USD for the bucket.
	CpuAmount float64 `json:"cpuAmount"`

	// DiskAmount Serverless disk cost in USD for the bucket.
	DiskAmount float64 `json:"diskAmount"`

	// FeeAmount Unused and always 0. Platform charges are included in the GPU and CPU amounts.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	FeeAmount float64 `json:"feeAmount"`

	// GpuAmount Serverless GPU compute cost in USD for the bucket.
	GpuAmount float64 `json:"gpuAmount"`

	// TotalAmount Total serverless cost in USD for the bucket.
	//
	// Examples: 8.9
	TotalAmount float64 `json:"totalAmount"`
}

ServerlessBillingAmounts Serverless cost components, inclusive of platform charges. Backs a record's amounts and the metadata totals.

type ServerlessBillingMetadata

type ServerlessBillingMetadata struct {
	Query ServerlessBillingQuery `json:"query"`

	// RecordCount Number of records returned (buckets times distinct endpoints).
	RecordCount int `json:"recordCount"`

	// Totals Serverless cost components, inclusive of platform charges. Backs a record's amounts and the metadata totals.
	Totals ServerlessBillingAmounts `json:"totals"`

	// UniqueServerlessCount Number of distinct serverless endpoints the records span.
	UniqueServerlessCount int `json:"uniqueServerlessCount"`
}

ServerlessBillingMetadata defines model for ServerlessBillingMetadata.

type ServerlessBillingQuery

type ServerlessBillingQuery struct {
	// BucketSize Length of each billing time bucket.
	//
	// Examples: day
	BucketSize BillingBucketSize `json:"bucketSize"`

	// EndTime End of the range, exclusive (RFC 3339).
	//
	// Examples: 2026-06-02T00:00:00Z
	EndTime time.Time `json:"endTime"`

	// ServerlessId The serverlessId filter applied, if any.
	ServerlessId *string `json:"serverlessId,omitempty"`

	// StartTime Start of the range, inclusive (RFC 3339).
	//
	// Examples: 2026-06-01T00:00:00Z
	StartTime time.Time `json:"startTime"`
}

ServerlessBillingQuery defines model for ServerlessBillingQuery.

type ServerlessBillingRecord

type ServerlessBillingRecord struct {
	// CpuAmount Serverless CPU compute cost in USD for the bucket.
	CpuAmount float64 `json:"cpuAmount"`

	// DiskAmount Serverless disk cost in USD for the bucket.
	DiskAmount float64 `json:"diskAmount"`

	// EndTime End of the range, exclusive (RFC 3339).
	//
	// Examples: 2026-06-02T00:00:00Z
	EndTime time.Time `json:"endTime"`

	// FeeAmount Unused and always 0. Platform charges are included in the GPU and CPU amounts.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	FeeAmount float64 `json:"feeAmount"`

	// GpuAmount Serverless GPU compute cost in USD for the bucket.
	GpuAmount float64 `json:"gpuAmount"`

	// ServerlessId The serverless endpoint this record bills. When the serverlessId filter is set every record carries that id; otherwise one record is emitted per serverless endpoint per bucket.
	//
	//
	// Examples: ep_abc123
	ServerlessId string `json:"serverlessId"`

	// StartTime Start of the range, inclusive (RFC 3339).
	//
	// Examples: 2026-06-01T00:00:00Z
	StartTime time.Time `json:"startTime"`

	// TotalAmount Total serverless cost in USD for the bucket.
	//
	// Examples: 8.9
	TotalAmount float64 `json:"totalAmount"`
}

ServerlessBillingRecord A single time-bucketed serverless billing record. Returned by GET /v2/billing/serverless.

type SshKeys

type SshKeys struct {
	// Keys The account's registered SSH public keys, one authorized_keys-style entry per element (`<type> <base64-key> [comment]`).
	//
	// Examples: ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILXGDN/SclOozk1xsDztpmhGiKkkrfQB9SKoO8dSIQQZ me@example.com"]
	Keys []string `json:"keys"`
}

SshKeys defines model for SshKeys.

type Template

type Template struct {
	// AllowedCudaVersions Acceptable CUDA versions for containers created from this template, as `major.minor`. Empty means any version. Expanded into GPU pod and serverless endpoint creates; CPU pods ignore it.
	//
	// Examples: []
	AllowedCudaVersions []string `json:"allowedCudaVersions"`

	// Args The container's command, as a single raw string. This is the field `entrypoint` and `cmd` encode into, exposed in its stored form.
	//
	// Two shapes are accepted. A bare shell string is treated as CMD and split into arguments, which is what the console's "Container start command" field writes. A JSON object of the form `{"entrypoint":[...],"cmd":[...]}` sets either or both explicitly.
	//
	// Responses always return both representations: `args` exactly as stored, plus the deconstructed `entrypoint` and `cmd`. Supplying `args` together with `entrypoint` or `cmd` is allowed only when they describe the same command, so a read-modify-write client can send back everything it received. Send `""` to clear, omit to leave unchanged.
	//
	//
	// Examples: --model meta-llama/Llama-3-8B --max-model-len 8192, {"entrypoint":["/bin/bash","-c"],"cmd":["python -u main.py"]},
	Args string `json:"args"`

	// Category Controls how the template is grouped and filtered in the Runpod console.
	// It does not affect hardware selection, scheduling, or billing.
	// - `CPU`    — CPU-only workloads
	// - `NVIDIA` — NVIDIA GPU workloads
	// - `AMD`    — AMD GPU workloads
	Category TemplateCategory `json:"category"`

	// Cmd Container CMD in exec form. When the image defines an ENTRYPOINT, this is the argument list passed to it. Encoded into the `args` field; supplying both is allowed only when they describe the same command. Send `[]` to clear, omit to leave unchanged.
	//
	//
	// Examples: ["--model","meta-llama/Llama-3-8B","--max-model-len","8192"]
	Cmd *[]string `json:"cmd,omitempty"`

	// Disk Container disk in GB (ephemeral, wiped on restart)
	//
	// Examples: 50
	Disk int `json:"disk"`

	// Entrypoint Container ENTRYPOINT in exec form, overriding the image's own. Encoded into `args` field; supplying both is allowed only when they describe the same command. Send `[]` to clear, omit to leave unchanged.
	//
	//
	// Examples: ["/bin/bash","-c"]
	Entrypoint *[]string `json:"entrypoint,omitempty"`

	// Env Environment variables as key-value pairs
	//
	// Examples: {"JUPYTER_PASSWORD":"changeme"}
	Env map[string]string `json:"env"`

	// Id Examples: tpl_abc
	Id string `json:"id"`

	// Image Docker image reference
	//
	// Examples: runpod/pytorch:1.0.2-cu1281-torch280-ubuntu2404
	Image string `json:"image"`

	// Mounts Storage mounts attached to a template. Templates support a single
	// persistent mount; any `network` property is rejected with 422.
	//
	// PATCH semantics: omitting `mounts` or sending `{}` leaves the
	// existing mount unchanged.
	Mounts TemplateMounts `json:"mounts"`

	// Name Examples: My PyTorch Template
	Name string `json:"name"`

	// Ports Exposed ports, formatted as port/protocol
	//
	// Examples: ["8888/http","22/tcp"]
	Ports []string `json:"ports"`

	// Public Whether this template is visible to other Runpod users
	//
	// Examples: false
	Public bool `json:"public"`

	// Registry Container registry credential ID (for private images)
	//
	// Examples: null
	Registry *string `json:"registry"`

	// Serverless Whether this template is for serverless workers (true) or pods (false)
	//
	// Examples: false
	Serverless bool `json:"serverless"`

	// StartJupyter Whether containers created from this template start JupyterLab at startup (`JUPYTER_PASSWORD` env injection).
	//
	// Examples: false
	StartJupyter bool `json:"startJupyter"`

	// StartSsh Whether containers created from this template get SSH access provisioned at startup (`PUBLIC_KEY` env injection).
	//
	// Examples: true
	StartSsh bool `json:"startSsh"`
}

Template defines model for Template.

type TemplateCategory

type TemplateCategory string

TemplateCategory Controls how the template is grouped and filtered in the Runpod console. It does not affect hardware selection, scheduling, or billing. - `CPU` — CPU-only workloads - `NVIDIA` — NVIDIA GPU workloads - `AMD` — AMD GPU workloads

const (
	TemplateCategoryAMD    TemplateCategory = "AMD"
	TemplateCategoryCPU    TemplateCategory = "CPU"
	TemplateCategoryNVIDIA TemplateCategory = "NVIDIA"
)

Defines values for TemplateCategory.

func (TemplateCategory) Valid

func (e TemplateCategory) Valid() bool

Valid indicates whether the value is a known member of the TemplateCategory enum.

type TemplateList

type TemplateList struct {
	Templates []Template `json:"templates"`
}

TemplateList A bare list of templates. `GET /v2/catalog/templates` returns it as-is (the catalog is a capped, curated set); `GET /v2/templates` composes it with the pagination block via ListTemplatesResponse.

type TemplateMounts

type TemplateMounts struct {
	// Persistent Host-local persistent storage. Pinned to the pod's host machine — data
	// does not survive a host failure. Disallowed on CPU pods. Mutually
	// exclusive with NetworkMount. Deprecated: prefer NetworkMount for any
	// data you cannot recreate.
	Persistent *PersistentMount `json:"persistent,omitempty"`
}

TemplateMounts Storage mounts attached to a template. Templates support a single persistent mount; any `network` property is rejected with 422.

PATCH semantics: omitting `mounts` or sending `{}` leaves the existing mount unchanged.

type TooManyRequestsError

type TooManyRequestsError = ErrorResponse

TooManyRequestsError defines model for TooManyRequestsError.

type UnauthorizedError

type UnauthorizedError = ErrorResponse

UnauthorizedError defines model for UnauthorizedError.

type UnprocessableEntityError

type UnprocessableEntityError = ErrorResponse

UnprocessableEntityError defines model for UnprocessableEntityError.

type UpdateClusterRequest

type UpdateClusterRequest struct {
	// Name Examples: renamed-cluster
	Name *string `json:"name,omitempty"`
}

UpdateClusterRequest Request body for updating a cluster. Only the cluster name can be changed — this endpoint is a rename. Compute shape, type, and container configuration are fixed at creation.

type UpdateEndpointGpuConfig

type UpdateEndpointGpuConfig struct {
	// AllowedCudaVersions Acceptable CUDA versions for worker placement, as
	// `major.minor`. An explicit `[]` clears the constraint;
	// omitting the field leaves it unchanged. Takes effect as
	// workers are replaced.
	//
	// A non-empty set is mutually exclusive with minCudaVersion (400
	// if both are sent). An explicit `[]` states no constraint, so it
	// may accompany a floor.
	// Setting one does not clear the other — clear it explicitly in
	// the same patch if the endpoint already carries it.
	AllowedCudaVersions *[]string `json:"allowedCudaVersions,omitempty"`

	// Count GPUs per worker
	//
	// Examples: 1
	Count *int `json:"count,omitempty"`

	// ExcludedTypes GPU **type** IDs to subtract from the selected pools — the `id`
	// field of `GET /v2/catalog/gpus`, the same identifiers pods take in
	// `gpu.id`. Workers run on every type in `pools` except these. Omit to
	// use the whole pool.
	//
	// Pools stay the unit of selection; types are the unit of
	// subtraction. There is no inclusive allowlist: a card later added to
	// one of your pools becomes eligible, which is the honest reading of
	// "this pool, minus these".
	//
	// Tied to `pools`, because the two together are one selection:
	// supplying `pools` replaces that selection wholesale, so a `PATCH`
	// sending `pools` **without `excludedTypes`** **clears** them —
	// restate them to keep them. A `PATCH` that omits `pools` leaves both
	// the pools and the exclusions untouched, so changing only a CUDA
	// constraint cannot widen a pinned endpoint.
	//
	// Rejected with 400 if a value is not a GPU type in one of `pools`;
	// upstream accepts unrecognized exclusions silently, so a typo would
	// otherwise produce a filter that does nothing. Surrounding whitespace
	// is trimmed, so `" NVIDIA L40"` and `"NVIDIA L40"` mean the same card.
	//
	//
	// Examples: ["NVIDIA L40"]
	ExcludedTypes *[]string `json:"excludedTypes,omitempty"`

	// MinCudaVersion Lowest acceptable CUDA version for worker placement, as
	// `major.minor`. An explicit `""` clears the floor; omitting the
	// field leaves it unchanged. Takes effect as workers are
	// replaced.
	//
	// Mutually exclusive with a non-empty allowedCudaVersions (400 if
	// both are sent); an explicit `[]` there states no constraint and
	// may accompany this floor.
	//
	//
	// Examples: 12.1
	MinCudaVersion *string `json:"minCudaVersion,omitempty"`

	// Pools Serverless GPU pool IDs (as returned by `GET /v2/catalog/gpus` in
	// `pool`). Workers are placed on whichever listed pool has capacity.
	// Narrow a pool down to specific cards with `excludedTypes`.
	//
	// On `PATCH`, `pools` and `excludedTypes` are one selection and are
	// replaced together, so sending `pools` by itself **clears the
	// exclusions**. Two cases:
	//
	// - **Changing pools, keeping exclusions** — send both fields in one
	//   request: `{"gpu": {"pools": ["ADA_24"], "excludedTypes":
	//   ["NVIDIA L40"]}}`. `GET` the endpoint first to read the current
	//   `excludedTypes` and resend the ones that still apply to the new
	//   pools; an exclusion naming a type outside `pools` is a 400.
	// - **Changing only `count` or a CUDA constraint** — omit `pools`:
	//   `{"gpu": {"minCudaVersion": "12.4"}}`. The pool list and the
	//   exclusions are both left exactly as they are.
	//
	// `excludedTypes` documents the full rule.
	//
	//
	// Examples: ["ADA_24"]
	Pools *[]string `json:"pools,omitempty"`
}

UpdateEndpointGpuConfig Partial GPU update — every field is optional and an omitted one is left unchanged. Unlike create, `pools` is optional, so changing only a CUDA constraint does not require resending the pool list.

`excludedTypes` requires `pools`, because the two are one selection and only a supplied `pools` replaces it — an exclusion on its own would otherwise be silently dropped.

type UpdateEndpointRequest

type UpdateEndpointRequest struct {
	// Args The container's command, as a single raw string. This is the field `entrypoint` and `cmd` encode into, exposed in its stored form.
	//
	// Two shapes are accepted. A bare shell string is treated as CMD and split into arguments, which is what the console's "Container start command" field writes. A JSON object of the form `{"entrypoint":[...],"cmd":[...]}` sets either or both explicitly.
	//
	// Responses always return both representations: `args` exactly as stored, plus the deconstructed `entrypoint` and `cmd`. Supplying `args` together with `entrypoint` or `cmd` is allowed only when they describe the same command, so a read-modify-write client can send back everything it received. Send `""` to clear, omit to leave unchanged.
	//
	//
	// Examples: --model meta-llama/Llama-3-8B --max-model-len 8192, {"entrypoint":["/bin/bash","-c"],"cmd":["python -u main.py"]},
	Args *string `json:"args,omitempty"`

	// Cmd Container CMD in exec form. When the image defines an ENTRYPOINT, this is the argument list passed to it. Encoded into the `args` field; supplying both is allowed only when they describe the same command. Send `[]` to clear, omit to leave unchanged.
	//
	//
	// Examples: ["--model","meta-llama/Llama-3-8B","--max-model-len","8192"]
	Cmd *[]string `json:"cmd,omitempty"`

	// Cpu Complete replacement CPU selection. Valid only for an existing CPU
	// endpoint; endpoint compute family cannot be changed.
	Cpu *[]CreateCpuConfig `json:"cpu,omitempty"`

	// DataCenterIds Preferred data centers for placement. Omit or pass an empty array to let the scheduler choose.
	DataCenterIds *[]string `json:"dataCenterIds,omitempty"`

	// Disk Container disk in GB (ephemeral, wiped on restart)
	//
	// Examples: 50
	Disk *int `json:"disk,omitempty"`

	// Entrypoint Container ENTRYPOINT in exec form, overriding the image's own. Encoded into `args` field; supplying both is allowed only when they describe the same command. Send `[]` to clear, omit to leave unchanged.
	//
	//
	// Examples: ["/bin/bash","-c"]
	Entrypoint *[]string `json:"entrypoint,omitempty"`

	// Env Environment variables as key-value pairs
	//
	// Examples: {"JUPYTER_PASSWORD":"changeme"}
	Env *map[string]string `json:"env,omitempty"`

	// Flashboot FlashBoot cold-start acceleration mode.
	// - `OFF`                — disabled
	// - `FLASHBOOT`          — enabled
	// - `PRIORITY_FLASHBOOT` — enabled with priority capacity
	Flashboot *FlashBoot `json:"flashboot,omitempty"`

	// Gpu Partial GPU update — every field is optional and an omitted one is left
	// unchanged. Unlike create, `pools` is optional, so changing only a CUDA
	// constraint does not require resending the pool list.
	//
	// `excludedTypes` requires `pools`, because the two are one selection and
	// only a supplied `pools` replaces it — an exclusion on its own would
	// otherwise be silently dropped.
	Gpu *UpdateEndpointGpuConfig `json:"gpu,omitempty"`

	// Image Docker image reference
	//
	// Examples: runpod/pytorch:1.0.2-cu1281-torch280-ubuntu2404
	Image          *string   `json:"image,omitempty"`
	Name           *string   `json:"name,omitempty"`
	NetworkVolumes *[]string `json:"networkVolumes,omitempty"`

	// Ports Exposed ports, formatted as port/protocol
	//
	// Examples: ["8888/http","22/tcp"]
	Ports *[]string `json:"ports,omitempty"`

	// Registry Container registry credential ID (for private images)
	//
	// Examples: null
	Registry *string `json:"registry,omitempty"`

	// Scaling Autoscaling signal — a discriminated union on `type`: `QUEUE_DELAY`
	// (queue-based endpoints only) or `REQUEST_COUNT`. The scaler is chosen
	// independently of the endpoint's routing `type` and can be switched on
	// update.
	Scaling *EndpointScaling `json:"scaling,omitempty"`

	// TemplateId ID of a serverless template whose container settings are
	// applied as if they were provided in this PATCH body (image,
	// args, disk, ports, env, registry). Explicit body fields
	// override the template's; `env` merges template and body per
	// key (body wins) and, per PATCH semantics, replaces the
	// endpoint's env. One-time application — no link to the
	// template is retained. Must be one of your templates or a
	// public template (unknown or inaccessible ID → 404); must be
	// a serverless template (→ 422).
	//
	//
	// Examples: 30zmvf89kd
	TemplateId *string          `json:"templateId,omitempty"`
	Timeout    *int             `json:"timeout,omitempty"`
	Workers    *EndpointWorkers `json:"workers,omitempty"`
}

UpdateEndpointRequest defines model for UpdateEndpointRequest.

type UpdateNetworkVolumeRequest

type UpdateNetworkVolumeRequest struct {
	// Name New human-readable name
	//
	// Examples: renamed-volume
	Name *string `json:"name,omitempty"`

	// Size New size in GB. Must be greater than or equal to the current size —
	// network volume storage cannot be reduced.
	//
	//
	// Examples: 100
	Size *int `json:"size,omitempty"`
}

UpdateNetworkVolumeRequest Only the provided fields are updated. At least one field must be present; an empty body is rejected.

type UpdatePodRequest

type UpdatePodRequest struct {
	// Args The container's command, as a single raw string. This is the field `entrypoint` and `cmd` encode into, exposed in its stored form.
	//
	// Two shapes are accepted. A bare shell string is treated as CMD and split into arguments, which is what the console's "Container start command" field writes. A JSON object of the form `{"entrypoint":[...],"cmd":[...]}` sets either or both explicitly.
	//
	// Responses always return both representations: `args` exactly as stored, plus the deconstructed `entrypoint` and `cmd`. Supplying `args` together with `entrypoint` or `cmd` is allowed only when they describe the same command, so a read-modify-write client can send back everything it received. Send `""` to clear, omit to leave unchanged.
	//
	//
	// Examples: --model meta-llama/Llama-3-8B --max-model-len 8192, {"entrypoint":["/bin/bash","-c"],"cmd":["python -u main.py"]},
	Args *string `json:"args,omitempty"`

	// Cmd Container CMD in exec form. When the image defines an ENTRYPOINT, this is the argument list passed to it. Encoded into the `args` field; supplying both is allowed only when they describe the same command. Send `[]` to clear, omit to leave unchanged.
	//
	//
	// Examples: ["--model","meta-llama/Llama-3-8B","--max-model-len","8192"]
	Cmd *[]string `json:"cmd,omitempty"`

	// Disk Container disk in GB (ephemeral, wiped on restart)
	//
	// Examples: 50
	Disk *int `json:"disk,omitempty"`

	// Entrypoint Container ENTRYPOINT in exec form, overriding the image's own. Encoded into `args` field; supplying both is allowed only when they describe the same command. Send `[]` to clear, omit to leave unchanged.
	//
	//
	// Examples: ["/bin/bash","-c"]
	Entrypoint *[]string `json:"entrypoint,omitempty"`

	// Env Environment variables as key-value pairs
	//
	// Examples: {"JUPYTER_PASSWORD":"changeme"}
	Env *map[string]string `json:"env,omitempty"`

	// GlobalNetworking Enable (true) or disable (false) global networking. Takes effect on the next pod start/restart, not live. Requires an NVIDIA GPU and a global-networking-enabled data center. See `GET /v2/catalog/datacenters` (`globalNetwork`) for eligible data centers.
	GlobalNetworking *bool `json:"globalNetworking,omitempty"`

	// Image Docker image reference
	//
	// Examples: runpod/pytorch:1.0.2-cu1281-torch280-ubuntu2404
	Image *string `json:"image,omitempty"`

	// Locked Lock the pod (true) or unlock it (false). Locked pods cannot be stopped or reset.
	Locked *bool `json:"locked,omitempty"`

	// Mounts Storage mounts attached to a pod. At most one of `persistent` or
	// `network` may be set: sending both is rejected with 400. The
	// `network` field is an array for forward compatibility with
	// multi-network-volume support; `maxItems` is 1.
	//
	// PATCH semantics:
	// - Omitting `mounts` or sending `{}` leaves the existing mount
	//   unchanged.
	// - An explicit `network: []` is rejected with 400 (clearing mounts
	//   is not supported).
	// - Mount kind is fixed at create — a PATCH that introduces a kind
	//   not present at create (persistent on a network pod, network on
	//   a persistent pod, or any mount on a previously-mountless pod)
	//   is rejected with 400.
	// - The `volumeId` of a network mount is immutable; a PATCH that
	//   names a different `volumeId` is rejected with 400.
	// - Partial mounts are not supported — every mount entry must
	//   include the full schema (`size` + `path` for persistent,
	//   `volumeId` + `path` for network). Missing required fields → 422.
	Mounts *Mounts `json:"mounts,omitempty"`
	Name   *string `json:"name,omitempty"`

	// Ports Exposed ports, formatted as port/protocol
	//
	// Examples: ["8888/http","22/tcp"]
	Ports *[]string `json:"ports,omitempty"`

	// Registry Container registry credential ID (for private images)
	//
	// Examples: null
	Registry *string `json:"registry,omitempty"`

	// TemplateId ID of a pod template whose container settings are applied as
	// if they were provided in this PATCH body (image, args, disk,
	// ports, env, registry — mounts are not applied on update).
	// Explicit body fields override the template's; `env` merges
	// template and body per key (body wins) and, per PATCH
	// semantics, replaces the pod's env. One-time application —
	// no link to the template is retained. Must be one of your
	// templates or a public template (unknown or inaccessible ID
	// → 404); must not be a serverless template (→ 422).
	//
	//
	// Examples: 30zmvf89kd
	TemplateId *string `json:"templateId,omitempty"`
}

UpdatePodRequest defines model for UpdatePodRequest.

type UpdateSecretRequest

type UpdateSecretRequest struct {
	// Description New human-readable description, at most 65,535 bytes of UTF-8 text. Send `""` to clear.
	Description *string `json:"description,omitempty"`

	// Value New secret value, replacing the current one. Write-only. Must be smaller than 16 MiB of UTF-8 text (strictly under 16,777,216 bytes).
	Value *string `json:"value,omitempty"`
}

UpdateSecretRequest Only the provided fields are updated; at least one field is required. The secret's `name` is immutable.

type UpdateSshKeysRequest

type UpdateSshKeysRequest struct {
	// Keys The full set of SSH public keys to register — this is a complete
	// replacement, not a merge. Each entry is an authorized_keys-style
	// line: `<type> <base64-key> [comment]`, e.g. from
	// `~/.ssh/id_ed25519.pub`. Send `[]` to remove all keys. These keys
	// are provisioned into pods created with `startSsh` and
	// authenticate both SSH paths reported in the pod's `ssh` block.
	//
	//
	// Examples: ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILXGDN/SclOozk1xsDztpmhGiKkkrfQB9SKoO8dSIQQZ me@example.com"]
	Keys []string `json:"keys"`
}

UpdateSshKeysRequest defines model for UpdateSshKeysRequest.

type UpdateTemplateRequest

type UpdateTemplateRequest struct {
	// AllowedCudaVersions Acceptable CUDA versions for pods created from this template. An explicit `[]` clears the constraint; omitting the field leaves it unchanged.
	AllowedCudaVersions *[]string `json:"allowedCudaVersions,omitempty"`

	// Args The container's command, as a single raw string. This is the field `entrypoint` and `cmd` encode into, exposed in its stored form.
	//
	// Two shapes are accepted. A bare shell string is treated as CMD and split into arguments, which is what the console's "Container start command" field writes. A JSON object of the form `{"entrypoint":[...],"cmd":[...]}` sets either or both explicitly.
	//
	// Responses always return both representations: `args` exactly as stored, plus the deconstructed `entrypoint` and `cmd`. Supplying `args` together with `entrypoint` or `cmd` is allowed only when they describe the same command, so a read-modify-write client can send back everything it received. Send `""` to clear, omit to leave unchanged.
	//
	//
	// Examples: --model meta-llama/Llama-3-8B --max-model-len 8192, {"entrypoint":["/bin/bash","-c"],"cmd":["python -u main.py"]},
	Args *string `json:"args,omitempty"`

	// Category Controls how the template is grouped and filtered in the Runpod console.
	// It does not affect hardware selection, scheduling, or billing.
	// - `CPU`    — CPU-only workloads
	// - `NVIDIA` — NVIDIA GPU workloads
	// - `AMD`    — AMD GPU workloads
	Category *TemplateCategory `json:"category,omitempty"`

	// Cmd Container CMD in exec form. When the image defines an ENTRYPOINT, this is the argument list passed to it. Encoded into the `args` field; supplying both is allowed only when they describe the same command. Send `[]` to clear, omit to leave unchanged.
	//
	//
	// Examples: ["--model","meta-llama/Llama-3-8B","--max-model-len","8192"]
	Cmd *[]string `json:"cmd,omitempty"`

	// Disk Container disk in GB (ephemeral, wiped on restart)
	//
	// Examples: 50
	Disk *int `json:"disk,omitempty"`

	// Entrypoint Container ENTRYPOINT in exec form, overriding the image's own. Encoded into `args` field; supplying both is allowed only when they describe the same command. Send `[]` to clear, omit to leave unchanged.
	//
	//
	// Examples: ["/bin/bash","-c"]
	Entrypoint *[]string `json:"entrypoint,omitempty"`

	// Env Environment variables as key-value pairs
	//
	// Examples: {"JUPYTER_PASSWORD":"changeme"}
	Env *map[string]string `json:"env,omitempty"`

	// Image Docker image reference
	//
	// Examples: runpod/pytorch:1.0.2-cu1281-torch280-ubuntu2404
	Image *string `json:"image,omitempty"`

	// Mounts Storage mounts attached to a template. Templates support a single
	// persistent mount; any `network` property is rejected with 422.
	//
	// PATCH semantics: omitting `mounts` or sending `{}` leaves the
	// existing mount unchanged.
	Mounts *TemplateMounts `json:"mounts,omitempty"`
	Name   *string         `json:"name,omitempty"`

	// Ports Exposed ports, formatted as port/protocol
	//
	// Examples: ["8888/http","22/tcp"]
	Ports  *[]string `json:"ports,omitempty"`
	Public *bool     `json:"public,omitempty"`

	// Registry Container registry credential ID (for private images)
	//
	// Examples: null
	Registry   *string `json:"registry,omitempty"`
	Serverless *bool   `json:"serverless,omitempty"`

	// StartJupyter Start JupyterLab at container startup (`JUPYTER_PASSWORD` env injection). See the create-time field for details.
	StartJupyter *bool `json:"startJupyter,omitempty"`

	// StartSsh Provision SSH access at container startup (`PUBLIC_KEY` env injection). See the create-time field for details.
	StartSsh *bool `json:"startSsh,omitempty"`
}

UpdateTemplateRequest defines model for UpdateTemplateRequest.

type Utilization

type Utilization struct {
	// Util Examples: 45
	Util *int `json:"util,omitempty"`
}

Utilization Single-value utilization percentage (0–100). Shared by `cpu` and `memory`.

type VolumeType

type VolumeType string

VolumeType Data center network volume storage type.

const (
	VolumeTypeHighPerformance VolumeType = "HIGH_PERFORMANCE"
	VolumeTypeStandard        VolumeType = "STANDARD"
)

Defines values for VolumeType.

func (VolumeType) Valid

func (e VolumeType) Valid() bool

Valid indicates whether the value is a known member of the VolumeType enum.

type Worker

type Worker struct {
	// DataCenterId Data center the worker is placed in. Null until the worker is placed.
	//
	// Examples: US-TX-3
	DataCenterId *string `json:"dataCenterId,omitempty"`

	// GpuCount GPUs allocated to the worker.
	//
	// Examples: 1
	GpuCount int `json:"gpuCount"`

	// GpuTypeId GPU type the worker is placed on. Null until the worker is placed.
	//
	// Examples: NVIDIA RTX 4090
	GpuTypeId *string `json:"gpuTypeId,omitempty"`

	// Id Examples: worker_abc
	Id string `json:"id"`

	// Image Container image the worker is running.
	//
	// Examples: my-org/sdxl-worker:latest
	Image *string `json:"image,omitempty"`

	// IsStale True when the worker is running an older endpoint configuration than
	// the current one (e.g. mid rolling-update). This is the authoritative
	// flag: it is derived from `version` vs the response's `endpointVersion`,
	// except on legacy endpoints (`endpointVersion` 1) where it falls back
	// to a container-image comparison.
	//
	//
	// Examples: false
	IsStale bool `json:"isStale"`

	// StartedAt When the worker last started. Null if it has not started.
	//
	// Examples: 2026-03-26T00:00:00Z
	StartedAt *time.Time `json:"startedAt,omitempty"`

	// Status Derived worker state, reconciled from the worker pod's lifecycle status
	// and the live job-queue view.
	// - `RUNNING`      — actively processing a job
	// - `IDLE`         — ready and polling for jobs
	// - `INITIALIZING` — starting up, not yet ready
	// - `THROTTLED`    — waiting on compute capacity
	// - `UNHEALTHY`    — failing health checks
	Status WorkerStatus `json:"status"`

	// UptimeSeconds Seconds the worker has been running. Null until the worker is placed and running.
	//
	// Examples: 3600
	UptimeSeconds *int `json:"uptimeSeconds,omitempty"`

	// Version Endpoint configuration version this worker is running. Compare with
	// the response's `endpointVersion`. Null if unknown.
	//
	//
	// Examples: 4
	Version *int `json:"version,omitempty"`
}

Worker defines model for Worker.

type WorkerStatus

type WorkerStatus string

WorkerStatus Derived worker state, reconciled from the worker pod's lifecycle status and the live job-queue view. - `RUNNING` — actively processing a job - `IDLE` — ready and polling for jobs - `INITIALIZING` — starting up, not yet ready - `THROTTLED` — waiting on compute capacity - `UNHEALTHY` — failing health checks

const (
	WorkerStatusIdle         WorkerStatus = "IDLE"
	WorkerStatusInitializing WorkerStatus = "INITIALIZING"
	WorkerStatusRunning      WorkerStatus = "RUNNING"
	WorkerStatusThrottled    WorkerStatus = "THROTTLED"
	WorkerStatusUnhealthy    WorkerStatus = "UNHEALTHY"
)

Defines values for WorkerStatus.

func (WorkerStatus) Valid

func (e WorkerStatus) Valid() bool

Valid indicates whether the value is a known member of the WorkerStatus enum.

type WorkerSummary

type WorkerSummary struct {
	// Idle Ready workers polling for jobs.
	//
	// Examples: 1
	Idle int `json:"idle"`

	// Initializing Workers starting up, not yet ready.
	//
	// Examples: 0
	Initializing int `json:"initializing"`

	// Running Workers actively processing a job.
	//
	// Examples: 2
	Running int `json:"running"`

	// Throttled Workers waiting on compute capacity.
	//
	// Examples: 0
	Throttled int `json:"throttled"`

	// Total All workers currently allocated to the endpoint.
	//
	// Examples: 3
	Total int `json:"total"`

	// Unhealthy Workers failing health checks.
	//
	// Examples: 0
	Unhealthy int `json:"unhealthy"`
}

WorkerSummary Histogram of the returned workers by status. The per-status counts are a roll-up of the `workers` array, so `running + idle + initializing + throttled + unhealthy == total == len(workers)`.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL