docs.mkinf.io Open in urlscan Pro
54.225.169.199  Public Scan

URL: https://docs.mkinf.io/
Submission: On July 20 via api from US — Scanned from GB

Form analysis 0 forms found in the DOM

Text Content

Sorry, we need js to run correctly!
mkinf API v0
Home

More


mkinf API v0

 * Getting started
 * General
   * WelcomeGET
 * VMs
   * Availabilities
   * Operations
   * Disks
   * List VMsGET
   * Get VMGET
   * Create VMPOST
   * Update VMPATCH
   * Terminate VMDELETE
 * Disks
   * Operations
   * List DisksGET
   * Get DiskGET
   * Create DiskPOST
   * Update DiskPATCH
   * Delete DiskDELETE
 * Images
   * List imagesGET
   * Get imageGET
 * Locations
   * List locationsGET
 * VPC
   * Firewall Rules
   * Networks
 * Billing
   * BillingGET
   * UsageGET

Powered by Apidog



GETTING STARTED


API V0 DOCUMENTATION#


GETTING STARTED#

Welcome to mkinf! This guide will help you get started with our GPU on-demand
platform via API. We'll walk you through the process of authentication, listing
available GPUs, create a VM and setup Firewall Rules.


OVERVIEW#

mkinf provides scalable GPU resources on demand, ideal for making inferences of
AI models with variable user base. Through our API, you can manage and deploy
GPU VMs easily, ensuring you have the computational power you need when you need
it.


PRICING#

A40
$1.10 / h
L40s
$1.25 / h
A100 40GB PCIe
$1.60 / h
A100 80GB PCIe
$1.81 / h
A100 80GB SXM
$2.14 / h
Attachable persistent disks
$0.10 / GiB / month


VM SPECIFICATIONS#

Customers can create GPU-enabled VMs with the following specs

TypevCPUGPUMemoryDiskVPC Networka40.1x6-core Intel Xeon (Ice Lake)1x NVIDIA A40
48GB PCIe60GB1x 960GB NVMe25 Gbpsa40.2x12-core Intel Xeon (Ice Lake)2x NVIDIA
A40 48GB PCIe120GB2x 960GB NVMe50 Gbpsa40.4x24-core Intel Xeon (Ice Lake)4x
NVIDIA A40 48GB PCIe240GB4x 960GB NVMe100 Gbpsa40.8x48-core Intel Xeon (Ice
Lake)8x NVIDIA A40 48GB PCIe480GB8x 960GB NVMe200 Gbpsa100.1x12-core Intel Xeon
(Ice Lake)1x NVIDIA A100 40GB PCIe120GB1x 960GB NVMe25 Gbpsa100.2x24-core Intel
Xeon (Ice Lake)2x NVIDIA A100 40GB PCIe240GB2x 960GB NVMe50 Gbpsa100.4x48-core
Intel Xeon (Ice Lake)4x NVIDIA A100 40GB PCIe480GB4x 960GB NVMe100
Gbpsa100.8x96-core Intel Xeon (Ice Lake)8x NVIDIA A100 40GB PCIe960GB8x 960GB
NVMe200 Gbpsa100-80gb.1x12-core Intel Xeon (Ice Lake)1x NVIDIA A100 80GB
PCIe120GB1x 960GB NVMe25 Gbpsa100-80gb.2x24-core Intel Xeon (Ice Lake)2x NVIDIA
A100 80GB PCIe240GB2x 960GB NVMe50 Gbpsa100-80gb.4x48-core Intel Xeon (Ice
Lake)4x NVIDIA A100 80GB PCIe480GB4x 960GB NVMe100 Gbpsa100-80gb.8x96-core Intel
Xeon (Ice Lake)8x NVIDIA A100 80GB PCIe960GB8x 960GB NVMe200
Gbpsl40s-48gb.1x8-core AMD EPYC (Genoa)1x NVIDIA L40S 48GB PCIe147GBN/A20
Gbpsl40s-48gb.2x16-core AMD EPYC (Genoa)2x NVIDIA L40S 48GB PCIe294GBN/A40
Gbpsl40s-48gb.4x32-core AMD EPYC (Genoa)4x NVIDIA L40S 48GB PCIe588GBN/A80
Gbpsl40s-48gb.8x64-core AMD EPYC (Genoa)8x NVIDIA L40S 48GB PCIe1176GBN/A160
Gbpsl40s-48gb.10x80-core AMD EPYC (Genoa)10x NVIDIA L40S 48GB PCIe1470GBN/A200
Gbps


