Skip to content

GPUs & Requirements API ​

The reservations group answers the questions you ask before posting a deployment: which GPUs exist on the network, which hardware requirements you can set, and how many hosts meet them right now. It is what the dashboard uses to pick a GPU and narrow the hosts a deployment may run on.

All three calls are read-only and need no authentication. Reserving hosts for a deployment is done by the deployment manager, not through this group.

Requirements ​

A requirement set maps a metric key to a value:

  • A number is a minimum. ram_gb: 64 means at least 64 GB of RAM.
  • A string or boolean must match exactly. country: "NL" means hosts in the Netherlands.
  • A list is any of its values. name: ["NVIDIA GeForce RTX 4090", "NVIDIA GeForce RTX 5090"] means hosts with either GPU.
  • The GPU model is the name key. For example, name: "NVIDIA GeForce RTX 4090".
ts
const requirements = {
  name: ['NVIDIA GeForce RTX 4090', 'NVIDIA GeForce RTX 5090'],
  ram_gb: 64,
  country: 'NL',
};

List GPU models ​

Every GPU model a deployment without a market can run on, with its VRAM, how many hosts have one, how many of those are queued and free right now, how many are running a job, the open markets they are in, and price: the hourly USD range across those markets (base reward, before the network fee; null when none is priced). Hosts in community or client-private markets do not count, so the catalogue needs no markets lookup to go with it.

ts
import { 
function createNosanaClient(network: NosanaNetwork | undefined, customConfig: PartialClientConfig & {
    connect: ConnectFactoryConfig & {
        clientSecret: string;
    };
}): NosanaClient & {
    connect: ServerConnect;
} (+3 overloads)
createNosanaClient
,
type NosanaNetwork = "mainnet" | "devnet" | "localnet"
const NosanaNetwork: {
    readonly MAINNET: "mainnet";
    readonly DEVNET: "devnet";
    readonly LOCALNET: "localnet";
}
NosanaNetwork
} from '@nosana/kit';
const const client: NosanaClientclient = function createNosanaClient(network?: NosanaNetwork, customConfig?: PartialClientConfig): NosanaClient (+3 overloads)createNosanaClient(
const NosanaNetwork: {
    readonly MAINNET: "mainnet";
    readonly DEVNET: "devnet";
    readonly LOCALNET: "localnet";
}
NosanaNetwork
.type MAINNET: "mainnet"MAINNET);
const {
const gpus: {
    name: string;
    vramGb: number;
    nodes: number;
    available: number;
    working: number;
    markets: string[];
    price: ({
        minUsdPerHour: number;
        maxUsdPerHour: number;
    } | null) | null;
}[]
gpus
} = await const client: NosanaClientclient.NosanaClient.api: NosanaApiClientapi.reservations: NosanaReservationsApireservations.NosanaReservationsApi.listGpus: () => Promise<NosanaGpuModels>
Every GPU model on the network, with available and working host counts.
listGpus
();
for (const
const gpu: {
    name: string;
    vramGb: number;
    nodes: number;
    available: number;
    working: number;
    markets: string[];
    price: ({
        minUsdPerHour: number;
        maxUsdPerHour: number;
    } | null) | null;
}
gpu
of
const gpus: {
    name: string;
    vramGb: number;
    nodes: number;
    available: number;
    working: number;
    markets: string[];
    price: ({
        minUsdPerHour: number;
        maxUsdPerHour: number;
    } | null) | null;
}[]
gpus
) {
const const price: stringprice =
const gpu: {
    name: string;
    vramGb: number;
    nodes: number;
    available: number;
    working: number;
    markets: string[];
    price: ({
        minUsdPerHour: number;
        maxUsdPerHour: number;
    } | null) | null;
}
gpu
.
price: {
    minUsdPerHour: number;
    maxUsdPerHour: number;
} | null
price
? `from $${
const gpu: {
    name: string;
    vramGb: number;
    nodes: number;
    available: number;
    working: number;
    markets: string[];
    price: ({
        minUsdPerHour: number;
        maxUsdPerHour: number;
    } | null) | null;
}
gpu
.
price: {
    minUsdPerHour: number;
    maxUsdPerHour: number;
}
price
.minUsdPerHour: numberminUsdPerHour}/h` : 'unpriced';
var console: Console
The `console` module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream. * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) and [`process.stderr`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module. _**Warning**_: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v24.x/api/process.html#a-note-on-process-io) for more information. Example using the global `console`: ```js console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr ``` Example using the `Console` class: ```js const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err ```
@see[source](https://github.com/nodejs/node/blob/v24.x/lib/console.js)
console
.Console.log(message?: any, ...optionalParams: any[]): void (+1 overload)
Prints to `stdout` with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)). ```js const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout ``` See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args) for more information.
@sincev0.1.100
log
(
const gpu: {
    name: string;
    vramGb: number;
    nodes: number;
    available: number;
    working: number;
    markets: string[];
    price: ({
        minUsdPerHour: number;
        maxUsdPerHour: number;
    } | null) | null;
}
gpu
.name: stringname, `${
const gpu: {
    name: string;
    vramGb: number;
    nodes: number;
    available: number;
    working: number;
    markets: string[];
    price: ({
        minUsdPerHour: number;
        maxUsdPerHour: number;
    } | null) | null;
}
gpu
.vramGb: numbervramGb} GB`, `${
const gpu: {
    name: string;
    vramGb: number;
    nodes: number;
    available: number;
    working: number;
    markets: string[];
    price: ({
        minUsdPerHour: number;
        maxUsdPerHour: number;
    } | null) | null;
}
gpu
.available: numberavailable} available`, const price: stringprice);
}

