types

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 5 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 Account added in v2.2.0

type Account struct {
	// Email Email of the same account. Null when the account has no email on file.
	//
	// Examples: dev@example.com
	Email *string `json:"email"`

	// Id Account ID. For a request that acts for a team (a key created inside the team, or `X-Team-Id`) this is the team owner's account. For an organization member it is the member's own account; see `GET /v2/organization` for the organization.
	//
	// Examples: user_2abc123
	Id string `json:"id"`
}

Account The account the API key belongs to.

type AuditLog added in v2.1.0

type AuditLog struct {
	// Action Name of the action, as recorded at write time. Not an enum: values are free-form, mostly lower case verbs, and new actions appear without an API version change. Current writers record values such as `create`, `update`, `delete`, `rename`, `lock`, `unlock`, `start`, `reset`, `add` and `setBillingMode`.
	//
	// Examples: create, delete, rename
	Action string `json:"action"`

	// ActorId ID of the user who performed the action. Null when the action was not attributable to a user.
	//
	// Examples: user_id_abc_123
	ActorId *string `json:"actorId"`

	// Email Email of the actor when the action was recorded. Null when unknown.
	//
	// Examples: actor@example.com
	Email *string `json:"email"`

	// ResourceId ID of the affected resource. Empty when the action was not about one resource; a bulk action lists every affected ID, comma-separated.
	//
	// Examples: abc123
	ResourceId string `json:"resourceId"`

	// ResourceType Kind of resource the action applied to, as recorded at write time. Not an enum: values are free-form, mostly lower camel case, and new kinds appear without an API version change. Current writers record values such as `pod`, `apiKey`, `sharedApiKey`, `secret`, `costCenter`, `paymentMethod`, `billingAccount`, `registryCredential`, `organization` and `group`, and `unknown` when the writer recorded no kind.
	//
	// Examples: pod, apiKey, costCenter
	ResourceType string `json:"resourceType"`

	// Timestamp When the action happened (UTC, whole seconds).
	//
	// Examples: 2026-09-02T00:00:00Z
	Timestamp time.Time `json:"timestamp"`

	// Value Details of the change as a JSON-encoded string. The structure varies by action; parse it as JSON for a structured view. A bulk action split across several entries adds an `auditChunk` object with `index` and `of`. Null when the action recorded no details.
	//
	// Examples: {"status":"TERMINATED"}, {"name":"training-run-7"}, {"id":"sec_789","name":"HF_TOKEN","sharedWithOrganization":true}
	Value *string `json:"value"`
}

AuditLog One recorded action on the account.

type AuditLogActionsFilter added in v2.1.0

type AuditLogActionsFilter = []string

AuditLogActionsFilter defines model for AuditLogActionsFilter.

type AuditLogActorIdsFilter added in v2.1.0

type AuditLogActorIdsFilter = []string

AuditLogActorIdsFilter defines model for AuditLogActorIdsFilter.

type AuditLogEndTime added in v2.1.0

type AuditLogEndTime = time.Time

AuditLogEndTime defines model for AuditLogEndTime.

type AuditLogSearch added in v2.1.0

type AuditLogSearch = string

AuditLogSearch defines model for AuditLogSearch.

type AuditLogStartTime added in v2.1.0

type AuditLogStartTime = time.Time

AuditLogStartTime defines model for AuditLogStartTime.

type AuthenticationAttempt added in v2.2.0

type AuthenticationAttempt struct {
	// AttemptId Identifies the attempt in verify and resend.
	//
	// Examples: att_3kq9x81mzp
	AttemptId string `json:"attemptId"`

	// ExpiresAt When the attempt stops accepting codes. Resending does not extend it.
	//
	// Examples: 2026-10-16T18:10:00Z
	ExpiresAt time.Time `json:"expiresAt"`

	// ResendAfter Earliest time a resend is accepted.
	//
	// Examples: 2026-10-16T18:00:30Z
	ResendAfter time.Time `json:"resendAfter"`
}

AuthenticationAttempt defines model for AuthenticationAttempt.

type AuthenticationAttemptResult added in v2.2.0

type AuthenticationAttemptResult struct {
	Credential struct {
		// ApiKey The raw API key. It is returned once, so store it before doing anything else.
		//
		// Examples: rpa_EXAMPLEONLYEXAMPLEONLYEXAMPLEONLY
		ApiKey string `json:"apiKey"`

		// Id Identifies the key in the console, where it can be revoked.
		//
		// Examples: key_7Rk2m0pq
		Id string `json:"id"`
	} `json:"credential"`

	// UserId Examples: user_2abc9xyz
	UserId string `json:"userId"`
}

AuthenticationAttemptResult defines model for AuthenticationAttemptResult.

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. ContainerConfig composes it and adds `registry`; resources compose ContainerConfig.

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`,
	// so a typo cannot 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 BaseMounts added in v2.1.0

type BaseMounts 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"`
}

BaseMounts Shared base type for all resources that mount storage volumes. `persistent` and `network` cannot both be set (rejected with 400). Each resource that uses this type sets its own limit on network volumes.

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 BuiltinOrganizationRole added in v2.2.0

type BuiltinOrganizationRole struct {
	// Capabilities What the role grants, as `FAMILY:VERB` capabilities, sorted. A member's effective access can also include account-level access that no role grants.
	//
	// Examples: ["POD:CREATE","POD:VIEW"]
	Capabilities OrganizationRoleCapabilities `json:"capabilities"`

	// Id Role ID, `builtin:` followed by the role's key.
	//
	// Examples: builtin:dev
	Id string `json:"id"`

	// Name Display name.
	//
	// Examples: Developer
	Name string `json:"name"`

	// Type Always `builtin` for this variant.
	Type BuiltinOrganizationRoleType `json:"type"`
}

BuiltinOrganizationRole A role Runpod defines. Built-in roles cannot be changed.

type BuiltinOrganizationRoleType added in v2.2.0

type BuiltinOrganizationRoleType string

BuiltinOrganizationRoleType Always `builtin` for this variant.

const (
	BuiltinOrganizationRoleTypeBuiltin BuiltinOrganizationRoleType = "builtin"
)

Defines values for BuiltinOrganizationRoleType.

func (BuiltinOrganizationRoleType) Valid added in v2.2.0

Valid indicates whether the value is a known member of the BuiltinOrganizationRoleType 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"`

	// CostCenter Cost center this resource's spend is attributed to. Absent when the resource is not attributed to a cost center, or when the caller lacks permission to view cost centers. Managed through `/v2/cost-centers`.
	CostCenter *ResourceCostCenter `json:"costCenter,omitempty"`

	// 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"`

	// Tags The tags on this resource that are visible to the caller. Keys and values are returned exactly as stored. Tags under the reserved `runpod:` prefix, such as the cost center, are never listed here. Absent when the resource's tags are unavailable to the caller; an empty array means none are visible.
	Tags *ResourceTags `json:"tags,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); values beyond it are rejected.
	//
	// 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 ClusterMounts added in v2.1.0

type ClusterMounts = BaseMounts

ClusterMounts Storage mounts for a cluster create: `persistent` or one `network` volume, not both. Clusters cannot mount global volumes, so `global` is rejected with 422. A mount `path` must not be empty (rejected with 422): an empty path reads as unset and would mount the volume at the template's path, or `/workspace` without a template.

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 CodeVerifier added in v2.2.0

type CodeVerifier = string

CodeVerifier The random secret whose SHA-256 hash was sent as `codeChallenge`.

Examples: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk

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 a private image: one of
	// your credentials from `/v2/registries`. Leave it unset for a
	// private Amazon ECR image. Runpod pulls those with an ECR
	// delegation (`/v2/registries/delegations`) matched to the
	// image's account, region and repository at pull time, so there
	// is no delegation ID to pass here (a delegation ID is not a
	// credential ID). A credential set here is used instead of any
	// delegation.
	//
	//
	// Examples: null
	Registry *string `json:"registry,omitempty"`
}

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

type CostCenter added in v2.2.0

type CostCenter struct {
	// Id Examples: clz1x9k4a0000qw3h8s7d2f1g
	Id string `json:"id"`

	// Value Cost center name exactly as stored, so it matches billing breakdowns.
	//
	// Examples: team-ml
	Value string `json:"value"`
}

CostCenter defines model for CostCenter.

type CostCenterResource added in v2.2.0

type CostCenterResource struct {
	// Id Examples: p9k2m4n6q8
	Id string `json:"id"`

	// Type Kind of resource a cost center or tag can be attached to.
	Type ResourceType `json:"type"`
}

CostCenterResource defines model for CostCenterResource.

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 CreateAuthenticationAttemptRequest added in v2.2.0

type CreateAuthenticationAttemptRequest struct {
	// CodeChallenge Unpadded base64url SHA-256 hash of a random `codeVerifier` the caller keeps private. Verify and resend require the matching verifier.
	//
	// Examples: E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
	CodeChallenge string `json:"codeChallenge"`

	// Email Address to send the verification code to. It may belong to an existing account or a new one.
	//
	// Examples: owner@example.com
	Email openapi_types.Email `json:"email"`

	// KeyName Name of the API key issued when verification succeeds.
	//
	// Examples: laptop-cli
	KeyName string `json:"keyName"`
}

CreateAuthenticationAttemptRequest defines model for CreateAuthenticationAttemptRequest.

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 for a cluster create: `persistent` or one `network`
	// volume, not both. Clusters cannot mount global volumes, so `global`
	// is rejected with 422. A mount `path` must not be empty (rejected with 422): an
	// empty path reads as unset and would mount the volume at the
	// template's path, or `/workspace` without a template.
	Mounts *ClusterMounts `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"`

	// Registry Container registry credential ID for a private image: one of
	// your credentials from `/v2/registries`. Leave it unset for a
	// private Amazon ECR image. Runpod pulls those with an ECR
	// delegation (`/v2/registries/delegations`) matched to the
	// image's account, region and repository at pull time, so there
	// is no delegation ID to pass here (a delegation ID is not a
	// credential ID). A credential set here is used instead of any
	// delegation.
	//
	//
	// Examples: null
	Registry *string `json:"registry,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. Mutually exclusive with `image`, `args`, `entrypoint`,
	// `cmd`, `disk`, `env`, and `ports` (rejected with 400). `registry`
	// combines with it: an explicit `registry` overrides the
	// template's credential; omit it (or send `null` or an empty
	// string) to use the template's. `mounts`
	// combines with it too: the volume in `mounts` is attached to
	// every member pod, overriding the template's volume settings. 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 CreateCostCenterRequest added in v2.2.0

type CreateCostCenterRequest struct {
	// Resources Resources to attribute to the new cost center.
	Resources *[]CostCenterResource `json:"resources,omitempty"`

	// Value Leading and trailing whitespace is trimmed.
	//
	// Examples: team-ml
	Value string `json:"value"`
}

CreateCostCenterRequest defines model for CreateCostCenterRequest.

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`,
	// so a typo cannot 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"`

	// Mounts Volumes to mount on the endpoint's workers. A `network` or `global`
	// list that is present replaces the endpoint's current list of that kind;
	// an empty list detaches it, and an omitted list is left unchanged. Both
	// kinds cannot be present on the endpoint at once, so to switch kinds send
	// `[]` for one and the new list for the other in the same request. Changes
	// apply to workers created afterwards. At most one global volume, GPU
	// endpoints only. `network` may accompany the deprecated `networkVolumes` field
	// only if the two agree exactly.
	Mounts *EndpointMountsInput `json:"mounts,omitempty"`

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

	// NetworkVolumes Network volume IDs.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	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 a private image: one of
	// your credentials from `/v2/registries`. Leave it unset for a
	// private Amazon ECR image. Runpod pulls those with an ECR
	// delegation (`/v2/registries/delegations`) matched to the
	// image's account, region and repository at pull time, so there
	// is no delegation ID to pass here (a delegation ID is not a
	// credential ID). A credential set here is used instead of any
	// delegation.
	//
	//
	// 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 CreateGlobalVolumeRequest added in v2.1.0

type CreateGlobalVolumeRequest struct {
	// Name Human-readable name, 1–191 characters with at least one non-whitespace character. Leading and trailing whitespace is trimmed.
	//
	//
	// Examples: training-data
	Name string `json:"name"`
}

CreateGlobalVolumeRequest defines model for CreateGlobalVolumeRequest.

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 CreateOrganizationGroupRequest added in v2.2.0

type CreateOrganizationGroupRequest struct {
	// Name Group name with at least one non-whitespace character; surrounding whitespace is trimmed.
	//
	// Examples: Engineering
	Name string `json:"name"`
}

CreateOrganizationGroupRequest defines model for CreateOrganizationGroupRequest.

type CreateOrganizationInviteRequest added in v2.2.0

type CreateOrganizationInviteRequest struct {
	// Email Address to invite, stored lowercased. The invitee accepts by signing in with a verified account on this address.
	//
	// Examples: new-member@example.com
	Email openapi_types.Email `json:"email"`

	// Role An organization role to assign, by ID.
	Role OrganizationRoleInput `json:"role"`
}

CreateOrganizationInviteRequest defines model for CreateOrganizationInviteRequest.

type CreateOrganizationRoleRequest added in v2.2.0

type CreateOrganizationRoleRequest struct {
	// Capabilities What the role grants, as `FAMILY:VERB` capabilities from `GET /v2/organization/roles/capabilities`. The caller must hold every capability it lists.
	//
	// Examples: ["POD:VIEW"]
	Capabilities OrganizationRoleCapabilitiesInput `json:"capabilities"`

	// Name Display name, 1–191 characters with at least one non-whitespace character. Leading and trailing whitespace is trimmed. It must be unique within the organization and cannot be a built-in role's name.
	//
	// Examples: Pod viewer
	Name OrganizationRoleName `json:"name"`
}

CreateOrganizationRoleRequest defines model for CreateOrganizationRoleRequest.

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. `persistent` (the volume disk) is
	// mutually exclusive with both `network` and `global`: combining them is
	// rejected with 400. A pod takes up to 4 network volumes
	// and 1 global volume. Every network volume must be in the pod's data
	// center, each volume may be listed once, and mount paths must not
	// overlap; a request that breaks one of these is rejected. To change a
	// pod's mounts after creation, see `UpdatePodMounts`.
	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"`

	// Queue Queue the pod for deploy-when-available instead of failing when the
	// requested GPU has no capacity. The create call still tries to deploy
	// first; only a capacity failure queues the request, and any other
	// failure is returned as it would be without `queue`. A queued pod is
	// placed by a scheduler that retries about every five minutes, in plan
	// priority order, during `allowedHours`, until `expiresAt`. An empty
	// object queues with the defaults.
	//
	// GPU pods on the secure cloud only: `queue` with `cpu` or
	// `globalNetworking` is rejected with `400`. A plan without
	// deploy-when-available is refused with `403`, and one whose queue is
	// full with `409`. A request that matches a pod still queued (same GPU
	// type and count, same settings) returns that queued pod rather than a
	// second one.
	Queue *PodQueueOptions `json:"queue,omitempty"`

	// Registry Container registry credential ID for a private image: one of
	// your credentials from `/v2/registries`. Leave it unset for a
	// private Amazon ECR image. Runpod pulls those with an ECR
	// delegation (`/v2/registries/delegations`) matched to the
	// image's account, region and repository at pull time, so there
	// is no delegation ID to pass here (a delegation ID is not a
	// credential ID). A credential set here is used instead of any
	// delegation.
	//
	//
	// 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 a private image: one of
	// your credentials from `/v2/registries`. Leave it unset for a
	// private Amazon ECR image. Runpod pulls those with an ECR
	// delegation (`/v2/registries/delegations`) matched to the
	// image's account, region and repository at pull time, so there
	// is no delegation ID to pass here (a delegation ID is not a
	// credential ID). A credential set here is used instead of any
	// delegation.
	//
	//
	// 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 CustomOrganizationRole added in v2.2.0

type CustomOrganizationRole struct {
	// Capabilities What the role grants, as `FAMILY:VERB` capabilities, sorted. A member's effective access can also include account-level access that no role grants.
	//
	// Examples: ["POD:CREATE","POD:VIEW"]
	Capabilities OrganizationRoleCapabilities `json:"capabilities"`

	// CreatedAt When the role was created.
	//
	// Examples: 2026-10-01T09:00:00Z
	CreatedAt time.Time `json:"createdAt"`

	// Id Role ID.
	//
	// Examples: cmcustomrole0001
	Id string `json:"id"`

	// Name Display name, unique within the organization.
	//
	// Examples: Pod viewer
	Name string `json:"name"`

	// Type Always `custom` for this variant.
	Type CustomOrganizationRoleType `json:"type"`

	// UpdatedAt When the role last changed. Assigning the role to a member or invite can also move it.
	//
	// Examples: 2026-10-02T09:00:00Z
	UpdatedAt time.Time `json:"updatedAt"`
}

CustomOrganizationRole A role the caller's organization defined.

type CustomOrganizationRoleType added in v2.2.0

type CustomOrganizationRoleType string

CustomOrganizationRoleType Always `custom` for this variant.

const (
	CustomOrganizationRoleTypeCustom CustomOrganizationRoleType = "custom"
)

Defines values for CustomOrganizationRoleType.

func (CustomOrganizationRoleType) Valid added in v2.2.0