AUTHENTICATION#

To access the mkinf API, you need to authenticate with you Access Key.
Always include the access token in the header of your requests.

GET /v0 HTTP/1.1
Host: api.mkinf.io
Content-Type: application/json
Authorization: Bearer {{access_token}}


SETUP BILLING PROFILE#

Before start using mkinf APIs you need to setup your billing profile.
You can access your billing dashboard using Billing.

GET /v0/billing HTTP/1.1
Host: api.mkinf.io
Authorization: Bearer {{access_token}}

Response: You will receive a temporary URL to your billing dashboard.

{
  "url": "https://billing.stripe.com/p/session/YMal3..."
}

Make sure to insert your payment method.


CHECK AVAILABLE GPUS#

Check for available GPUs using the availability and specs endpoints.


LIST AVAILABILITIES#

Retrieves the available GPUs per region.

GET /v0/availabilities?product_name=l40s-48gb.2x&location=us-east1-a HTTP/1.1
Host: api.mkinf.io
Authorization: Bearer {{access_token}}

{
  "items": [
    {
        "type": "l40s-48gb.2x",
        "location": "us-east1-a",
        "available": true
    },
    ...
  ]
}


LIST SPECS#

Retrieves the available node specs.

GET /v0/specs HTTP/1.1
Host: api.mkinf.io
Authorization: Bearer {{access_token}}

{
  "items": [
    {
        "product_name": "l40s-48gb.2x",
        "description": "NVIDIA L40S",
        "cpu_cores": 16,
        "cpu_type": "vCPU",
        "memory_gb": 294,
        "memory_type": "ram",
        "disk_gb": 256,
        "disk_type": "SSD",
        "num_gpu": 2,
        "gpu_type": "L40S-48GB"
    },
    ...
  ]
}


LAUNCH A VM#

You can create a new VM using the type field to specify the model and amount of
GPU. You need also to pass the location where you want to launch the VM, you can
find all the available locations using the availability or locations endpoints.
Finally you have to pass your ssh_public_key.


1. GENERATE SSH KEY#

ssh-keygen -t rsa -b 4096 -C “your_email@example.com”

This will create a public-private key pair in the .ssh directory.


2. LIST AVAILABLE OS IMAGES#

List and choose your preferred OS image.

GET /v0/images HTTP/1.1
Host: api.mkinf.io
Authorization: Bearer {{access_token}}

Response:

{
  "items": [
    {
      "id": "9abde4b7-15e8-4abd-891c-42242eb3567e",
      "name": "ubuntu22.04-nvidia-pcie-docker",
      "description": "Ubuntu 22.04, NVIDIA Driver 535.x, CUDA 12.0, nvidia-docker",
      "tags": [
        "2023-11-16"
      ],
      "created_at": "2023-11-16T22:02:00Z",
      "locations": [
        "us-northcentral1-a",
        "us-east1-a"
      ]
    }
  ]
}


3. CREATE A VM#

Specify the name, type, location, image and your ssh_public_key

POST /v0/vms HTTP/1.1
Host: api.mkinf.io
Content-Type: application/json
Authorization: Bearer {{access_token}}

{
  "name": "mkinf-node-01",
  "type": "l40s-48gb.2x",
  "location": "us-southcentral1-a",
  "image": "ubuntu22.04-nvidia-pcie-docker"
  "ssh_public_key": "ssh-rsa AAAAB..."
}

You can also specify a startup_script as well as a shutdown_script.

Response: A successful response from this resource will contain the async
operation.

{
  "operation": {
    "operation_id": "a8c24ef2-5b52-41b3-819c-f78f6c2fbff9",
    "state": "IN_PROGRESS",
    "metadata": { ... },
    "result": null,
    "started_at": "2024-06-16T20:12:16Z",
    "completed_at": ""
  }
}


4. CHECK THE VM OPERATION STATUS#

Use the operation_id to check the VM operation status.

GET /v0/vms/operations/{operation_id} HTTP/1.1
Host: api.mkinf.io
Authorization: Bearer {{access_token}}

Response: In a few seconds, the VM should be ready.

{
  "operation_id": "2d8fde0c-4115-462c-9bf3-547d6dae1555",
  "state": "SUCCEEDED",
  "metadata": {
    "operation_name": "CREATE",
    "id": "b3e571f6-c87d-4135-8081-ab219e92544e",
    "type": "vm",
    "request": { ... }
  },
  "result": { ... },
  "started_at": "2024-06-16T15:52:41Z",
  "completed_at": "2024-06-16T15:52:53Z"
}