Requirement options ​

For each requirement metric: its type, whether it matches as a minimum or exactly, and the values hosts report with how many hosts report each. Pass requirements to describe only the hosts that already meet them, which is how the options narrow as you pick a GPU. Omit metrics to get every metric.

ts
import { 
function createNosanaClient(network: NosanaNetwork | undefined, customConfig: PartialClientConfig & {
    connect: ConnectFactoryConfig & {
        clientSecret: string;
    };
}): NosanaClient & {
    connect: ServerConnect;
} (+3 overloads)
createNosanaClient
,
type NosanaNetwork = "mainnet" | "devnet" | "localnet"
const NosanaNetwork: {
    readonly MAINNET: "mainnet";
    readonly DEVNET: "devnet";
    readonly LOCALNET: "localnet";
}
NosanaNetwork
} from '@nosana/kit';
const const client: NosanaClientclient = function createNosanaClient(network?: NosanaNetwork, customConfig?: PartialClientConfig): NosanaClient (+3 overloads)createNosanaClient(
const NosanaNetwork: {
    readonly MAINNET: "mainnet";
    readonly DEVNET: "devnet";
    readonly LOCALNET: "localnet";
}
NosanaNetwork
.type MAINNET: "mainnet"MAINNET);
// RAM and CUDA options among RTX 4090 hosts const
const options: {
    nodes: number;
    metrics: {
        key: string;
        group: (string | null) | null;
        type: "integer" | "float" | "text" | "boolean" | "json";
        match: "exact" | "minimum";
        perInstance: boolean;
        min?: number;
        max?: number;
        values: {
            value: number | string | boolean;
            nodes: number;
        }[];
    }[];
}
options
= await const client: NosanaClientclient.NosanaClient.api: NosanaApiClientapi.reservations: NosanaReservationsApireservations.NosanaReservationsApi.getRequirementOptions: (request?: NosanaRequirementOptionsRequest) => Promise<NosanaRequirementOptions>
The options for each requirement metric (values and host counts), over the hosts that meet `requirements`. Omit `metrics` for all of them.
getRequirementOptions
({
metrics?: string[] | undefinedmetrics: ['ram_gb', 'cuda_driver_version'],
requirements?: {
    [key: string]: string | number | boolean | (string | number | boolean)[];
} | undefined
requirements
: { name: stringname: 'NVIDIA GeForce RTX 4090' },
}); var console: Console
The `console` module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream. * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) and [`process.stderr`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module. _**Warning**_: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v24.x/api/process.html#a-note-on-process-io) for more information. Example using the global `console`: ```js console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr ``` Example using the `Console` class: ```js const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err ```
@see[source](https://github.com/nodejs/node/blob/v24.x/lib/console.js)
console
.Console.log(message?: any, ...optionalParams: any[]): void (+1 overload)
Prints to `stdout` with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)). ```js const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout ``` See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args) for more information.
@sincev0.1.100
log
(`${
const options: {
    nodes: number;
    metrics: {
        key: string;
        group: (string | null) | null;
        type: "integer" | "float" | "text" | "boolean" | "json";
        match: "exact" | "minimum";
        perInstance: boolean;
        min?: number;
        max?: number;
        values: {
            value: number | string | boolean;
            nodes: number;
        }[];
    }[];
}
options
.nodes: numbernodes} hosts in scope`);
for (const
const metric: {
    key: string;
    group: (string | null) | null;
    type: "integer" | "float" | "text" | "boolean" | "json";
    match: "exact" | "minimum";
    perInstance: boolean;
    min?: number;
    max?: number;
    values: {
        value: number | string | boolean;
        nodes: number;
    }[];
}
metric
of
const options: {
    nodes: number;
    metrics: {
        key: string;
        group: (string | null) | null;
        type: "integer" | "float" | "text" | "boolean" | "json";
        match: "exact" | "minimum";
        perInstance: boolean;
        min?: number;
        max?: number;
        values: {
            value: number | string | boolean;
            nodes: number;
        }[];
    }[];
}
options
.
metrics: {
    key: string;
    group: (string | null) | null;
    type: "integer" | "float" | "text" | "boolean" | "json";
    match: "exact" | "minimum";
    perInstance: boolean;
    min?: number;
    max?: number;
    values: {
        value: number | string | boolean;
        nodes: number;
    }[];
}[]
metrics
) {
var console: Console
The `console` module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream. * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) and [`process.stderr`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module. _**Warning**_: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v24.x/api/process.html#a-note-on-process-io) for more information. Example using the global `console`: ```js console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr ``` Example using the `Console` class: ```js const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err ```
@see[source](https://github.com/nodejs/node/blob/v24.x/lib/console.js)
console
.Console.log(message?: any, ...optionalParams: any[]): void (+1 overload)
Prints to `stdout` with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)). ```js const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout ``` See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args) for more information.
@sincev0.1.100
log
(
const metric: {
    key: string;
    group: (string | null) | null;
    type: "integer" | "float" | "text" | "boolean" | "json";
    match: "exact" | "minimum";
    perInstance: boolean;
    min?: number;
    max?: number;
    values: {
        value: number | string | boolean;
        nodes: number;
    }[];
}
metric
.key: stringkey,
const metric: {
    key: string;
    group: (string | null) | null;
    type: "integer" | "float" | "text" | "boolean" | "json";
    match: "exact" | "minimum";
    perInstance: boolean;
    min?: number;
    max?: number;
    values: {
        value: number | string | boolean;
        nodes: number;
    }[];
}
metric
.match: "exact" | "minimum"
@defaultexact@enum
match
,
const metric: {
    key: string;
    group: (string | null) | null;
    type: "integer" | "float" | "text" | "boolean" | "json";
    match: "exact" | "minimum";
    perInstance: boolean;
    min?: number;
    max?: number;
    values: {
        value: number | string | boolean;
        nodes: number;
    }[];
}
metric
.
values: {
    value: number | string | boolean;
    nodes: number;
}[]
values
.Array<T>.length: number
Gets or sets the length of the array. This is a number one higher than the highest index in the array.
length
);
}

