Skip to content

Nosana API

Nosana exposes both a REST HTTP API and a typed TypeScript SDK so you can create and manage deployments from whatever environment fits your workflow.

HTTP API

Use the Nosana HTTP API to create and manage deployments from any language or environment that can make HTTPS requests.

Prerequisites

Before calling the API, ensure you have:

  • API key: A valid Nosana API key. See the API key guide.
  • Credits: Sufficient credit balance on your Nosana account to run deployments.
  • Base URL: The current production API base URL:
bash
https://dashboard.k8s.prd.nos.ci/api

Authentication

You can authenticate with the API in two ways:

API Key Authentication

All requests must include your API key as a Bearer token:

bash
curl -H "Authorization: Bearer nos_xxx_your_api_key" ...

If you are using environment variables:

bash
export NOSANA_API_KEY="nos_xxx_your_api_key"

curl -H "Authorization: Bearer $NOSANA_API_KEY" ...

Wallet Authentication

For wallet-based authentication with vault management capabilities, see the Wallet Authentication guide.

API Reference (Swagger)

You can explore all available endpoints and schemas in the interactive Swagger UI:

Use this reference to:

  • Inspect request/response payloads
  • Try out endpoints directly in the browser
  • Generate or validate client code

API Modules

The Nosana API is organized into several modules:

  • Deployments - Create and manage deployments
  • Jobs - Manage individual jobs, extend execution time, stop jobs
  • Markets - Discover GPU markets and check resource requirements
  • Credits - Check your account credit balance
  • Vault Management - Manage vaults for wallet-based deployments

TypeScript SDK

The Nosana TypeScript SDK provides a convenient, typed interface for creating and managing deployments from Node.js or browser environments.

Prerequisites

Before using the SDK, ensure you have:

  • API Key: A valid Nosana API key. See the API key guide.
  • Credits: Sufficient credits in your Nosana account to run deployments.
  • Node.js: A recent LTS version of Node.js is recommended.

Installation

Install the SDK from npm:

bash
npm install @nosana/kit

For more installation options and details, see the Kit Installation Guide.

Initializing the Client

ts
import { createNosanaClient } from '@nosana/kit';

const client = createNosanaClient({
  api: {
    apiKey: process.env.NOSANA_API_KEY as string,
  },
});