> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Runpod API reference

> API reference for the Runpod plugin in Corsair: every `runpod.api.*` operation with its input and output types, taken from the plugin's Zod schemas.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Account

### myself

`account.myself`

Get the authenticated RunPod user id, email, MFA, and SSH public key

**Risk:** `read`

```ts theme={null}
await corsair.runpod.api.account.myself({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `email` | `string` | No | — |
| `multiFactorEnabled` | `boolean` | No | — |
| `pubKey` | `string \| null` | No | — |

***

### updateSettings

`account.updateSettings`

Update the account SSH public key used for Pod access

**Risk:** `write`

```ts theme={null}
await corsair.runpod.api.account.updateSettings({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pubKey` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | — |
| `pubKey` | `string \| null` | No | — |
| `keys` | `string[]` | No | — |

***

## Catalog

### cpuTypes

`catalog.cpuTypes`

List CPU types with vCPU range, RAM, and pricing

**Risk:** `read`

```ts theme={null}
await corsair.runpod.api.catalog.cpuTypes({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `include` | `AVAILABILITY` | No | — |
| `product` | `POD \| SERVERLESS` | No | — |
| `vcpuCount` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `cpus` | `object[]` | Yes | — |

> [accordion] cpus full type
>
> ```ts theme={null}
> {
>   id: string,
>   name: string,
>   group: string,
>   vcpu: {
>     min: number,
>     max: number
>   },
>   ramGbPerVcpu: number,
>   price: {
>     securePerVcpu: number,
>     serverlessPerVcpu: number
>   },
>   availability?: NONE | LOW | MEDIUM | HIGH
> }[]
> ```

***

### gpuTypes

`catalog.gpuTypes`

List GPU types with memory, cloud availability, pricing, and stock

**Risk:** `read`

```ts theme={null}
await corsair.runpod.api.catalog.gpuTypes({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | — |
| `gpuCount` | `number` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id: string,
>   displayName?: string,
>   memoryInGb?: number,
>   secureCloud?: boolean,
>   communityCloud?: boolean,
>   lowestPrice?: {
>     uninterruptablePrice?: number | null,
>     stockStatus?: string | null,
>     availableGpuCounts?: number[] | null
>   } | null
> }[]
> ```

***

## Clusters

### create

`clusters.create`

Create a multi-node GPU cluster for distributed workloads

**Risk:** `write`

```ts theme={null}
await corsair.runpod.api.clusters.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `type` | `APPLICATION \| TRAINING \| SLURM \| RAY` | Yes | — |
| `compute` | `object` | Yes | — |
| `image` | `string` | No | — |
| `disk` | `number` | No | — |
| `env` | `Record<string, string>` | No | — |
| `ports` | `string[]` | No | — |
| `args` | `string` | No | — |
| `dataCenterIds` | `string[]` | No | — |
| `startJupyter` | `boolean` | No | — |
| `startSsh` | `boolean` | No | — |

> [accordion] compute full type
>
> ```ts theme={null}
> {
>   gpuTypeId: string,
>   gpuCountPerPod: number,
>   podCount: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `type` | `APPLICATION \| TRAINING \| SLURM \| RAY` | Yes | — |
| `compute` | `object` | Yes | — |
| `createdAt` | `string` | No | — |

> [accordion] compute full type
>
> ```ts theme={null}
> {
>   gpuTypeId: string,
>   gpuCountPerPod: number,
>   podCount: number
> }
> ```

***

## Endpoints

### save

`endpoints.save`

Create or update a Serverless endpoint and scaling settings

**Risk:** `write`

```ts theme={null}
await corsair.runpod.api.endpoints.save({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | — |
| `name` | `string` | Yes | — |
| `templateId` | `string` | Yes | — |
| `gpuIds` | `string` | Yes | — |
| `type` | `QB \| LB` | No | — |
| `idleTimeout` | `number` | No | — |
| `locations` | `string` | No | — |
| `flashBootType` | `FLASHBOOT` | No | — |
| `scalerType` | `QUEUE_DELAY \| REQUEST_COUNT` | No | — |
| `scalerValue` | `number` | No | — |
| `workersMin` | `number` | No | — |
| `workersMax` | `number` | No | — |
| `networkVolumeId` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | No | — |
| `gpuIds` | `string` | No | — |
| `templateId` | `string` | No | — |
| `idleTimeout` | `number` | No | — |
| `locations` | `string \| null` | No | — |
| `flashBootType` | `string \| null` | No | — |
| `scalerType` | `string` | No | — |
| `scalerValue` | `number` | No | — |
| `workersMin` | `number` | No | — |
| `workersMax` | `number` | No | — |

***

## Pods

### get

`pods.get`

Get a Pod by id including status, cost, GPU, and memory

**Risk:** `read`

```ts theme={null}
await corsair.runpod.api.pods.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `podId` | `string` | Yes | — |
| `includeMachine` | `boolean` | No | — |
| `includeNetworkVolume` | `boolean` | No | — |
| `includeSavingsPlans` | `boolean` | No | — |
| `includeTemplate` | `boolean` | No | — |
| `includeWorkers` | `boolean` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | No | — |
| `image` | `string` | No | — |
| `desiredStatus` | `RUNNING \| EXITED \| TERMINATED` | No | — |
| `costPerHr` | `number` | No | — |
| `memoryInGb` | `number` | No | — |
| `vcpuCount` | `number` | No | — |
| `gpu` | `object` | No | — |

> [accordion] gpu full type
>
> ```ts theme={null}
> {
>   id?: string,
>   count?: number,
>   displayName?: string
> }
> ```

***

### list

`pods.list`

List Pods with optional status, GPU, image, and location filters

**Risk:** `read`

```ts theme={null}
await corsair.runpod.api.pods.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `computeType` | `GPU \| CPU` | No | — |
| `cpuFlavorId` | `string \| string[]` | No | — |
| `dataCenterId` | `string \| string[]` | No | — |
| `desiredStatus` | `RUNNING \| EXITED \| TERMINATED` | No | — |
| `endpointId` | `string` | No | — |
| `gpuTypeId` | `string \| string[]` | No | — |
| `id` | `string` | No | — |
| `imageName` | `string` | No | — |
| `includeMachine` | `boolean` | No | — |
| `includeNetworkVolume` | `boolean` | No | — |
| `includeSavingsPlans` | `boolean` | No | — |
| `includeTemplate` | `boolean` | No | — |
| `includeWorkers` | `boolean` | No | — |
| `name` | `string` | No | — |
| `networkVolumeId` | `string` | No | — |
| `templateId` | `string` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id: string,
>   name?: string,
>   image?: string,
>   desiredStatus?: RUNNING | EXITED | TERMINATED,
>   costPerHr?: number,
>   memoryInGb?: number,
>   vcpuCount?: number,
>   gpu?: {
>     id?: string,
>     count?: number,
>     displayName?: string
>   }
> }[]
> ```

***

## Registries

### delete

`registries.delete`

Delete stored container registry credentials

**Risk:** `write`

```ts theme={null}
await corsair.runpod.api.registries.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `containerRegistryAuthId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | — |
| `name` | `string` | No | — |

***

### save

`registries.save`

Store credentials for a private container registry

**Risk:** `write`

```ts theme={null}
await corsair.runpod.api.registries.save({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `username` | `string` | Yes | — |
| `password` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | Yes | — |

***

### update

`registries.update`

Update username or password for a saved registry auth

**Risk:** `write`

```ts theme={null}
await corsair.runpod.api.registries.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `username` | `string` | Yes | — |
| `password` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | Yes | — |

***

## Secrets

### create

`secrets.create`

Create an encrypted secret referenced as RUNPOD\_SECRET\_\<name>

**Risk:** `write`

```ts theme={null}
await corsair.runpod.api.secrets.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `value` | `string` | Yes | — |
| `description` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `description` | `string \| null` | No | — |

***

## Templates

### delete

`templates.delete`

Delete a template that is not in use by pods or endpoints

**Risk:** `write`

```ts theme={null}
await corsair.runpod.api.templates.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `templateName` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | — |

***

### save

`templates.save`

Create or update a reusable Pod or Serverless template

**Risk:** `write`

```ts theme={null}
await corsair.runpod.api.templates.save({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | — |
| `name` | `string` | Yes | — |
| `imageName` | `string` | Yes | — |
| `containerDiskInGb` | `number` | Yes | — |
| `volumeInGb` | `number` | Yes | — |
| `dockerArgs` | `string` | No | Defaults to "". |
| `env` | `object[]` | No | — |
| `ports` | `string` | No | — |
| `readme` | `string` | No | — |
| `volumeMountPath` | `string` | No | — |
| `isServerless` | `boolean` | No | — |
| `containerRegistryAuthId` | `string` | No | — |

> [accordion] env full type
>
> ```ts theme={null}
> {
>   key: string,
>   value: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | No | — |
| `imageName` | `string` | No | — |
| `containerDiskInGb` | `number` | No | — |
| `volumeInGb` | `number` | No | — |
| `isServerless` | `boolean` | No | — |
| `dockerArgs` | `string \| null` | No | — |
| `ports` | `string \| null` | No | — |
| `readme` | `string \| null` | No | — |
| `volumeMountPath` | `string \| null` | No | — |
| `env` | `object[]` | No | — |

> [accordion] env full type
>
> ```ts theme={null}
> {
>   key: string,
>   value: string
> }[]
> ```

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.