Find available hosts ​

The queued hosts, across every market, that meet a requirement set right now, with the hourly price range of the markets they are in. Prices are the base reward per hour, before the network fee.

ts
import { 
function createNosanaClient(network: NosanaNetwork | undefined, customConfig: PartialClientConfig & {
    connect: ConnectFactoryConfig & {
        clientSecret: string;
    };
}): NosanaClient & {
    connect: ServerConnect;
} (+3 overloads)
createNosanaClient
,
type NosanaNetwork = "mainnet" | "devnet" | "localnet"
const NosanaNetwork: {
    readonly MAINNET: "mainnet";
    readonly DEVNET: "devnet";
    readonly LOCALNET: "localnet";
}
NosanaNetwork
} from '@nosana/kit';
const const client: NosanaClientclient = function createNosanaClient(network?: NosanaNetwork, customConfig?: PartialClientConfig): NosanaClient (+3 overloads)createNosanaClient(
const NosanaNetwork: {
    readonly MAINNET: "mainnet";
    readonly DEVNET: "devnet";
    readonly LOCALNET: "localnet";
}
NosanaNetwork
.type MAINNET: "mainnet"MAINNET);
const
const available: {
    total: number;
    price: ({
        minUsdPerHour: number;
        maxUsdPerHour: number;
    } | null) | null;
    nodes: {
        nodeAddress: string;
        market: string;
    }[];
}
available
= await const client: NosanaClientclient.NosanaClient.api: NosanaApiClientapi.reservations: NosanaReservationsApireservations.NosanaReservationsApi.findAvailable: (request?: NosanaAvailableNodesRequest) => Promise<NosanaAvailableNodes>
The queued hosts that meet `requirements` right now, across every market.
findAvailable
({
requirements?: {
    [key: string]: string | number | boolean | (string | number | boolean)[];
} | undefined
requirements
: { name: stringname: 'NVIDIA GeForce RTX 4090', ram_gb: numberram_gb: 64 },
}); var console: Console
The `console` module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream. * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) and [`process.stderr`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module. _**Warning**_: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v24.x/api/process.html#a-note-on-process-io) for more information. Example using the global `console`: ```js console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr ``` Example using the `Console` class: ```js const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err ```
@see[source](https://github.com/nodejs/node/blob/v24.x/lib/console.js)
console
.Console.log(message?: any, ...optionalParams: any[]): void (+1 overload)
Prints to `stdout` with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)). ```js const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout ``` See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args) for more information.
@sincev0.1.100
log
(`${
const available: {
    total: number;
    price: ({
        minUsdPerHour: number;
        maxUsdPerHour: number;
    } | null) | null;
    nodes: {
        nodeAddress: string;
        market: string;
    }[];
}
available
.total: numbertotal} hosts available now`);
if (
const available: {
    total: number;
    price: ({
        minUsdPerHour: number;
        maxUsdPerHour: number;
    } | null) | null;
    nodes: {
        nodeAddress: string;
        market: string;
    }[];
}
available
.
price: {
    minUsdPerHour: number;
    maxUsdPerHour: number;
} | null
price
) {
var console: Console
The `console` module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream. * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) and [`process.stderr`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module. _**Warning**_: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v24.x/api/process.html#a-note-on-process-io) for more information. Example using the global `console`: ```js console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr ``` Example using the `Console` class: ```js const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err ```
@see[source](https://github.com/nodejs/node/blob/v24.x/lib/console.js)
console
.Console.log(message?: any, ...optionalParams: any[]): void (+1 overload)
Prints to `stdout` with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)). ```js const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout ``` See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args) for more information.
@sincev0.1.100
log
(`$${
const available: {
    total: number;
    price: ({
        minUsdPerHour: number;
        maxUsdPerHour: number;
    } | null) | null;
    nodes: {
        nodeAddress: string;
        market: string;
    }[];
}
available
.
price: {
    minUsdPerHour: number;
    maxUsdPerHour: number;
}
price
.minUsdPerHour: numberminUsdPerHour}/h and up`);
}

Reference ​

MethodHTTPPathDescription
reservations.listGpus()GET/reservations/gpusGPU models in the open markets, with host counts and the hourly price range
reservations.getRequirementOptions(request?)POST/reservations/requirementsRequirement metrics and their values, scoped by requirements
reservations.findAvailable(request?)POST/reservations/availableQueued hosts meeting requirements, with the price range

GET /reservations/requirements?metrics=ram_gb,country returns the same options without a requirement scope, for callers that prefer a query string.

Errors ​

  • 422: a requirement names an unknown metric, or its value has the wrong type.
  • 503: host-manager cannot reach the blockchain indexer it reads queues from. Retry later.

The SDK throws a NosanaApiError carrying the status code in both cases.