func (e CustomOrganizationRoleType) Valid() bool

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

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"`

	// CostCenter Cost center this resource's spend is attributed to. Absent when the resource is not attributed to a cost center, or when the caller lacks permission to view cost centers. Managed through `/v2/cost-centers`.
	CostCenter *ResourceCostCenter `json:"costCenter,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"`

	// Mounts Volumes mounted on every worker of the endpoint.
	Mounts EndpointMounts `json:"mounts"`

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

	// NetworkVolumes Examples: ["vol_abc"]
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	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 a private image: one of
	// your credentials from `/v2/registries`. Leave it unset for a
	// private Amazon ECR image. Runpod pulls those with an ECR
	// delegation (`/v2/registries/delegations`) matched to the
	// image's account, region and repository at pull time, so there
	// is no delegation ID to pass here (a delegation ID is not a
	// credential ID). A credential set here is used instead of any
	// delegation.
	//
	//
	// 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"`

	// Tags The tags on this resource that are visible to the caller. Keys and values are returned exactly as stored. Tags under the reserved `runpod:` prefix, such as the cost center, are never listed here. Absent when the resource's tags are unavailable to the caller; an empty array means none are visible.
	Tags *ResourceTags `json:"tags,omitempty"`

	// 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 EndpointColdStartMetric added in v2.2.0

type EndpointColdStartMetric struct {
	Count int `json:"count"`

	// DurationMs Millisecond statistics over one bucket.
	DurationMs EndpointDurationStats `json:"durationMs"`

	// Time Bucket start (UTC).
	Time time.Time `json:"time"`
}

EndpointColdStartMetric defines model for EndpointColdStartMetric.

type EndpointColdStartMetricsResponse added in v2.2.0

type EndpointColdStartMetricsResponse struct {
	// EndTime Resolved window end (after defaults and the clamp to now).
	EndTime time.Time `json:"endTime"`

	// Interval Bucket size for endpoint metrics.
	Interval EndpointMetricsInterval `json:"interval"`

	// 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"`

	// Records This page's buckets, oldest first.
	Records []EndpointColdStartMetric `json:"records"`

	// StartTime Resolved window start (after defaults).
	StartTime time.Time `json:"startTime"`
}

EndpointColdStartMetricsResponse Cold start counts and durations per bucket for the resolved window. `records` contains only buckets with activity. Buckets with no activity are omitted, not zero-filled, so `records` can be shorter than the number of buckets in the window, or empty. Results are paged: see `pagination`.

type EndpointDurationStats added in v2.2.0

type EndpointDurationStats struct {
	Max int `json:"max"`
	Min int `json:"min"`
	P70 int `json:"p70"`
	P90 int `json:"p90"`
	P95 int `json:"p95"`
	P98 int `json:"p98"`

	// Total Sum over every request (or cold start) in the bucket.
	Total float64 `json:"total"`
}

EndpointDurationStats Millisecond statistics over one bucket.

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`,
	// so a typo cannot 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 EndpointMetricsInterval added in v2.2.0

type EndpointMetricsInterval string

EndpointMetricsInterval Bucket size for endpoint metrics.

const (
	EndpointMetricsInterval12Hours   EndpointMetricsInterval = "12h"
	EndpointMetricsInterval15Minutes EndpointMetricsInterval = "15m"
	EndpointMetricsInterval1Day      EndpointMetricsInterval = "1d"
	EndpointMetricsInterval1Hour     EndpointMetricsInterval = "1h"
	EndpointMetricsInterval1Minute   EndpointMetricsInterval = "1m"
	EndpointMetricsInterval30Minutes EndpointMetricsInterval = "30m"
	EndpointMetricsInterval5Minutes  EndpointMetricsInterval = "5m"
	EndpointMetricsInterval6Hours    EndpointMetricsInterval = "6h"
)

Defines values for EndpointMetricsInterval.

func (EndpointMetricsInterval) Valid added in v2.2.0

func (e EndpointMetricsInterval) Valid() bool

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

type EndpointMount added in v2.1.0

type EndpointMount struct {
	// VolumeId ID of a NetworkVolume (under `network`) or GlobalVolume (under `global`).
	//
	// Examples: vol_abc
	VolumeId string `json:"volumeId"`
}

EndpointMount A volume mounted on every worker, always at `/runpod-volume`. Custom paths are not supported yet.

type EndpointMounts added in v2.1.0

type EndpointMounts struct {
	Global  []EndpointMount `json:"global"`
	Network []EndpointMount `json:"network"`
}

EndpointMounts Volumes mounted on every worker of the endpoint.

type EndpointMountsInput added in v2.1.0

type EndpointMountsInput struct {
	Global *[]EndpointMount `json:"global,omitempty"`

	// Network Network volumes, at most one per data center.
	Network *[]EndpointMount `json:"network,omitempty"`
}

EndpointMountsInput Volumes to mount on the endpoint's workers. A `network` or `global` list that is present replaces the endpoint's current list of that kind; an empty list detaches it, and an omitted list is left unchanged. Both kinds cannot be present on the endpoint at once, so to switch kinds send `[]` for one and the new list for the other in the same request. Changes apply to workers created afterwards. At most one global volume, GPU endpoints only. `network` may accompany the deprecated `networkVolumes` field only if the two agree exactly.

type EndpointRequestMetric added in v2.2.0

type EndpointRequestMetric struct {
	Completed int `json:"completed"`

	// DelayTimeMs Millisecond statistics over one bucket.
	DelayTimeMs EndpointDurationStats `json:"delayTimeMs"`

	// ExecutionTimeMs Millisecond statistics over one bucket.
	ExecutionTimeMs EndpointDurationStats `json:"executionTimeMs"`
	Failed          int                   `json:"failed"`

	// Requests Requests that finished in this bucket.
	Requests int `json:"requests"`
	Retries  int `json:"retries"`

	// Time Bucket start (UTC).
	Time time.Time `json:"time"`
}

EndpointRequestMetric defines model for EndpointRequestMetric.

type EndpointRequestMetricsResponse added in v2.2.0

type EndpointRequestMetricsResponse struct {
	// EndTime Resolved window end (after defaults and the clamp to now).
	EndTime time.Time `json:"endTime"`

	// Interval Bucket size for endpoint metrics.
	Interval EndpointMetricsInterval `json:"interval"`

	// 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"`

	// Records This page's buckets, oldest first.
	Records []EndpointRequestMetric `json:"records"`

	// StartTime Resolved window start (after defaults).
	StartTime time.Time `json:"startTime"`
}

EndpointRequestMetricsResponse Request counts and durations per bucket for the resolved window. `records` contains only buckets with activity. Buckets with no activity are omitted, not zero-filled, so `records` can be shorter than the number of buckets in the window, or empty. Results are paged: see `pagination`.

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 EndpointWorkerMetric added in v2.2.0

type EndpointWorkerMetric struct {
	Idle         int `json:"idle"`
	Initializing int `json:"initializing"`
	Running      int `json:"running"`
	Throttled    int `json:"throttled"`

	// Time Bucket start (UTC).
	Time      time.Time `json:"time"`
	Unhealthy int       `json:"unhealthy"`
}

EndpointWorkerMetric defines model for EndpointWorkerMetric.

type EndpointWorkerMetricsResponse added in v2.2.0

type EndpointWorkerMetricsResponse struct {
	// EndTime Resolved window end (after defaults and the clamp to now).
	EndTime time.Time `json:"endTime"`

	// Interval Bucket size for endpoint metrics.
	Interval EndpointMetricsInterval `json:"interval"`

	// 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"`

	// Records This page's buckets, oldest first.
	Records []EndpointWorkerMetric `json:"records"`

	// StartTime Resolved window start (after defaults).
	StartTime time.Time `json:"startTime"`
}

EndpointWorkerMetricsResponse Worker counts by state per bucket for the resolved window. `records` contains only buckets with activity. Buckets with no activity are omitted, not zero-filled, so `records` can be shorter than the number of buckets in the window, or empty. Results are paged: see `pagination`.

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 GlobalMount added in v2.1.0

type GlobalMount struct {
	// Path Mount path inside the container. Optional; a default is chosen for you when omitted.
	//
	// Examples: /data
	Path *string `json:"path,omitempty"`

	// VolumeId ID of an existing GlobalVolume.
	//
	// Examples: gsb_abc
	VolumeId string `json:"volumeId"`
}

GlobalMount Reference to a GlobalVolume. Usage-billed, so it has no size. On a pod, the volume can be mounted, moved, or unmounted after creation (see `UpdatePodMounts`).

type GlobalMountPatch added in v2.2.0

