1.0.9 • Published 11 months ago

runpod-client v1.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Runpod Client Documentation

This unofficial runpod.io client provides functionality to interact with the Runpod.io API.

StatementsBranchesFunctionsLines
StatementsBranchesFunctionsLines

Installation

npm install runpod-client

Import runcloud-client

import runpod from "runpod-client";

Initialize:

const rp = runpod(API_KEY); //make ure to add your api key here

List all pods

const pods = await rp({ action: "list" });
for (const pod of pods) {
	console.log(pod);
}

Get a specific pod

const pod = await rp({ action: "get", id: POD_ID }); //Replace POD_ID your existing pod id
console.log(pod);

Start a pod

const pod = await rp({ action: "start", id: POD_ID }); //Replace POD_ID your existing pod id
console.log(pod);

Stop a pod

const pod = await rp({ action: "stop", id: POD_ID }); //Replace POD_ID your existing pod id
console.log(pod);

List GPU types available

const gpuTypes = await rp({ action: "getGPUTypes" });
for (const gpuType of gpuTypes) {
	console.log(gpuType);
}

List GPU type by ID

const gpuTypes = await rp({
	action: "getGPU",
	id: "NVIDIA GeForce RTX 3090",
	count: 1,
});
for (const gpuType of gpuTypes) {
	console.log(gpuType);
}
1.0.9

11 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago