Create a compute image from a disk image URL.
curl --request POST \
--url https://api.example.com/api/v1/organizations/{organizationID}/regions/{regionID}/images \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"name": "ubu2204-v1.25.6-gpu-525.85.05-7ced4154"
},
"spec": {
"uri": "https://example.com/buckets/myimages/ubu2204-v1.25.6-gpu-525.85.05-7ced4154.raw",
"architecture": "x86_64",
"virtualization": "virtualized",
"os": {
"kernel": "linux",
"family": "debian",
"distro": "ubuntu",
"variant": "server",
"codename": "noble",
"version": "24.04"
},
"softwareVersions": {
"kubernetes": "v1.25.6"
},
"gpu": {
"vendor": "NVIDIA",
"driver": "525.85.05",
"models": [
"A100",
"H100",
"H200"
]
}
}
}
'import requests
url = "https://api.example.com/api/v1/organizations/{organizationID}/regions/{regionID}/images"
payload = {
"metadata": { "name": "ubu2204-v1.25.6-gpu-525.85.05-7ced4154" },
"spec": {
"uri": "https://example.com/buckets/myimages/ubu2204-v1.25.6-gpu-525.85.05-7ced4154.raw",
"architecture": "x86_64",
"virtualization": "virtualized",
"os": {
"kernel": "linux",
"family": "debian",
"distro": "ubuntu",
"variant": "server",
"codename": "noble",
"version": "24.04"
},
"softwareVersions": { "kubernetes": "v1.25.6" },
"gpu": {
"vendor": "NVIDIA",
"driver": "525.85.05",
"models": ["A100", "H100", "H200"]
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
metadata: {name: 'ubu2204-v1.25.6-gpu-525.85.05-7ced4154'},
spec: {
uri: 'https://example.com/buckets/myimages/ubu2204-v1.25.6-gpu-525.85.05-7ced4154.raw',
architecture: 'x86_64',
virtualization: 'virtualized',
os: {
kernel: 'linux',
family: 'debian',
distro: 'ubuntu',
variant: 'server',
codename: 'noble',
version: '24.04'
},
softwareVersions: {kubernetes: 'v1.25.6'},
gpu: {vendor: 'NVIDIA', driver: '525.85.05', models: ['A100', 'H100', 'H200']}
}
})
};
fetch('https://api.example.com/api/v1/organizations/{organizationID}/regions/{regionID}/images', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/organizations/{organizationID}/regions/{regionID}/images",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'metadata' => [
'name' => 'ubu2204-v1.25.6-gpu-525.85.05-7ced4154'
],
'spec' => [
'uri' => 'https://example.com/buckets/myimages/ubu2204-v1.25.6-gpu-525.85.05-7ced4154.raw',
'architecture' => 'x86_64',
'virtualization' => 'virtualized',
'os' => [
'kernel' => 'linux',
'family' => 'debian',
'distro' => 'ubuntu',
'variant' => 'server',
'codename' => 'noble',
'version' => '24.04'
],
'softwareVersions' => [
'kubernetes' => 'v1.25.6'
],
'gpu' => [
'vendor' => 'NVIDIA',
'driver' => '525.85.05',
'models' => [
'A100',
'H100',
'H200'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/organizations/{organizationID}/regions/{regionID}/images"
payload := strings.NewReader("{\n \"metadata\": {\n \"name\": \"ubu2204-v1.25.6-gpu-525.85.05-7ced4154\"\n },\n \"spec\": {\n \"uri\": \"https://example.com/buckets/myimages/ubu2204-v1.25.6-gpu-525.85.05-7ced4154.raw\",\n \"architecture\": \"x86_64\",\n \"virtualization\": \"virtualized\",\n \"os\": {\n \"kernel\": \"linux\",\n \"family\": \"debian\",\n \"distro\": \"ubuntu\",\n \"variant\": \"server\",\n \"codename\": \"noble\",\n \"version\": \"24.04\"\n },\n \"softwareVersions\": {\n \"kubernetes\": \"v1.25.6\"\n },\n \"gpu\": {\n \"vendor\": \"NVIDIA\",\n \"driver\": \"525.85.05\",\n \"models\": [\n \"A100\",\n \"H100\",\n \"H200\"\n ]\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/organizations/{organizationID}/regions/{regionID}/images")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {\n \"name\": \"ubu2204-v1.25.6-gpu-525.85.05-7ced4154\"\n },\n \"spec\": {\n \"uri\": \"https://example.com/buckets/myimages/ubu2204-v1.25.6-gpu-525.85.05-7ced4154.raw\",\n \"architecture\": \"x86_64\",\n \"virtualization\": \"virtualized\",\n \"os\": {\n \"kernel\": \"linux\",\n \"family\": \"debian\",\n \"distro\": \"ubuntu\",\n \"variant\": \"server\",\n \"codename\": \"noble\",\n \"version\": \"24.04\"\n },\n \"softwareVersions\": {\n \"kubernetes\": \"v1.25.6\"\n },\n \"gpu\": {\n \"vendor\": \"NVIDIA\",\n \"driver\": \"525.85.05\",\n \"models\": [\n \"A100\",\n \"H100\",\n \"H200\"\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/organizations/{organizationID}/regions/{regionID}/images")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metadata\": {\n \"name\": \"ubu2204-v1.25.6-gpu-525.85.05-7ced4154\"\n },\n \"spec\": {\n \"uri\": \"https://example.com/buckets/myimages/ubu2204-v1.25.6-gpu-525.85.05-7ced4154.raw\",\n \"architecture\": \"x86_64\",\n \"virtualization\": \"virtualized\",\n \"os\": {\n \"kernel\": \"linux\",\n \"family\": \"debian\",\n \"distro\": \"ubuntu\",\n \"variant\": \"server\",\n \"codename\": \"noble\",\n \"version\": \"24.04\"\n },\n \"softwareVersions\": {\n \"kubernetes\": \"v1.25.6\"\n },\n \"gpu\": {\n \"vendor\": \"NVIDIA\",\n \"driver\": \"525.85.05\",\n \"models\": [\n \"A100\",\n \"H100\",\n \"H200\"\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"metadata": {
"id": "a64f9269-36e0-4312-b8d1-52d93d569b7b",
"name": "ubu2204-v1.25.6-gpu-525.85.05-7ced4154",
"creationTime": "2023-02-22T12:04:13Z"
},
"spec": {
"architecture": "x86_64",
"sizeGiB": 10,
"virtualization": "virtualized",
"os": {
"kernel": "linux",
"family": "debian",
"distro": "ubuntu",
"variant": "server",
"codename": "noble",
"version": "24.04"
},
"softwareVersions": {
"kubernetes": "v1.25.6"
},
"gpu": {
"vendor": "NVIDIA",
"driver": "525.85.05",
"models": [
"A100",
"H100",
"H200"
]
}
},
"status": {
"state": "ready"
}
}{
"error": "access_denied",
"error_description": "authentication failed",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}{
"error": "forbidden",
"error_description": "user credentials do not have the required privileges",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}{
"error": "not_found",
"error_description": "the requested resource does not exist",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}{
"error": "unprocessable_content",
"error_description": "the request body was in the wrong format",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}{
"error": "server_error",
"error_description": "failed to token claim",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}Images
Create a compute image from a disk image URL.
Create a compute image from a public URL. Only raw images are supported, other container formats such as qcow2 must be first converted to a raw image.
POST
/
api
/
v1
/
organizations
/
{organizationID}
/
regions
/
{regionID}
/
images
Create a compute image from a disk image URL.
curl --request POST \
--url https://api.example.com/api/v1/organizations/{organizationID}/regions/{regionID}/images \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"name": "ubu2204-v1.25.6-gpu-525.85.05-7ced4154"
},
"spec": {
"uri": "https://example.com/buckets/myimages/ubu2204-v1.25.6-gpu-525.85.05-7ced4154.raw",
"architecture": "x86_64",
"virtualization": "virtualized",
"os": {
"kernel": "linux",
"family": "debian",
"distro": "ubuntu",
"variant": "server",
"codename": "noble",
"version": "24.04"
},
"softwareVersions": {
"kubernetes": "v1.25.6"
},
"gpu": {
"vendor": "NVIDIA",
"driver": "525.85.05",
"models": [
"A100",
"H100",
"H200"
]
}
}
}
'import requests
url = "https://api.example.com/api/v1/organizations/{organizationID}/regions/{regionID}/images"
payload = {
"metadata": { "name": "ubu2204-v1.25.6-gpu-525.85.05-7ced4154" },
"spec": {
"uri": "https://example.com/buckets/myimages/ubu2204-v1.25.6-gpu-525.85.05-7ced4154.raw",
"architecture": "x86_64",
"virtualization": "virtualized",
"os": {
"kernel": "linux",
"family": "debian",
"distro": "ubuntu",
"variant": "server",
"codename": "noble",
"version": "24.04"
},
"softwareVersions": { "kubernetes": "v1.25.6" },
"gpu": {
"vendor": "NVIDIA",
"driver": "525.85.05",
"models": ["A100", "H100", "H200"]
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
metadata: {name: 'ubu2204-v1.25.6-gpu-525.85.05-7ced4154'},
spec: {
uri: 'https://example.com/buckets/myimages/ubu2204-v1.25.6-gpu-525.85.05-7ced4154.raw',
architecture: 'x86_64',
virtualization: 'virtualized',
os: {
kernel: 'linux',
family: 'debian',
distro: 'ubuntu',
variant: 'server',
codename: 'noble',
version: '24.04'
},
softwareVersions: {kubernetes: 'v1.25.6'},
gpu: {vendor: 'NVIDIA', driver: '525.85.05', models: ['A100', 'H100', 'H200']}
}
})
};
fetch('https://api.example.com/api/v1/organizations/{organizationID}/regions/{regionID}/images', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/organizations/{organizationID}/regions/{regionID}/images",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'metadata' => [
'name' => 'ubu2204-v1.25.6-gpu-525.85.05-7ced4154'
],
'spec' => [
'uri' => 'https://example.com/buckets/myimages/ubu2204-v1.25.6-gpu-525.85.05-7ced4154.raw',
'architecture' => 'x86_64',
'virtualization' => 'virtualized',
'os' => [
'kernel' => 'linux',
'family' => 'debian',
'distro' => 'ubuntu',
'variant' => 'server',
'codename' => 'noble',
'version' => '24.04'
],
'softwareVersions' => [
'kubernetes' => 'v1.25.6'
],
'gpu' => [
'vendor' => 'NVIDIA',
'driver' => '525.85.05',
'models' => [
'A100',
'H100',
'H200'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/organizations/{organizationID}/regions/{regionID}/images"
payload := strings.NewReader("{\n \"metadata\": {\n \"name\": \"ubu2204-v1.25.6-gpu-525.85.05-7ced4154\"\n },\n \"spec\": {\n \"uri\": \"https://example.com/buckets/myimages/ubu2204-v1.25.6-gpu-525.85.05-7ced4154.raw\",\n \"architecture\": \"x86_64\",\n \"virtualization\": \"virtualized\",\n \"os\": {\n \"kernel\": \"linux\",\n \"family\": \"debian\",\n \"distro\": \"ubuntu\",\n \"variant\": \"server\",\n \"codename\": \"noble\",\n \"version\": \"24.04\"\n },\n \"softwareVersions\": {\n \"kubernetes\": \"v1.25.6\"\n },\n \"gpu\": {\n \"vendor\": \"NVIDIA\",\n \"driver\": \"525.85.05\",\n \"models\": [\n \"A100\",\n \"H100\",\n \"H200\"\n ]\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/organizations/{organizationID}/regions/{regionID}/images")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {\n \"name\": \"ubu2204-v1.25.6-gpu-525.85.05-7ced4154\"\n },\n \"spec\": {\n \"uri\": \"https://example.com/buckets/myimages/ubu2204-v1.25.6-gpu-525.85.05-7ced4154.raw\",\n \"architecture\": \"x86_64\",\n \"virtualization\": \"virtualized\",\n \"os\": {\n \"kernel\": \"linux\",\n \"family\": \"debian\",\n \"distro\": \"ubuntu\",\n \"variant\": \"server\",\n \"codename\": \"noble\",\n \"version\": \"24.04\"\n },\n \"softwareVersions\": {\n \"kubernetes\": \"v1.25.6\"\n },\n \"gpu\": {\n \"vendor\": \"NVIDIA\",\n \"driver\": \"525.85.05\",\n \"models\": [\n \"A100\",\n \"H100\",\n \"H200\"\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/organizations/{organizationID}/regions/{regionID}/images")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metadata\": {\n \"name\": \"ubu2204-v1.25.6-gpu-525.85.05-7ced4154\"\n },\n \"spec\": {\n \"uri\": \"https://example.com/buckets/myimages/ubu2204-v1.25.6-gpu-525.85.05-7ced4154.raw\",\n \"architecture\": \"x86_64\",\n \"virtualization\": \"virtualized\",\n \"os\": {\n \"kernel\": \"linux\",\n \"family\": \"debian\",\n \"distro\": \"ubuntu\",\n \"variant\": \"server\",\n \"codename\": \"noble\",\n \"version\": \"24.04\"\n },\n \"softwareVersions\": {\n \"kubernetes\": \"v1.25.6\"\n },\n \"gpu\": {\n \"vendor\": \"NVIDIA\",\n \"driver\": \"525.85.05\",\n \"models\": [\n \"A100\",\n \"H100\",\n \"H200\"\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"metadata": {
"id": "a64f9269-36e0-4312-b8d1-52d93d569b7b",
"name": "ubu2204-v1.25.6-gpu-525.85.05-7ced4154",
"creationTime": "2023-02-22T12:04:13Z"
},
"spec": {
"architecture": "x86_64",
"sizeGiB": 10,
"virtualization": "virtualized",
"os": {
"kernel": "linux",
"family": "debian",
"distro": "ubuntu",
"variant": "server",
"codename": "noble",
"version": "24.04"
},
"softwareVersions": {
"kubernetes": "v1.25.6"
},
"gpu": {
"vendor": "NVIDIA",
"driver": "525.85.05",
"models": [
"A100",
"H100",
"H200"
]
}
},
"status": {
"state": "ready"
}
}{
"error": "access_denied",
"error_description": "authentication failed",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}{
"error": "forbidden",
"error_description": "user credentials do not have the required privileges",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}{
"error": "not_found",
"error_description": "the requested resource does not exist",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}{
"error": "unprocessable_content",
"error_description": "the request body was in the wrong format",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}{
"error": "server_error",
"error_description": "failed to token claim",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}Authorizations
Operation requires OAuth 2.0 bearer token authentication.
Path Parameters
An organization ID.
The region ID. A region ID.
Body
application/json
A request to create an image.
Response
An image that can be used on this platform.
An image.
This metadata is for resources that just exist, and don't require any provisioning and health status, but benefit from a standardized metadata format.
Show child attributes
Show child attributes
An image.
Show child attributes
Show child attributes
The image's status.
Show child attributes
Show child attributes
Was this page helpful?
⌘I