type GlobalMountPatch struct {
	// Path Mount path inside the container. Optional; when mounting, a default is chosen for you if omitted.
	//
	// Examples: /data
	Path *string `json:"path,omitempty"`

	// Remove Unmount the volume. Cannot be combined with `path`.
	Remove *bool `json:"remove,omitempty"`

	// VolumeId ID of an existing GlobalVolume.
	//
	// Examples: gsb_abc
	VolumeId string `json:"volumeId"`
}

GlobalMountPatch Mounts, moves, or unmounts the pod's global volume.

type GlobalVolume added in v2.1.0

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

	// CreatedByUserId ID of the user who created the volume, if known
	//
	// Examples: user_123
	CreatedByUserId *string `json:"createdByUserId"`

	// Id Unique global volume identifier
	//
	// Examples: gsb_abc
	Id string `json:"id"`

	// Name Human-readable name (not required to be unique)
	//
	// Examples: training-data
	Name string `json:"name"`
}

GlobalVolume defines model for GlobalVolume.

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"`

	// MinRam Minimum total system RAM in GB reported across matching machines
	// for the requested `count` and availability filters. This is host
	// RAM, not the GPU VRAM reported in `memory`. Present only with
	// include=AVAILABILITY and omitted when `availability` is `NONE`.
	//
	//
	// Examples: 32
	MinRam *int `json:"minRam,omitempty"`

	// MinVcpuCount Minimum total vCPU count reported across matching machines for the
	// requested `count` and availability filters. Present only with
	// include=AVAILABILITY and omitted when `availability` is `NONE`.
	//
	//
	// Examples: 8
	MinVcpuCount *int `json:"minVcpuCount,omitempty"`

	// 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 ListAuditLogsResponse added in v2.1.0

type ListAuditLogsResponse struct {
	AuditLogs []AuditLog `json:"auditLogs"`

	// 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"`
}

ListAuditLogsResponse defines model for ListAuditLogsResponse.

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"`

	// 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"`
}

ListClustersResponse defines model for ListClustersResponse.

type ListCostCenterResourcesResponse added in v2.2.0

type ListCostCenterResourcesResponse 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"`
	Resources  []CostCenterResource `json:"resources"`
}

ListCostCenterResourcesResponse defines model for ListCostCenterResourcesResponse.

type ListCostCentersResponse added in v2.2.0

type ListCostCentersResponse struct {
	CostCenters []CostCenter `json:"costCenters"`

	// 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"`
}

ListCostCentersResponse defines model for ListCostCentersResponse.

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 ListGlobalVolumesResponse added in v2.1.0

type ListGlobalVolumesResponse struct {
	GlobalVolumes []GlobalVolume `json:"globalVolumes"`

	// 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"`
}

ListGlobalVolumesResponse defines model for ListGlobalVolumesResponse.

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"`

	// 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"`
}

ListNetworkVolumesResponse defines model for ListNetworkVolumesResponse.

type ListOrganizationGroupMembersResponse added in v2.2.0

type ListOrganizationGroupMembersResponse struct {
	Members []OrganizationGroupMember `json:"members"`

	// 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"`
}

ListOrganizationGroupMembersResponse defines model for ListOrganizationGroupMembersResponse.

type ListOrganizationGroupsResponse added in v2.2.0

type ListOrganizationGroupsResponse struct {
	Groups []OrganizationGroup `json:"groups"`

	// 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"`
}

ListOrganizationGroupsResponse defines model for ListOrganizationGroupsResponse.

type ListOrganizationInvitesResponse added in v2.2.0

type ListOrganizationInvitesResponse struct {
	// Invites Pending invites, newest first.
	Invites []OrganizationInvite `json:"invites"`
}

ListOrganizationInvitesResponse defines model for ListOrganizationInvitesResponse.

type ListOrganizationRolesResponse added in v2.2.0

type ListOrganizationRolesResponse struct {
	// Roles Built-in and custom roles, oldest first.
	Roles []OrganizationRole `json:"roles"`
}

ListOrganizationRolesResponse defines model for ListOrganizationRolesResponse.

type ListOrganizationUsersResponse added in v2.2.0

type ListOrganizationUsersResponse struct {
	// Users Every member of the organization.
	Users []OrganizationUser `json:"users"`
}

ListOrganizationUsersResponse defines model for ListOrganizationUsersResponse.

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 ListQueuedPodsResponse added in v2.2.0

type ListQueuedPodsResponse 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"`
	QueuedPods []QueuedPod `json:"queuedPods"`
}

ListQueuedPodsResponse defines model for ListQueuedPodsResponse.

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 MetricsEndTime added in v2.2.0

type MetricsEndTime = time.Time

MetricsEndTime defines model for MetricsEndTime.

type MetricsInterval added in v2.2.0

type MetricsInterval = EndpointMetricsInterval

MetricsInterval Bucket size for endpoint metrics.

type MetricsStartTime added in v2.2.0

type MetricsStartTime = time.Time

MetricsStartTime defines model for MetricsStartTime.

type MinCudaVersionFilter

type MinCudaVersionFilter = string

MinCudaVersionFilter defines model for MinCudaVersionFilter.

type Mounts

