Welcome to the documentation for the NOSGPU API. This documentation serves as a comprehensive guide for developers looking to integrate with our platform. By leveraging our API, developers can seamlessly integrate NOSGPU functionalities into their applications.
To begin utilizing our API, developers need to familiarize themselves with the endpoints and authentication mechanisms provided. Below, you'll find essential information to get started:
https://api.nosgpu.ch/sandbox/v1https://api.nosgpu.ch/v1The examples use the production API. To use the sandbox, replace the production base URL with the sandbox base URL.
To access the NOSGPU API, authentication via API KEY is required. Follow the steps below to obtain your API KEY:
SSH public keys can only be added through the website, not through the public API. Register your key before creating an instance with the API.
Retrieve current wallet balance and currency.
const API_KEY = 'YOUR_BEARER_API_KEY';
const URL = 'https://api.nosgpu.ch/v1/account/balance';
fetch(URL, {
method: 'GET',
headers: {
'Authorization': 'Bearer ' + API_KEY,
'Content-Type': 'application/json'
}
})
.then(async (response) => {
const data = await response.json();
if (!response.ok) {
throw new Error(JSON.stringify(data));
}
console.log('Balance:', data.balance);
console.log('Currency:', data.currency);
})
.catch((error) => {
console.error('Error fetching balance:', error.message);
});
GET
API URL: https://api.nosgpu.ch/v1/account/balance
Authorization: required - Bearer token
Content-Type: optional - application/json
Response success
{
// current user balance
"balance": number,
"currency": {
// currency code
"code": 'USD'|'EUR'|'GBP'|'CHF',
// currency symbol
"symbol": '$'|'€'|'£'|'CHF'|null
}
}
Unauthorized- Verify that your bearer token is correct
This API returns all rentable instance packages grouped by category, including availability, hardware resources, operating systems, templates and prices.
const API_KEY = 'YOUR_BEARER_API_KEY';
const URL = 'https://api.nosgpu.ch/v1/catalog/packages';
fetch(URL, {
method: 'GET',
headers: {
'Authorization': 'Bearer ' + API_KEY,
'Content-Type': 'application/json'
}
})
.then(async (response) => {
const data = await response.json();
if (!response.ok) {
throw new Error(JSON.stringify(data));
}
console.log('Categories:', data.categories);
console.log('Currency:', data.currency);
})
.catch((error) => {
console.error('Error fetching catalog packages:', error.message);
});
GET
API URL: https://api.nosgpu.ch/v1/catalog/packages
Authorization: required - Bearer token
Content-Type: optional - application/json
Response success
{
"categories": {
"vm_gpu_dedicated": {
"packages": [
{
// package id
"id": number,
"availability": {
// 1 if package is available, 0 otherwise
"available": 0|1,
// availability reason if not available
"reason": string|null
},
"cpu": {
// cpu brand
"brand": string|null,
// cpu model name
"name": string|null,
// number of cpu cores
"cores": number|null
},
"ram": {
// ram quantity
"quantity": string|null,
// ram unit
"unit": 'GB'
},
"disk": {
// disk type
"type": string|null,
// disk quantity
"quantity": number|null,
// disk unit
"unit": 'GB'
},
"gpu": {
// gpu brand
"brand": string|null,
// gpu model name
"name": string|null,
// gpu vram quantity
"vram_quantity": string|null,
// gpu vram unit
"vram_unit": 'GB',
// dedicated gpu quantity for dedicated packages
"quantity"?: number,
// shared gpu slice quantity for shared packages
"slice_quantity"?: number,
// total slice quantity available on source gpu
"slice_quantity_of"?: number|null,
// source gpu total vram quantity for shared packages
"vram_quantity_of"?: string|null
},
"os": [
{
// operating system brand
"brand": string,
// operating system version
"version": string,
"templates": [
{
// image id used when creating an instance
"image_id": number,
// template name
"name": string
}
]
}
],
// package tag
"tag": string,
"price": {
// billing unit
"unit": 'h'|'m',
// billing amount
"amount": number
}
}
]
},
"vm_gpu_shared": {
"packages": array
},
"bare_metal": {
"packages": array
},
"cold_storage": {
"packages": array
},
"ai_storage": {
"packages": array
}
},
"currency": {
// account currency code
"code": 'EUR'|'CHF'|'USD',
// currency symbol
"symbol": string|null
}
}
Unauthorized- Verify that your bearer token is correct
This API creates a new GPU instance using the selected package, image and SSH key.
const API_KEY = 'YOUR_BEARER_API_KEY';
const URL = 'https://api.nosgpu.ch/v1/instances/create';
fetch(URL, {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
package_id: 1, // API GET https://api.nosgpu.ch/v1/catalog/packages: categories[category].packages[].id
image_id: 1, // API GET https://api.nosgpu.ch/v1/catalog/packages: categories[category].packages[].os[].templates[].image_id (selected package)
ssh_key_id: 1 // Website only: add your public key at https://www.nosgpu.ch/dashboard/account/ssh-key and copy its ID
})
})
.then(async (response) => {
const data = await response.json();
if (!response.ok) {
throw new Error(JSON.stringify(data));
}
// Success
console.log('Instance created:', data.instance);
console.log('My updated wallet balance:', data.wallet);
})
.catch((error) => {
console.error('Error during creation:', error.message);
});
POST
API URL: https://api.nosgpu.ch/v1/instances/create
Authorization: required - Bearer token
Content-Type: required - application/json
package_id: required - package ID from the JSON response to GET https://api.nosgpu.ch/v1/catalog/packages: categories[category].packages[].id.
image_id: required - OS template ID from the same catalog response: categories[category].packages[].os[].templates[].image_id. Choose a template belonging to the selected package.
ssh_key_id: required - saved SSH key ID from the website's SSH keys page. Add the public key on that page first, then copy its ID as described in SSH keys: website setup.
Here, category is a category name from the response (for example vm_gpu_dedicated), and [] means an element of an array. These are paths inside the JSON response, not URLs. The value 1 in the examples is a placeholder for each ID.
Response success
{
"instance": {
// your account id
"user_id": number,
// package id
"package_id": number,
// hypervisor id
"hypervisor_id": number,
// template id
"image_id": number,
// instance type id
"type": number,
// instance status code
"status": 'provisioning'|'running'|'stopped'|'error'|'deleting'|'deleted'|'expired',
// UTC date time
"updated_at": string,
// UTC date time
"created_at": string,
// instance id
"id": number,
// instance name
"name": string
},
"wallet": {
// your credit after instance creation
"balance": number,
"currency": {
// account/user currency code
"code": 'EUR'|'CHF'|'USD',
// currency symbol if available
"symbol": string|null
}
}
}
Unauthorized- Verify that your bearer token is correct
Payment Required- Insufficient wallet balance or credits
Validation Error- Invalid request body parameters
This API returns the paginated list of my instances for the authenticated user with filters for category, status and date range, including cost monitoring data.
const API_KEY = 'YOUR_BEARER_API_KEY';
const LIMIT = 5;
const SKIP = 0;
const URL = 'https://api.nosgpu.ch/v1/instances/list/' + LIMIT + '/' + SKIP;
fetch(URL, {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
category: 'all',
status: 'active',
date_from: '2026-02-24',
date_to: '2026-06-05'
})
})
.then(async (response) => {
const data = await response.json();
if (!response.ok) {
throw new Error(JSON.stringify(data));
}
console.log('Instances:', data.instances);
console.log('Total:', data.tot);
console.log('Currency:', data.currency);
})
.catch((error) => {
console.error('Error fetching instances list:', error.message);
});
POST
API URL: https://api.nosgpu.ch/v1/instances/list/{limit}/{skip}
Authorization: required - Bearer token
Content-Type: required - application/json
limit: required - maximum number of instances to return
skip: required - number of records to skip for pagination
category: required - category filter, all, vm_gpu_shared, vm_gpu_dedicated, bare_metal, ai_storage, cold_storage, all_storage, all_vm
status: required - status filter, active, all, stopped, running, delete
date_from: optional - start date filter in format YYYY-MM-DD
date_to: optional - end date filter in format YYYY-MM-DD
Response success
{
"instances": [
{
// instance id
"id": number,
// generated instance name
"name": string,
// instance type id
"type": number,
// instance category
"category": 'vm_gpu_dedicated'|'vm_gpu_shared'|'bare_metal'|'cold_storage'|'ai_storage',
// current instance status
"status": 'provisioning'|'running'|'starting'|'stopped'|'stopping'|'rebooting'|'error'|'deleting'|'deleted'|'expired',
// total accumulated cost
"total_cost": number,
// partial cost in selected filter range
"partial_cost": number,
"price": {
// billing unit
"unit": string,
// price amount for billing unit
"amount": number
}
}
],
// total number of instances matching current filters
"tot": number,
"currency": {
// account currency code
"code": 'EUR'|'CHF'|'USD',
// currency symbol
"symbol": string|null
}
}
Unauthorized- Verify that your bearer token is correct
Validation Error- Invalid filters or pagination parameters
This API returns full details for a specific GPU instance, including status, billing, package resources, network access and authentication info.
const API_KEY = 'YOUR_BEARER_API_KEY';
const INSTANCE_ID = 1;
const URL = 'https://api.nosgpu.ch/v1/instances/' + INSTANCE_ID + '/details';
fetch(URL, {
method: 'GET',
headers: {
'Authorization': 'Bearer ' + API_KEY,
'Content-Type': 'application/json'
}
})
.then(async (response) => {
const data = await response.json();
if (!response.ok) {
throw new Error(JSON.stringify(data));
}
console.log('Instance details:', data.instance);
console.log('Currency:', data.currency);
})
.catch((error) => {
console.error('Error fetching instance details:', error.message);
});
GET
API URL: https://api.nosgpu.ch/v1/instances/{instance_id}/details
Authorization: required - Bearer token
Content-Type: optional - application/json
instance_id: required - instance id
Response success
{
"instance": {
// instance id
"id": number,
// instance name
"name": string,
// instance type id
"type": number,
// category label
"category": 'vm_gpu_dedicated'|'vm_gpu_shared'|'bare_metal'|'cold_storage'|'ai_storage',
// instance status code
"status": 'provisioning'|'running'|'starting'|'stopped'|'stopping'|'rebooting'|'error'|'deleting'|'deleted'|'expired',
// current task state if available
"task_state": string,
// UTC date time when instance started
"started_at": string|null,
"price": {
// billing unit
"unit": string,
// amount for billing unit
"amount": number
},
// accumulated total instance cost
"total_cost": number,
"address": {
// public ip address
"public_ip": string,
// exposed service interface port if available
"interface_port": string|null
},
"auth": {
// auth method
"type": 'ssh',
"value": {
// SSH public key content
"public_key": string,
// SSH key id
"id": number|null,
// SSH key name
"name": string|null
},
// default ssh username if available
"username": string|null
},
"billing": [
{
// negative or positive billing amount
"amount": number,
// UTC date time of billing record
"created_at": string
}
],
"metrics": {
// current metrics snapshot
"current": object|null,
// metrics history list
"history": array
},
"package": {
// package id snapshot
"id": number,
"cpu": {
"brand": string,
"name": string,
"cores": number
},
"ram": {
"quantity": string,
"unit": 'GB'
},
"disk": {
"type": string,
"quantity": number,
"unit": 'GB'
},
"gpu": {
"brand": string,
"name": string,
"vram_quantity": string,
"vram_unit": 'GB',
"slice_quantity": number,
"slice_quantity_of": number|null,
"vram_quantity_of": number|null
},
"os": {
"brand": string,
"version": string,
"template": {
"image_id": number,
"name": string
}
},
"tag": string
}
},
"currency": {
// account/user currency code
"code": 'EUR'|'CHF'|'USD',
// currency symbol if available
"symbol": string|null
}
}
Unauthorized- Verify that your bearer token is correct
Not Found- Instance not found
This API executes an action on a specific instance. Supported actions are start, stop and reboot.
const API_KEY = 'YOUR_BEARER_API_KEY';
const INSTANCE_ID = 1;
const ACTION = 'start'; // start | stop | reboot
const URL = 'https://api.nosgpu.ch/v1/instances/' + INSTANCE_ID + '/' + ACTION;
fetch(URL, {
method: 'PATCH',
headers: {
'Authorization': 'Bearer ' + API_KEY,
'Content-Type': 'application/json'
}
})
.then(async (response) => {
const data = await response.json();
if (!response.ok) {
throw new Error(JSON.stringify(data));
}
console.log('Instance action result:', data.instance);
})
.catch((error) => {
console.error('Error executing instance action:', error.message);
});
PATCH
API URL: https://api.nosgpu.ch/v1/instances/{instance_id}/{action}
Authorization: required - Bearer token
Content-Type: optional - application/json
instance_id: required - instance id
action: required - supported values are start, stopand reboot
Response success
{
"instance": {
// instance id
"id": number,
// generated instance name
"name": string,
// instance category/type label
"type": 'vm_gpu_dedicated'|'vm_gpu_shared'|'bare_metal'|'cold_storage'|'ai_storage',
// current instance status after action
"status": 'provisioning'|'running'|'starting'|'stopped'|'stopping'|'rebooting'|'error'|'deleting'|'deleted'|'expired',
// instance start datetime in UTC if available
"started_at": string|null
}
}
Unauthorized- Verify that your bearer token is correct
Not Found- Instance not found
Conflict- Instance is not ready for this action
This API deletes a specific instance and returns the updated instance status.
Warning: deleting an instance permanently destroys the machine and all data stored on it. This action cannot be undone. Back up any data you need before proceeding.
Deleting the instance stops further credit charges for that instance.
const API_KEY = 'YOUR_BEARER_API_KEY';
const INSTANCE_ID = 1;
const URL = 'https://api.nosgpu.ch/v1/instances/' + INSTANCE_ID;
fetch(URL, {
method: 'DELETE',
headers: {
'Authorization': 'Bearer ' + API_KEY,
'Content-Type': 'application/json'
}
})
.then(async (response) => {
const data = await response.json();
if (!response.ok) {
throw new Error(JSON.stringify(data));
}
console.log('Instance delete result:', data.instance);
})
.catch((error) => {
console.error('Error deleting instance:', error.message);
});
DELETE
API URL: https://api.nosgpu.ch/v1/instances/{instance_id}
Authorization: required - Bearer token
Content-Type: optional - application/json
instance_id: required - instance id
Response success
{
"instance": {
// instance id
"id": number,
// generated instance name
"name": string,
// instance category/type label
"type": 'vm_gpu_dedicated'|'vm_gpu_shared'|'bare_metal'|'cold_storage'|'ai_storage',
// current instance status after delete action
"status": 'provisioning'|'running'|'starting'|'stopped'|'stopping'|'rebooting'|'error'|'deleting'|'deleted'|'expired',
// instance start datetime in UTC if available
"started_at": string|null
}
}
Unauthorized- Verify that your bearer token is correct
Not Found- Instance not found
If you encounter any issues or have questions regarding the NOSGPU API, don't hesitate to reach out to our support team.