NetMind Power Documentation
  • NetMind Account
  • Inference
    • Model APIs
    • Dedicated Endpoints
  • Fine-tuning
  • Rent GPUs
    • Cloud Sync
    • Use Ngrok as Ingress Service
  • Rent Cluster (Comming soon)
  • API
    • API token
    • Files
    • Fine-tuning
      • List Models
      • Preparing your dataset
      • Create Job
      • Retrieve job
      • Download model
      • Cancel job
      • Deploy Checkpoint (coming soon)
    • Inference
      • Chat
      • Images
      • Haiper Inference
      • Asynchronous Inference
      • Dedicated Endpoints
      • Batch Processing
      • Embedding API
      • Deprecated Models
    • Rent GPU
      • SSH Authentication
      • List Available images
      • List Available GPU Instances
      • Create Your First Environment
      • Stop GPU instace
    • API Reference
      • Files
      • Fine-tuning
      • Rent GPU
Powered by GitBook
On this page

Was this helpful?

  1. API
  2. Rent GPU

Create Your First Environment

Next, you can create a environment by specifying the "authentication ID", "image ID" and "instance node name". You can configure additional resources such as CPU, memory, and storage, After the request is submitted, the user must wait for some time, and the instance creation progress can be monitored through a separate query API.

Example Request:

Replace {{API_TOKEN}} with your actual token.

For the "payment_type" parameter, there are three options:

  • 1 represents USD

  • 2 represents NMT

  • 3 represents CNY

curl --location 'https://api.netmind.ai/v1/rentgpu/containers' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{API_TOKEN}}' \
--data '
{
  "name": "demo_test",
  "auth_id": 0,
  "gpu": 1,
  "node_name": "...",
  "image_template_id": 1,
  "payment_type": 0
}'
import requests
import json

url = "https://api.netmind.ai/v1/rentgpu/containers"

payload = json.dumps({
  "name": "demo_test",
  "auth_id": 0,
  "gpu": 1,
  "node_name": "...",
  "image_template_id": 0,
  "payment_type": 0
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer {{API_TOKEN}}'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Example Response:

{
    "name": "demo_test",
    "auth_id": 0,
    "gpu": 1,
    "node_name": "...",
    "type": 0,
    "image_template_id": 1,
    "enable_vscode": false,
    "enable_jupyter": false,
    "cpu": 20,
    "disk_size": 300,
    "memory": 40,
    "gpu_name": "NVIDIA_GeForce_RTX_3090",
    "id": 0,
    "ssh": null,
    "status": "PENDING",
    "exposed_service": null,
    "vscode_service": null,
    "jupyter_service": null
}
PreviousList Available GPU InstancesNextStop GPU instace

Last updated 5 months ago

Was this helpful?