type Mounts struct {
	// Global At most one global volume, on GPU and CPU pods, with no data
	// center constraint. Combinable with `network` but not with
	// `persistent` (rejected with 400): a persistent disk is dropped
	// whenever a volume is attached. Same PATCH rules as `network`.
	Global *[]GlobalMount `json:"global,omitempty"`

	// Network Up to 4 network volumes, all in the pod's data center.
	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. `persistent` (the volume disk) is mutually exclusive with both `network` and `global`: combining them is rejected with 400. A pod takes up to 4 network volumes and 1 global volume. Every network volume must be in the pod's data center, each volume may be listed once, and mount paths must not overlap; a request that breaks one of these is rejected. To change a pod's mounts after creation, see `UpdatePodMounts`.

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. On a pod, the volume can be mounted, moved, or unmounted after creation (see `UpdatePodMounts`).

type NetworkMountPatch added in v2.2.0

type NetworkMountPatch struct {
	// Path Mount path inside the container. Required when mounting; optional when moving a mounted volume.
	//
	// Examples: /runpod-volume
	Path *string `json:"path,omitempty"`

	// Remove Unmount the volume. Cannot be combined with `path`.
	Remove *bool `json:"remove,omitempty"`

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

NetworkMountPatch Mounts, moves, or unmounts one network volume. Mounting a volume the pod does not have requires `path`.

type NetworkVolume

type NetworkVolume struct {
	// CostCenter Cost center this resource's spend is attributed to. Absent when the resource is not attributed to a cost center, or when the caller lacks permission to view cost centers. Managed through `/v2/cost-centers`.
	CostCenter *ResourceCostCenter `json:"costCenter,omitempty"`

	// 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"`

	// Tags The tags on this resource that are visible to the caller. Keys and values are returned exactly as stored. Tags under the reserved `runpod:` prefix, such as the cost center, are never listed here. Absent when the resource's tags are unavailable to the caller; an empty array means none are visible.
	Tags *ResourceTags `json:"tags,omitempty"`

	// 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 Organization added in v2.1.0

type Organization struct {
	// Id Organization ID.
	//
	// Examples: org_id_abc_123
	Id string `json:"id"`

	// Name Organization name.
	//
	// Examples: my-org
	Name string `json:"name"`
}

Organization The authenticated caller's current organization.

type OrganizationCapabilityCatalog added in v2.2.0

type OrganizationCapabilityCatalog struct {
	// Families Capability families, in catalog order.
	Families []OrganizationCapabilityFamily `json:"families"`

	// Version Major version of the capability catalog.
	//
	// Examples: 1
	Version int `json:"version"`
}

OrganizationCapabilityCatalog The capabilities a custom role can grant.

type OrganizationCapabilityFamily added in v2.2.0

type OrganizationCapabilityFamily struct {
	// Family What the capability applies to. A capability is written `FAMILY:VERB`, e.g. `POD:VIEW`.
	//
	// Examples: POD
	Family string `json:"family"`

	// Verbs The verbs a custom role can grant on this family, in catalog order.
	//
	// Examples: ["CREATE","USE","TERMINAL","UPDATE","DELETE","VIEW"]
	Verbs []string `json:"verbs"`
}

OrganizationCapabilityFamily defines model for OrganizationCapabilityFamily.

type OrganizationCapabilityFamilyFilter added in v2.2.0

type OrganizationCapabilityFamilyFilter = []string

OrganizationCapabilityFamilyFilter defines model for OrganizationCapabilityFamilyFilter.

type OrganizationCapabilityVerbFilter added in v2.2.0

type OrganizationCapabilityVerbFilter = []string

OrganizationCapabilityVerbFilter defines model for OrganizationCapabilityVerbFilter.

type OrganizationGroup added in v2.2.0

type OrganizationGroup struct {
	CreatedAt time.Time `json:"createdAt"`

	// Id Group ID.
	Id string `json:"id"`

	// MemberCount Number of group memberships.
	MemberCount int `json:"memberCount"`

	// Name Group name.
	Name string `json:"name"`

	// UpdatedAt Group update time; membership changes need not update it.
	UpdatedAt time.Time `json:"updatedAt"`
}

OrganizationGroup A group in the authenticated caller's organization.

type OrganizationGroupInput added in v2.2.0

type OrganizationGroupInput struct {
	// Id Group ID.
	//
	// Examples: group_id_abc_123
	Id string `json:"id"`
}

OrganizationGroupInput An organization group, by ID.

type OrganizationGroupMember added in v2.2.0

type OrganizationGroupMember struct {
	// Email The member's email address. Null for an account that has none.
	//
	// Examples: member@example.com
	Email *string `json:"email"`

	// Id User ID.
	//
	// Examples: user_id_abc_123
	Id string `json:"id"`
}

OrganizationGroupMember A member of the group. `id` is the member's user ID.

type OrganizationGroupRef added in v2.2.0

type OrganizationGroupRef struct {
	// Id Group ID.
	//
	// Examples: group_id_abc_123
	Id string `json:"id"`

	// Name Group name.
	//
	// Examples: Engineering
	Name string `json:"name"`
}

OrganizationGroupRef An organization group, by ID and name.

type OrganizationInvite added in v2.2.0

type OrganizationInvite struct {
	// CreatedAt When the invite was sent.
	//
	// Examples: 2026-10-01T09:00:00Z
	CreatedAt time.Time `json:"createdAt"`

	// Email Email address the invitation was sent to. The invitee accepts by signing in with a verified account on this address.
	//
	// Examples: new-member@example.com
	Email string `json:"email"`

	// ExpiresAt When the invite can no longer be accepted.
	//
	// Examples: 2026-10-15T09:00:00Z
	ExpiresAt time.Time `json:"expiresAt"`

	// Id Invite ID.
	//
	// Examples: invite_id_abc_123
	Id string `json:"id"`

	// Role An organization role, by ID and display name.
	Role OrganizationRoleRef `json:"role"`
}

OrganizationInvite A pending invitation to join the caller's organization. An invite stops being listed once it is accepted, revoked or expired.

type OrganizationRole added in v2.2.0

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

OrganizationRole A role an organization member or invite can hold: one of Runpod's built-in roles, or a custom role the organization defined.

func (OrganizationRole) AsBuiltinOrganizationRole added in v2.2.0

func (t OrganizationRole) AsBuiltinOrganizationRole() (BuiltinOrganizationRole, error)

AsBuiltinOrganizationRole returns the union data inside the OrganizationRole as a BuiltinOrganizationRole

func (OrganizationRole) AsCustomOrganizationRole added in v2.2.0

func (t OrganizationRole) AsCustomOrganizationRole() (CustomOrganizationRole, error)

AsCustomOrganizationRole returns the union data inside the OrganizationRole as a CustomOrganizationRole

func (OrganizationRole) Discriminator added in v2.2.0

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

func (*OrganizationRole) FromBuiltinOrganizationRole added in v2.2.0

func (t *OrganizationRole) FromBuiltinOrganizationRole(v BuiltinOrganizationRole) error

FromBuiltinOrganizationRole overwrites any union data inside the OrganizationRole as the provided BuiltinOrganizationRole

func (*OrganizationRole) FromCustomOrganizationRole added in v2.2.0

func (t *OrganizationRole) FromCustomOrganizationRole(v CustomOrganizationRole) error

FromCustomOrganizationRole overwrites any union data inside the OrganizationRole as the provided CustomOrganizationRole

func (OrganizationRole) MarshalJSON added in v2.2.0

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

func (*OrganizationRole) MergeBuiltinOrganizationRole added in v2.2.0

func (t *OrganizationRole) MergeBuiltinOrganizationRole(v BuiltinOrganizationRole) error

MergeBuiltinOrganizationRole performs a merge with any union data inside the OrganizationRole, using the provided BuiltinOrganizationRole

func (*OrganizationRole) MergeCustomOrganizationRole added in v2.2.0

func (t *OrganizationRole) MergeCustomOrganizationRole(v CustomOrganizationRole) error

MergeCustomOrganizationRole performs a merge with any union data inside the OrganizationRole, using the provided CustomOrganizationRole

func (*OrganizationRole) UnmarshalJSON added in v2.2.0

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

func (OrganizationRole) ValueByDiscriminator added in v2.2.0

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

type OrganizationRoleCapabilities added in v2.2.0

type OrganizationRoleCapabilities = []string

OrganizationRoleCapabilities What the role grants, as `FAMILY:VERB` capabilities, sorted. A member's effective access can also include account-level access that no role grants.

Examples: ["POD:CREATE","POD:VIEW"]

type OrganizationRoleCapabilitiesInput added in v2.2.0

type OrganizationRoleCapabilitiesInput = []string

OrganizationRoleCapabilitiesInput What the role grants, as `FAMILY:VERB` capabilities from `GET /v2/organization/roles/capabilities`. The caller must hold every capability it lists.

Examples: ["POD:VIEW"]

type OrganizationRoleInput added in v2.2.0

type OrganizationRoleInput struct {
	// Id Role ID, as reported on a member or an invite: `builtin:admin`, `builtin:dev`, `builtin:billing`, `builtin:basic`, or a custom role's own ID.
	//
	// Examples: builtin:dev
	Id string `json:"id"`
}

OrganizationRoleInput An organization role to assign, by ID.

type OrganizationRoleName added in v2.2.0

type OrganizationRoleName = string

OrganizationRoleName Display name, 1–191 characters with at least one non-whitespace character. Leading and trailing whitespace is trimmed. It must be unique within the organization and cannot be a built-in role's name.

Examples: Pod viewer

type OrganizationRoleRef added in v2.2.0

type OrganizationRoleRef struct {
	// Id Role ID. A built-in role's ID is `builtin:` followed by its key; a custom role carries its own ID.
	//
	// Examples: builtin:dev
	Id string `json:"id"`

	// Name The role's display name: `Admin`, `Developer`, `Billing` or `Contributor` for a built-in role, or a custom role's own name. A custom role that has since been deleted reads as `Contributor` while `id` keeps its own ID.
	//
	// Examples: Developer
	Name string `json:"name"`

	// Type Who defines the role. `builtin` roles are Runpod's: `builtin:admin`, `builtin:dev`, `builtin:billing` and `builtin:basic`. A `custom` role is one the organization defined, under its own ID.
	Type OrganizationRoleType `json:"type"`
}

OrganizationRoleRef An organization role, by ID and display name.

type OrganizationRoleType added in v2.2.0

type OrganizationRoleType string

OrganizationRoleType Who defines the role. `builtin` roles are Runpod's: `builtin:admin`, `builtin:dev`, `builtin:billing` and `builtin:basic`. A `custom` role is one the organization defined, under its own ID.

const (
	OrganizationRoleTypeBuiltin OrganizationRoleType = "builtin"
	OrganizationRoleTypeCustom  OrganizationRoleType = "custom"
)

Defines values for OrganizationRoleType.

func (OrganizationRoleType) Valid added in v2.2.0

func (e OrganizationRoleType) Valid() bool

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

type OrganizationUser added in v2.2.0

type OrganizationUser struct {
	// Email The member's email address. Null for an account that has none.
	//
	// Examples: member@example.com
	Email *string `json:"email"`

	// Groups The groups the member belongs to, by name.
	Groups []OrganizationGroupRef `json:"groups"`

	// Id User ID.
	//
	// Examples: user_id_abc_123
	Id string `json:"id"`

	// Role An organization role, by ID and display name.
	Role OrganizationRoleRef `json:"role"`
}

OrganizationUser A member of the caller's organization. `id` is the member's user ID.

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 PaginationLimitAuditLogs added in v2.1.0

type PaginationLimitAuditLogs = int

PaginationLimitAuditLogs defines model for PaginationLimitAuditLogs.

type PaginationLimitBuilds

type PaginationLimitBuilds = int

PaginationLimitBuilds defines model for PaginationLimitBuilds.

type PaginationLimitOrganizationGroups added in v2.2.0

type PaginationLimitOrganizationGroups = int

PaginationLimitOrganizationGroups defines model for PaginationLimitOrganizationGroups.

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. Minimum 10 GB.
	//
	// 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 PersistentMountPatch added in v2.2.0

type PersistentMountPatch struct {
	// Path Mount path inside the container.
	//
	// Examples: /workspace
	Path *string `json:"path,omitempty"`

	// Remove Removes the volume disk. Not supported yet: `remove: true` is
	// rejected with 400.
	Remove *bool `json:"remove,omitempty"`

	// Size Volume disk size in GB. Can only grow; a smaller size than the current one is rejected with 400.
	//
	// Examples: 50
	Size *int `json:"size,omitempty"`
}

PersistentMountPatch Adds the pod's volume disk, grows it, or moves it. Adding a disk requires `size`; on a pod that already has one, omitted fields are left as they are. Not available on CPU pods.

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 The pod's hourly compute rate in USD. It's returned in every status, including `EXITED`, so it isn't what you're paying right now: a stopped pod isn't billed for compute, only for its volume disk.
	//
	// Examples: 0.35
	Cost float32 `json:"cost"`

	// CostCenter Cost center this resource's spend is attributed to. Absent when the resource is not attributed to a cost center, or when the caller lacks permission to view cost centers. Managed through `/v2/cost-centers`.
	CostCenter *ResourceCostCenter `json:"costCenter,omitempty"`

	// 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. `persistent` (the volume disk) is
	// mutually exclusive with both `network` and `global`: combining them is
	// rejected with 400. A pod takes up to 4 network volumes
	// and 1 global volume. Every network volume must be in the pod's data
	// center, each volume may be listed once, and mount paths must not
	// overlap; a request that breaks one of these is rejected. To change a
	// pod's mounts after creation, see `UpdatePodMounts`.
	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 a private image: one of
	// your credentials from `/v2/registries`. Leave it unset for a
	// private Amazon ECR image. Runpod pulls those with an ECR
	// delegation (`/v2/registries/delegations`) matched to the
	// image's account, region and repository at pull time, so there
	// is no delegation ID to pass here (a delegation ID is not a
	// credential ID). A credential set here is used instead of any
	// delegation.
	//
	//
	// Examples: null
	Registry *string `json:"registry"`

	// Runtime Live utilization metrics. Null when the pod is not RUNNING, and when listing pods with `GET /v2/pods`; fetch a single pod by ID to obtain metrics.
	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"`

	// Tags The tags on this resource that are visible to the caller. Keys and values are returned exactly as stored. Tags under the reserved `runpod:` prefix, such as the cost center, are never listed here. Absent when the resource's tags are unavailable to the caller; an empty array means none are visible.
	Tags *ResourceTags `json:"tags,omitempty"`

	// 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 PodExecRequest added in v2.2.0

type PodExecRequest struct {
	// Command Command to run, as an argv array of 1-256 arguments of at most 4096
	// characters each. It is run directly, never through a shell; for
	// pipes, redirects or globbing pass `["sh", "-c", "..."]`. The first
	// element, the program, must contain a non-whitespace character;
	// later arguments may be empty. No argument may contain a NUL
	// character.
	//
	//
	// Examples: ["nvidia-smi","--query-gpu=name,memory.used","--format=csv"]
	Command []string `json:"command"`

	// Cwd Absolute working directory for the command, at most 1024 characters
	// and without control characters. Defaults to the image's `WORKDIR`.
	//
	//
	// Examples: /workspace
	Cwd *string `json:"cwd,omitempty"`

	// Env Up to 64 environment variables added to the container's environment
	// for this command only. A name is 1-256 characters and must not
	// contain `=` or a NUL character; a value is at most 16384 characters
	// and must not contain a NUL character.
	//
	//
	// Examples: {"HF_HOME":"/workspace/hf"}
	Env *map[string]string `json:"env,omitempty"`

	// TimeoutSeconds How long the call waits for the command to finish, in seconds. A
	// command still running at this point returns with `timedOut: true`.
	//
	//
	// Examples: 10
	TimeoutSeconds *int `json:"timeoutSeconds,omitempty"`
}

PodExecRequest defines model for PodExecRequest.

type PodExecResult added in v2.2.0

type PodExecResult struct {
	// DurationMs Wall time of the command as measured on the pod's machine, in milliseconds.
	DurationMs int `json:"durationMs"`

	// ExitCode The command's exit code. A non-zero code is a result, not an error.
	// Null only when `timedOut` is `true`.
	ExitCode *int `json:"exitCode"`

	// Stderr The command's standard error, as UTF-8 with invalid bytes
	// replaced. Capped at 1 MiB; see `truncated`.
	Stderr string `json:"stderr"`

	// Stdout The command's standard output, as UTF-8 with invalid bytes
	// replaced. Capped at 1 MiB; see `truncated`.
	Stdout string `json:"stdout"`

	// TimedOut The call stopped waiting at `timeoutSeconds`. It does not mean the
	// command was stopped: it may still be running inside the container.
	TimedOut bool `json:"timedOut"`

	// Truncated `stdout` or `stderr` reached the 1 MiB cap and was cut.
	Truncated bool `json:"truncated"`
}

PodExecResult defines model for PodExecResult.

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 PodQueueAllowedHours added in v2.2.0

type PodQueueAllowedHours struct {
	// Friday Examples: [9,10,11,12,13,14,15,16]
	Friday *PodQueueHours `json:"friday,omitempty"`

	// Monday Examples: [9,10,11,12,13,14,15,16]
	Monday *PodQueueHours `json:"monday,omitempty"`

	// Saturday Examples: [9,10,11,12,13,14,15,16]
	Saturday *PodQueueHours `json:"saturday,omitempty"`

	// Sunday Examples: [9,10,11,12,13,14,15,16]
	Sunday *PodQueueHours `json:"sunday,omitempty"`

	// Thursday Examples: [9,10,11,12,13,14,15,16]
	Thursday *PodQueueHours `json:"thursday,omitempty"`

	// Tuesday Examples: [9,10,11,12,13,14,15,16]
	Tuesday *PodQueueHours `json:"tuesday,omitempty"`

	// Wednesday Examples: [9,10,11,12,13,14,15,16]
	Wednesday *PodQueueHours `json:"wednesday,omitempty"`
}

PodQueueAllowedHours Hours of the day, in UTC, during which the queued pod may deploy, per weekday. Omit the object to allow any time. A weekday that is omitted is unrestricted; an empty array blocks that whole day. Each entry is an hour from 0 to 23 and allows deploys from that hour to the next.

type PodQueueHours added in v2.2.0

type PodQueueHours = []int

PodQueueHours Examples: [9,10,11,12,13,14,15,16]

type PodQueueOptions added in v2.2.0

type PodQueueOptions struct {
	// AllowedHours Hours of the day, in UTC, during which the queued pod may deploy, per
	// weekday. Omit the object to allow any time. A weekday that is omitted
	// is unrestricted; an empty array blocks that whole day. Each entry is
	// an hour from 0 to 23 and allows deploys from that hour to the next.
	AllowedHours *PodQueueAllowedHours `json:"allowedHours,omitempty"`

	// ExpiresAt Stop waiting at this time; the queued pod then reports `EXPIRED`.
	// Defaults to, and is capped at, 30 days after `startsAt` (or after
	// the request when `startsAt` is omitted). A time already past, or
	// one not after `startsAt`, is a `400`.
	//
	//
	// Examples: 2026-06-03T08:00:00Z
	ExpiresAt *time.Time `json:"expiresAt,omitempty"`

	// NotifyEmail Also email this address when the pod deploys, or when the queued
	// pod fails or expires. Must be an address on your account (`422`
	// otherwise).
	//
	//
	// Examples: ops@example.com
	NotifyEmail *openapi_types.Email `json:"notifyEmail,omitempty"`

	// StartsAt Begin waiting at this future time instead of now. The create call
	// then does not try to deploy first; the pod is queued at once. A
	// time already past is a `400`.
	//
	//
	// Examples: 2026-06-02T08:00:00Z
	StartsAt *time.Time `json:"startsAt,omitempty"`
}

PodQueueOptions Queue the pod for deploy-when-available instead of failing when the requested GPU has no capacity. The create call still tries to deploy first; only a capacity failure queues the request, and any other failure is returned as it would be without `queue`. A queued pod is placed by a scheduler that retries about every five minutes, in plan priority order, during `allowedHours`, until `expiresAt`. An empty object queues with the defaults.

GPU pods on the secure cloud only: `queue` with `cpu` or `globalNetworking` is rejected with `400`. A plan without deploy-when-available is refused with `403`, and one whose queue is full with `409`. A request that matches a pod still queued (same GPU type and count, same settings) returns that queued pod rather than a second one.

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 usually absent while the pod is provisioning or stopped. It can still appear on a stopped pod, so check that `status` is `RUNNING` before connecting. Also null when listing pods with `GET /v2/pods`; fetch a single pod by ID to obtain the live mapping.
	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 QueuedPod added in v2.2.0

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

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

	// DataCenterIds The data centers the deploy is limited to; empty when any will do.
	//
	// Examples: ["EU-RO-1"]
	DataCenterIds []string `json:"dataCenterIds"`

	// FailureReason Set only when `status` is `FAILED`.
	FailureReason *QueuedPodFailureReason `json:"failureReason"`
	Gpu           BaseGpuConfig           `json:"gpu"`

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

	// Image The image the pod will run. Null when it comes from `templateId` at deploy time.
	//
	// Examples: runpod/pytorch:1.0.2-cu1281-torch280-ubuntu2404
	Image *string `json:"image"`

	// Name The name the pod will carry.
	//
	// Examples: pytorch-training
	Name string `json:"name"`

	// PodId The pod created once capacity came; null until then. Read it with `GET /v2/pods/{id}`.
	//
	// Examples: null
	PodId *string `json:"podId"`

	// Queue The `queue` options as stored, with the defaults applied.
	Queue QueuedPodSchedule `json:"queue"`

	// ResolvedAt When the queued pod deployed, failed or expired. Null while it waits, and after a cancel.
	//
	// Examples: null
	ResolvedAt *time.Time `json:"resolvedAt"`

	// Status Where a queued pod is in its life.
	// - `QUEUED`    — waiting for capacity (from `queue.startsAt` when set)
	// - `DEPLOYED`  — capacity came and a pod was created; `podId` names it
	// - `FAILED`    — capacity came but the deploy was refused for good; `failureReason` says why
	// - `EXPIRED`   — `queue.expiresAt` passed without capacity
	// - `CANCELLED` — cancelled with `DELETE /v2/queued-pods/{id}`
	Status QueuedPodStatus `json:"status"`

	// TemplateId The template the scheduler resolves at deploy time. Null for queued
	// pods from this API, which expands `templateId` into `image` when
	// the request is made.
	//
	//
	// Examples: null
	TemplateId *string `json:"templateId"`
}

QueuedPod A pod waiting for capacity, or the record of one that waited. It carries what identifies and schedules the request; the full container settings are not echoed back, keep your create request.

type QueuedPodFailureReason added in v2.2.0

type QueuedPodFailureReason string

QueuedPodFailureReason Why a `FAILED` queued pod could not deploy once capacity came. - `INSUFFICIENT_BALANCE` — the account balance was too low - `SPENDING_LIMIT` — the deploy would have passed the spending limit - `GPU_QUOTA_EXCEEDED` — the account's quota for this GPU type was reached - `GPU_CONCURRENCY_EXCEEDED` — the plan's concurrent GPU cap was reached - `ORG_RESTRICTED` — the account joined an organization, which cannot use queued deploys - `UNKNOWN` — anything else; contact support

const (
	QueuedPodFailureReasonGpuConcurrencyExceeded QueuedPodFailureReason = "GPU_CONCURRENCY_EXCEEDED"
	QueuedPodFailureReasonGpuQuotaExceeded       QueuedPodFailureReason = "GPU_QUOTA_EXCEEDED"
	QueuedPodFailureReasonInsufficientBalance    QueuedPodFailureReason = "INSUFFICIENT_BALANCE"
	QueuedPodFailureReasonOrgRestricted          QueuedPodFailureReason = "ORG_RESTRICTED"
	QueuedPodFailureReasonSpendingLimit          QueuedPodFailureReason = "SPENDING_LIMIT"
	QueuedPodFailureReasonUnknown                QueuedPodFailureReason = "UNKNOWN"
)

Defines values for QueuedPodFailureReason.

func (QueuedPodFailureReason) Valid added in v2.2.0

func (e QueuedPodFailureReason) Valid() bool

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

type QueuedPodList added in v2.2.0

type QueuedPodList struct {
	QueuedPods []QueuedPod `json:"queuedPods"`
}

QueuedPodList defines model for QueuedPodList.

type QueuedPodSchedule added in v2.2.0

type QueuedPodSchedule struct {
	// AllowedHours Null when any hour is allowed.
	AllowedHours *PodQueueAllowedHours `json:"allowedHours"`

	// ExpiresAt When waiting ends.
	//
	// Examples: 2026-07-01T12:00:00Z
	ExpiresAt time.Time `json:"expiresAt"`

	// NotifyEmail Null when no email was asked for.
	//
	// Examples: null
	NotifyEmail *openapi_types.Email `json:"notifyEmail"`

	// StartsAt When waiting begins. Null when it began with the request.
	//
	// Examples: null
	StartsAt *time.Time `json:"startsAt"`
}

QueuedPodSchedule The `queue` options as stored, with the defaults applied.

type QueuedPodStatus added in v2.2.0

type QueuedPodStatus string

QueuedPodStatus Where a queued pod is in its life. - `QUEUED` — waiting for capacity (from `queue.startsAt` when set) - `DEPLOYED` — capacity came and a pod was created; `podId` names it - `FAILED` — capacity came but the deploy was refused for good; `failureReason` says why - `EXPIRED` — `queue.expiresAt` passed without capacity - `CANCELLED` — cancelled with `DELETE /v2/queued-pods/{id}`

const (
	QueuedPodStatusCancelled QueuedPodStatus = "CANCELLED"
	QueuedPodStatusDeployed  QueuedPodStatus = "DEPLOYED"
	QueuedPodStatusExpired   QueuedPodStatus = "EXPIRED"
	QueuedPodStatusFailed    QueuedPodStatus = "FAILED"
	QueuedPodStatusQueued    QueuedPodStatus = "QUEUED"
)

Defines values for QueuedPodStatus.

func (QueuedPodStatus) Valid added in v2.2.0

func (e QueuedPodStatus) Valid() bool

Valid indicates whether the value is a known member of the QueuedPodStatus 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` (at least 1). Windows are fixed and aligned to the clock, not sliding. 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.

Limits are per user, and every `/v2` route counts toward the same limits; creating pods has no separate limit. Read the current quotas from this header instead of hard-coding them, because they can change and some accounts have higher limits. A 429 only slows you down: wait for the `Retry-After` time and retry. Your account isn't suspended.

Examples: "minute";q=180;w=60, "hour";q=3600;w=3600, "day";q=43200;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 RequestTooLargeError added in v2.1.0

type RequestTooLargeError = ErrorResponse

RequestTooLargeError defines model for RequestTooLargeError.

type ResendAuthenticationAttemptRequest added in v2.2.0

type ResendAuthenticationAttemptRequest struct {
	// CodeVerifier The random secret whose SHA-256 hash was sent as `codeChallenge`.
	//
	// Examples: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk
	CodeVerifier CodeVerifier `json:"codeVerifier"`
}

ResendAuthenticationAttemptRequest defines model for ResendAuthenticationAttemptRequest.

type ResourceCostCenter added in v2.2.0

type ResourceCostCenter = CostCenter

ResourceCostCenter Cost center this resource's spend is attributed to. Absent when the resource is not attributed to a cost center, or when the caller lacks permission to view cost centers. Managed through `/v2/cost-centers`.

type ResourceFilters added in v2.2.0

type ResourceFilters struct {
	// Tags Conditions on the resource's tags. A resource must match every condition; repeating a key adds a condition rather than widening the first one. At most 25, the most tags one resource can carry.
	Tags *[]TagCondition `json:"tags,omitempty"`
}

ResourceFilters An empty object, or an empty `tags` array, filters nothing.

type ResourceTags added in v2.2.0

type ResourceTags = []TagReference

ResourceTags The tags on this resource that are visible to the caller. Keys and values are returned exactly as stored. Tags under the reserved `runpod:` prefix, such as the cost center, are never listed here. Absent when the resource's tags are unavailable to the caller; an empty array means none are visible.

type ResourceType added in v2.2.0

type ResourceType string

ResourceType Kind of resource a cost center or tag can be attached to.

const (
	ResourceTypeCluster            ResourceType = "CLUSTER"
	ResourceTypeNetworkVolume      ResourceType = "NETWORK_VOLUME"
	ResourceTypePod                ResourceType = "POD"
	ResourceTypeServerlessEndpoint ResourceType = "SERVERLESS_ENDPOINT"
)

Defines values for ResourceType.

func (ResourceType) Valid added in v2.2.0

func (e ResourceType) Valid() bool

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

type ResponseTooLargeError added in v2.1.0

type ResponseTooLargeError = ErrorResponse

ResponseTooLargeError defines model for ResponseTooLargeError.

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 TagCondition added in v2.2.0

type TagCondition struct {
	// Key Tag key, 1–191 characters as sent, with at least one that is not whitespace. Leading and trailing whitespace is ignored. Keys under the reserved `runpod:` prefix, in any letter case, are rejected.
	//
	// Examples: env
	Key TagFilterKey `json:"key"`

	// Values Matches a tag under `key` with any one of these values, compared exactly. Omitted or empty, the condition only requires the key to be present. `""` matches a tag whose value is empty. At most 100.
	//
	// Examples: ["dev","prod"]
	Values *[]string `json:"values,omitempty"`
}

TagCondition defines model for TagCondition.

type TagFilterKey added in v2.2.0

type TagFilterKey = string

TagFilterKey Tag key, 1–191 characters as sent, with at least one that is not whitespace. Leading and trailing whitespace is ignored. Keys under the reserved `runpod:` prefix, in any letter case, are rejected.

Examples: env

type TagReference added in v2.2.0

type TagReference struct {
	// Id ID of the tag itself, shared by every resource it is attached to.
	//
	// Examples: clz1x9k4a0000qw3h8s7d2f1g
	Id string `json:"id"`

	// Key Examples: env
	Key string `json:"key"`

	// Value May be empty.
	//
	// Examples: dev
	Value string `json:"value"`
}

TagReference defines model for TagReference.

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 a private image: one of
	// your credentials from `/v2/registries`. Leave it unset for a
	// private Amazon ECR image. Runpod pulls those with an ECR
	// delegation (`/v2/registries/delegations`) matched to the
	// image's account, region and repository at pull time, so there
	// is no delegation ID to pass here (a delegation ID is not a
	// credential ID). A credential set here is used instead of any
	// delegation.
	//
	//
	// 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 UpdateCostCenterRequest added in v2.2.0

type UpdateCostCenterRequest struct {
	// Value Leading and trailing whitespace is trimmed.
	//
	// Examples: team-ml-eu
	Value string `json:"value"`
}

UpdateCostCenterRequest defines model for UpdateCostCenterRequest.

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`,
	// so a typo cannot 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"`

	// Mounts Volumes to mount on the endpoint's workers. A `network` or `global`
	// list that is present replaces the endpoint's current list of that kind;
	// an empty list detaches it, and an omitted list is left unchanged. Both
	// kinds cannot be present on the endpoint at once, so to switch kinds send
	// `[]` for one and the new list for the other in the same request. Changes
	// apply to workers created afterwards. At most one global volume, GPU
	// endpoints only. `network` may accompany the deprecated `networkVolumes` field
	// only if the two agree exactly.
	Mounts *EndpointMountsInput `json:"mounts,omitempty"`
	Name   *string              `json:"name,omitempty"`

	// NetworkVolumes Network volume IDs. Pass `[]` to detach.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	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 a private image: one of
	// your credentials from `/v2/registries`. Leave it unset for a
	// private Amazon ECR image. Runpod pulls those with an ECR
	// delegation (`/v2/registries/delegations`) matched to the
	// image's account, region and repository at pull time, so there
	// is no delegation ID to pass here (a delegation ID is not a
	// credential ID). A credential set here is used instead of any
	// delegation.
	//
	//
	// 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 UpdateGlobalVolumeRequest added in v2.1.0

type UpdateGlobalVolumeRequest struct {
	// Name New human-readable name, 1–191 characters with at least one non-whitespace character. Leading and trailing whitespace is trimmed.
	//
	//
	// Examples: renamed-volume
	Name *string `json:"name,omitempty"`
}

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

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 UpdateOrganizationGroupRequest added in v2.2.0

type UpdateOrganizationGroupRequest struct {
	// Name Group name with at least one non-whitespace character; surrounding whitespace is trimmed.
	//
	// Examples: Research
	Name string `json:"name"`
}

UpdateOrganizationGroupRequest defines model for UpdateOrganizationGroupRequest.

type UpdateOrganizationRoleRequest added in v2.2.0

type UpdateOrganizationRoleRequest struct {
	// Capabilities What the role grants, as `FAMILY:VERB` capabilities from `GET /v2/organization/roles/capabilities`. The caller must hold every capability it lists.
	//
	// Examples: ["POD:VIEW"]
	Capabilities *OrganizationRoleCapabilitiesInput `json:"capabilities,omitempty"`

	// Name Display name, 1–191 characters with at least one non-whitespace character. Leading and trailing whitespace is trimmed. It must be unique within the organization and cannot be a built-in role's name.
	//
	// Examples: Pod viewer
	Name *OrganizationRoleName `json:"name,omitempty"`
}

UpdateOrganizationRoleRequest The fields to change; omitted fields are unchanged. `capabilities` replaces the role's whole grant set rather than adding to it.

type UpdateOrganizationUserRequest added in v2.2.0

type UpdateOrganizationUserRequest struct {
	// Groups The member's groups after the change: the whole set, by ID. An empty list removes the member from every group.
	Groups *[]OrganizationGroupInput `json:"groups,omitempty"`

	// Role An organization role to assign, by ID.
	Role *OrganizationRoleInput `json:"role,omitempty"`
}

UpdateOrganizationUserRequest Changes to a member. Send `role`, `groups`, or both; an omitted field is left as it is.

type UpdatePodMounts added in v2.2.0

type UpdatePodMounts struct {
	// Global Global volumes to mount, move, or unmount. Up to 2 entries, so a
	// request can swap the global volume; the pod can still hold at
	// most 1 afterwards.
	Global *[]GlobalMountPatch `json:"global,omitempty"`

	// Network Network volumes to mount, move, or unmount. Up to 8 entries, so
	// a request can unmount 4 volumes and mount 4 others; the pod can
	// still hold at most 4 afterwards.
	Network *[]NetworkMountPatch `json:"network,omitempty"`

	// Persistent Adds the pod's volume disk, grows it, or moves it. Adding a disk
	// requires `size`; on a pod that already has one, omitted fields are
	// left as they are. Not available on CPU pods.
	Persistent *PersistentMountPatch `json:"persistent,omitempty"`
}

UpdatePodMounts Changes to a pod's mounts. Each entry names one volume by `volumeId` and changes only that volume; volumes that are not listed, and kinds that are omitted, are left as they are. Omitting `mounts` or sending `{}` changes nothing.

  • A listed volume the pod does not have is mounted at `path`.
  • A listed volume the pod already has moves to `path` (or stays put when `path` is omitted).
  • `remove: true` unmounts the volume. It cannot be combined with `path`, and the volume must be mounted on the pod.
  • To swap a volume, remove the old one and add the new one in the same request.

Limits are checked against the pod as it would be after the request and rejected with 400: at most 4 network volumes and 1 global volume, and a volume disk cannot share a pod with network or global volumes. A volume disk can be added to a pod that has no volumes mounted (or unmounts them all in the same request), and it can only grow. Removing a volume disk is not supported yet.

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 Changes to a pod's mounts. Each entry names one volume by `volumeId`
	// and changes only that volume; volumes that are not listed, and kinds
	// that are omitted, are left as they are. Omitting `mounts` or sending
	// `{}` changes nothing.
	//
	// - A listed volume the pod does not have is mounted at `path`.
	// - A listed volume the pod already has moves to `path` (or stays
	//   put when `path` is omitted).
	// - `remove: true` unmounts the volume. It cannot be combined with
	//   `path`, and the volume must be mounted on the pod.
	// - To swap a volume, remove the old one and add the new one in the
	//   same request.
	//
	// Limits are checked against the pod as it would be after the request
	// and rejected with 400: at most 4 network volumes and 1 global
	// volume, and a volume disk cannot share a pod with network or global
	// volumes. A volume disk can be added to a pod that has no volumes
	// mounted (or unmounts them all in the same request), and it can only
	// grow. Removing a volume disk is not supported yet.
	Mounts *UpdatePodMounts `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 a private image: one of
	// your credentials from `/v2/registries`. Leave it unset for a
	// private Amazon ECR image. Runpod pulls those with an ECR
	// delegation (`/v2/registries/delegations`) matched to the
	// image's account, region and repository at pull time, so there
	// is no delegation ID to pass here (a delegation ID is not a
	// credential ID). A credential set here is used instead of any
	// delegation.
	//
	//
	// 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 a private image: one of
	// your credentials from `/v2/registries`. Leave it unset for a
	// private Amazon ECR image. Runpod pulls those with an ECR
	// delegation (`/v2/registries/delegations`) matched to the
	// image's account, region and repository at pull time, so there
	// is no delegation ID to pass here (a delegation ID is not a
	// credential ID). A credential set here is used instead of any
	// delegation.
	//
	//
	// 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 VerifyAuthenticationAttemptRequest added in v2.2.0

type VerifyAuthenticationAttemptRequest struct {
	// Code Verification code from the email.
	//
	// Examples: 123456
	Code string `json:"code"`

	// CodeVerifier The random secret whose SHA-256 hash was sent as `codeChallenge`.
	//
	// Examples: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk
	CodeVerifier CodeVerifier `json:"codeVerifier"`
}

VerifyAuthenticationAttemptRequest defines model for VerifyAuthenticationAttemptRequest.

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 Identifier of the pod backing this worker. Each worker is one pod,
	// so there is no separate pod identifier.
	//
	//
	// 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