5. RETRIEVE A VM#

Use metadata.id to retrieve the instance you just created.

GET /v0/vms/{vm_id} HTTP/1.1
Host: api.mkinf.io
Authorization: Bearer {{access_token}}

Response:

{
  "id": "b3e571f6-c87d-4135-8081-ab219e92544e",
  "project_id": "3291380a-19e9-4892-a139-2fa92aa740e2",
  "type": "l40s-48gb.1x",
  "state": "STATE_RUNNING",
  "ssh_destination": ":0",
  "created_at": "2024-06-16T15:52:41Z",
  "updated_at": "2024-06-16T15:52:53Z",
  "name": "mkinf-node",
  "location": "us-east1-a",
  "commitment_period": 0,
  "commitment_end": "",
  "disks": [
    {
      "id": "52822513-e425-4be9-8dd8-5c21d561ce11",
      "name": "OS-disk-b3e571f6-c87d-4135-8081-ab219e92544e",
      "type": "persistent-ssd",
      "size": "128GiB",
      "location": "vaeq-cu",
      "block_size": 0,
      "created_at": "2024-06-16T15:52:43Z",
      "updated_at": "2024-06-16T15:52:44Z",
      "serial_number": "B74EEFE8EFA0988490E",
      "attachment_type": "os",
      "mode": "read-write"
    }
  ],
  "network_interfaces": [
    {
      "id": "fdf58fb1-0185-40f2-aa20-b620e8a8562d",
      "name": "default-network-interface",
      "network": "695b751c-2eaa-4e8b-8eb2-84cb367a69fe",
      "subnet": "7ceecd34-2631-4857-ad82-ceb9dfd09425",
      "interface_type": "Ethernet",
      "mac_address": "2e:2f:ae:ef:ae:16",
      "ips": [
        {
          "private_ipv4": {
            "address": "172.27.23.237"
          },
          "public_ipv4": {
            "address": "204.52.24.84",
            "id": "e130674a-c05e-4345-b8a4-7928c6649574",
            "type": "dynamic"
          }
        }
      ]
    }
  ],
  "host_channel_adapters": [],
  "virtualization_features": {
    "nested_virtualization": false
  },
  "instance_template_id": "",
  "instance_group_id": "",
  "reservation_id": ""
}


6. SSH CONNECTION#

Use the IP address to connect to your instance via SSH.

ssh -i ~/.ssh/YOUR_PRIVATE_KEY user@INSTANCE_IP_ADDRESS

Replace YOUR_PRIVATE_KEY with the path to your private SSH key and
INSTANCE_IP_ADDRESS with the IP address of your instance (public_ipv4.address).


7. DEALLOCATE INSTANCES OR CLOSE CLUSTER#

When you don't need an instance anymore you can terminate it.


FIREWALL RULES#

Setup your VPC Firewall Rules to have desidered access to VMs.

POST /v0/vpc/firewall-rules HTTP/1.1
Host: api.mkinf.io
Content-Type: application/json
Authorization: Bearer {{access_token}}

{
  "name": "mkinf-allow-tcp-udp",
  "action": "allow",
  "destinations": [
    {
      "resource_id": "75dbe735-17d6-4544-91f3-0f93c2c1c903"
    }
  ],
  "direction": "ingress",
  "protocols": [
    "tcp",
    "udp"
  ],
  "sources": [
    {
      "cidr": "0.0.0.0/0"
    }
  ],
  "vpc_network_id": "695b751c-2eaa-4e8b-8eb2-84cb367a69fe"
}

Use List Networks to retrieve your vpc_network_id and List VMs to retrieve your
VM id and set it as resource_id.


USAGE#

You can use Usage to retreives the products usage. Usage is updated daily
shortly after midnight UTC.


ADDITIONAL TIPS#

API Documentation: Refer to the detailed API documentation for more advanced
features and configurations.

Support: Contact mkinf support for any issues or questions regarding API usage
at info@mkinf.io.

Modified at 9 days ago
CloneExport

My Apidog
API v0 documentation
Getting Started
Overview
Pricing
VM specifications
Authentication
Setup Billing Profile
Check available GPUs
List availabilities
List specs
Launch a VM
1. Generate SSH Key
2. List available OS images
3. Create a VM
4. Check the VM operation status
5. Retrieve a VM
6. SSH Connection
7. Deallocate instances or close cluster
Firewall Rules
Usage
Additional Tips