curl --request POST \
--url https://api.nebius.cloud/ai/v1/devlabs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"parentId": "<string>",
"id": "<string>",
"labels": {},
"name": "<string>",
"resourceVersion": "<string>"
},
"spec": {
"disk": {
"type": "UNSPECIFIED",
"sizeBytes": "<string>"
},
"platform": "<string>",
"preset": "<string>",
"subnetId": "<string>",
"workspace": {
"containerPath": "<string>"
},
"args": "<string>",
"authTokenMysteryboxSecret": {
"secretId": "<string>",
"versionId": "<string>"
},
"containerCommand": "<string>",
"environmentVariables": [
{
"name": "<string>",
"mysteryboxSecret": {
"secretId": "<string>",
"versionId": "<string>"
},
"value": "<string>"
}
],
"image": "<string>",
"injectedFiles": [
{
"containerPath": "<string>",
"content": "aSDinaTvuI8gbWludGxpZnk="
}
],
"ports": [
{
"protocol": "PROTOCOL_UNSPECIFIED",
"containerPort": 123,
"hostPort": 123
}
],
"primaryRoute": {
"containerPort": 123
},
"publicIp": true,
"registryCredentials": {
"mysteryboxSecretVersion": "<string>"
},
"shmSizeBytes": "<string>",
"sshAuthorizedKeys": [
"<string>"
],
"volumes": [
{
"containerPath": "<string>",
"mode": "MODE_UNSPECIFIED",
"source": "<string>",
"sourcePath": "<string>"
}
],
"workingDir": "<string>"
},
"dryRun": true
}
'import requests
url = "https://api.nebius.cloud/ai/v1/devlabs"
payload = {
"metadata": {
"parentId": "<string>",
"id": "<string>",
"labels": {},
"name": "<string>",
"resourceVersion": "<string>"
},
"spec": {
"disk": {
"type": "UNSPECIFIED",
"sizeBytes": "<string>"
},
"platform": "<string>",
"preset": "<string>",
"subnetId": "<string>",
"workspace": { "containerPath": "<string>" },
"args": "<string>",
"authTokenMysteryboxSecret": {
"secretId": "<string>",
"versionId": "<string>"
},
"containerCommand": "<string>",
"environmentVariables": [
{
"name": "<string>",
"mysteryboxSecret": {
"secretId": "<string>",
"versionId": "<string>"
},
"value": "<string>"
}
],
"image": "<string>",
"injectedFiles": [
{
"containerPath": "<string>",
"content": "aSDinaTvuI8gbWludGxpZnk="
}
],
"ports": [
{
"protocol": "PROTOCOL_UNSPECIFIED",
"containerPort": 123,
"hostPort": 123
}
],
"primaryRoute": { "containerPort": 123 },
"publicIp": True,
"registryCredentials": { "mysteryboxSecretVersion": "<string>" },
"shmSizeBytes": "<string>",
"sshAuthorizedKeys": ["<string>"],
"volumes": [
{
"containerPath": "<string>",
"mode": "MODE_UNSPECIFIED",
"source": "<string>",
"sourcePath": "<string>"
}
],
"workingDir": "<string>"
},
"dryRun": True
}
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: {
parentId: '<string>',
id: '<string>',
labels: {},
name: '<string>',
resourceVersion: '<string>'
},
spec: {
disk: {type: 'UNSPECIFIED', sizeBytes: '<string>'},
platform: '<string>',
preset: '<string>',
subnetId: '<string>',
workspace: {containerPath: '<string>'},
args: '<string>',
authTokenMysteryboxSecret: {secretId: '<string>', versionId: '<string>'},
containerCommand: '<string>',
environmentVariables: [
{
name: '<string>',
mysteryboxSecret: {secretId: '<string>', versionId: '<string>'},
value: '<string>'
}
],
image: '<string>',
injectedFiles: [{containerPath: '<string>', content: 'aSDinaTvuI8gbWludGxpZnk='}],
ports: [{protocol: 'PROTOCOL_UNSPECIFIED', containerPort: 123, hostPort: 123}],
primaryRoute: {containerPort: 123},
publicIp: true,
registryCredentials: {mysteryboxSecretVersion: '<string>'},
shmSizeBytes: '<string>',
sshAuthorizedKeys: ['<string>'],
volumes: [
{
containerPath: '<string>',
mode: 'MODE_UNSPECIFIED',
source: '<string>',
sourcePath: '<string>'
}
],
workingDir: '<string>'
},
dryRun: true
})
};
fetch('https://api.nebius.cloud/ai/v1/devlabs', 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.nebius.cloud/ai/v1/devlabs",
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' => [
'parentId' => '<string>',
'id' => '<string>',
'labels' => [
],
'name' => '<string>',
'resourceVersion' => '<string>'
],
'spec' => [
'disk' => [
'type' => 'UNSPECIFIED',
'sizeBytes' => '<string>'
],
'platform' => '<string>',
'preset' => '<string>',
'subnetId' => '<string>',
'workspace' => [
'containerPath' => '<string>'
],
'args' => '<string>',
'authTokenMysteryboxSecret' => [
'secretId' => '<string>',
'versionId' => '<string>'
],
'containerCommand' => '<string>',
'environmentVariables' => [
[
'name' => '<string>',
'mysteryboxSecret' => [
'secretId' => '<string>',
'versionId' => '<string>'
],
'value' => '<string>'
]
],
'image' => '<string>',
'injectedFiles' => [
[
'containerPath' => '<string>',
'content' => 'aSDinaTvuI8gbWludGxpZnk='
]
],
'ports' => [
[
'protocol' => 'PROTOCOL_UNSPECIFIED',
'containerPort' => 123,
'hostPort' => 123
]
],
'primaryRoute' => [
'containerPort' => 123
],
'publicIp' => true,
'registryCredentials' => [
'mysteryboxSecretVersion' => '<string>'
],
'shmSizeBytes' => '<string>',
'sshAuthorizedKeys' => [
'<string>'
],
'volumes' => [
[
'containerPath' => '<string>',
'mode' => 'MODE_UNSPECIFIED',
'source' => '<string>',
'sourcePath' => '<string>'
]
],
'workingDir' => '<string>'
],
'dryRun' => true
]),
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.nebius.cloud/ai/v1/devlabs"
payload := strings.NewReader("{\n \"metadata\": {\n \"parentId\": \"<string>\",\n \"id\": \"<string>\",\n \"labels\": {},\n \"name\": \"<string>\",\n \"resourceVersion\": \"<string>\"\n },\n \"spec\": {\n \"disk\": {\n \"type\": \"UNSPECIFIED\",\n \"sizeBytes\": \"<string>\"\n },\n \"platform\": \"<string>\",\n \"preset\": \"<string>\",\n \"subnetId\": \"<string>\",\n \"workspace\": {\n \"containerPath\": \"<string>\"\n },\n \"args\": \"<string>\",\n \"authTokenMysteryboxSecret\": {\n \"secretId\": \"<string>\",\n \"versionId\": \"<string>\"\n },\n \"containerCommand\": \"<string>\",\n \"environmentVariables\": [\n {\n \"name\": \"<string>\",\n \"mysteryboxSecret\": {\n \"secretId\": \"<string>\",\n \"versionId\": \"<string>\"\n },\n \"value\": \"<string>\"\n }\n ],\n \"image\": \"<string>\",\n \"injectedFiles\": [\n {\n \"containerPath\": \"<string>\",\n \"content\": \"aSDinaTvuI8gbWludGxpZnk=\"\n }\n ],\n \"ports\": [\n {\n \"protocol\": \"PROTOCOL_UNSPECIFIED\",\n \"containerPort\": 123,\n \"hostPort\": 123\n }\n ],\n \"primaryRoute\": {\n \"containerPort\": 123\n },\n \"publicIp\": true,\n \"registryCredentials\": {\n \"mysteryboxSecretVersion\": \"<string>\"\n },\n \"shmSizeBytes\": \"<string>\",\n \"sshAuthorizedKeys\": [\n \"<string>\"\n ],\n \"volumes\": [\n {\n \"containerPath\": \"<string>\",\n \"mode\": \"MODE_UNSPECIFIED\",\n \"source\": \"<string>\",\n \"sourcePath\": \"<string>\"\n }\n ],\n \"workingDir\": \"<string>\"\n },\n \"dryRun\": true\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.nebius.cloud/ai/v1/devlabs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {\n \"parentId\": \"<string>\",\n \"id\": \"<string>\",\n \"labels\": {},\n \"name\": \"<string>\",\n \"resourceVersion\": \"<string>\"\n },\n \"spec\": {\n \"disk\": {\n \"type\": \"UNSPECIFIED\",\n \"sizeBytes\": \"<string>\"\n },\n \"platform\": \"<string>\",\n \"preset\": \"<string>\",\n \"subnetId\": \"<string>\",\n \"workspace\": {\n \"containerPath\": \"<string>\"\n },\n \"args\": \"<string>\",\n \"authTokenMysteryboxSecret\": {\n \"secretId\": \"<string>\",\n \"versionId\": \"<string>\"\n },\n \"containerCommand\": \"<string>\",\n \"environmentVariables\": [\n {\n \"name\": \"<string>\",\n \"mysteryboxSecret\": {\n \"secretId\": \"<string>\",\n \"versionId\": \"<string>\"\n },\n \"value\": \"<string>\"\n }\n ],\n \"image\": \"<string>\",\n \"injectedFiles\": [\n {\n \"containerPath\": \"<string>\",\n \"content\": \"aSDinaTvuI8gbWludGxpZnk=\"\n }\n ],\n \"ports\": [\n {\n \"protocol\": \"PROTOCOL_UNSPECIFIED\",\n \"containerPort\": 123,\n \"hostPort\": 123\n }\n ],\n \"primaryRoute\": {\n \"containerPort\": 123\n },\n \"publicIp\": true,\n \"registryCredentials\": {\n \"mysteryboxSecretVersion\": \"<string>\"\n },\n \"shmSizeBytes\": \"<string>\",\n \"sshAuthorizedKeys\": [\n \"<string>\"\n ],\n \"volumes\": [\n {\n \"containerPath\": \"<string>\",\n \"mode\": \"MODE_UNSPECIFIED\",\n \"source\": \"<string>\",\n \"sourcePath\": \"<string>\"\n }\n ],\n \"workingDir\": \"<string>\"\n },\n \"dryRun\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nebius.cloud/ai/v1/devlabs")
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 \"parentId\": \"<string>\",\n \"id\": \"<string>\",\n \"labels\": {},\n \"name\": \"<string>\",\n \"resourceVersion\": \"<string>\"\n },\n \"spec\": {\n \"disk\": {\n \"type\": \"UNSPECIFIED\",\n \"sizeBytes\": \"<string>\"\n },\n \"platform\": \"<string>\",\n \"preset\": \"<string>\",\n \"subnetId\": \"<string>\",\n \"workspace\": {\n \"containerPath\": \"<string>\"\n },\n \"args\": \"<string>\",\n \"authTokenMysteryboxSecret\": {\n \"secretId\": \"<string>\",\n \"versionId\": \"<string>\"\n },\n \"containerCommand\": \"<string>\",\n \"environmentVariables\": [\n {\n \"name\": \"<string>\",\n \"mysteryboxSecret\": {\n \"secretId\": \"<string>\",\n \"versionId\": \"<string>\"\n },\n \"value\": \"<string>\"\n }\n ],\n \"image\": \"<string>\",\n \"injectedFiles\": [\n {\n \"containerPath\": \"<string>\",\n \"content\": \"aSDinaTvuI8gbWludGxpZnk=\"\n }\n ],\n \"ports\": [\n {\n \"protocol\": \"PROTOCOL_UNSPECIFIED\",\n \"containerPort\": 123,\n \"hostPort\": 123\n }\n ],\n \"primaryRoute\": {\n \"containerPort\": 123\n },\n \"publicIp\": true,\n \"registryCredentials\": {\n \"mysteryboxSecretVersion\": \"<string>\"\n },\n \"shmSizeBytes\": \"<string>\",\n \"sshAuthorizedKeys\": [\n \"<string>\"\n ],\n \"volumes\": [\n {\n \"containerPath\": \"<string>\",\n \"mode\": \"MODE_UNSPECIFIED\",\n \"source\": \"<string>\",\n \"sourcePath\": \"<string>\"\n }\n ],\n \"workingDir\": \"<string>\"\n },\n \"dryRun\": true\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"description": "<string>",
"finishedAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"progressData": {
"@type": "<string>"
},
"progressTracker": {
"description": "<string>",
"estimatedFinishedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"steps": [
{
"description": "<string>",
"finishedAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"workDone": {
"doneTickCount": "<string>",
"totalTickCount": "<string>"
}
}
],
"workDone": {
"doneTickCount": "<string>",
"totalTickCount": "<string>"
}
},
"request": {
"@type": "<string>"
},
"requestHeaders": {},
"resourceId": "<string>",
"status": {
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}
}Create
Creates a Devlab.
curl --request POST \
--url https://api.nebius.cloud/ai/v1/devlabs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"parentId": "<string>",
"id": "<string>",
"labels": {},
"name": "<string>",
"resourceVersion": "<string>"
},
"spec": {
"disk": {
"type": "UNSPECIFIED",
"sizeBytes": "<string>"
},
"platform": "<string>",
"preset": "<string>",
"subnetId": "<string>",
"workspace": {
"containerPath": "<string>"
},
"args": "<string>",
"authTokenMysteryboxSecret": {
"secretId": "<string>",
"versionId": "<string>"
},
"containerCommand": "<string>",
"environmentVariables": [
{
"name": "<string>",
"mysteryboxSecret": {
"secretId": "<string>",
"versionId": "<string>"
},
"value": "<string>"
}
],
"image": "<string>",
"injectedFiles": [
{
"containerPath": "<string>",
"content": "aSDinaTvuI8gbWludGxpZnk="
}
],
"ports": [
{
"protocol": "PROTOCOL_UNSPECIFIED",
"containerPort": 123,
"hostPort": 123
}
],
"primaryRoute": {
"containerPort": 123
},
"publicIp": true,
"registryCredentials": {
"mysteryboxSecretVersion": "<string>"
},
"shmSizeBytes": "<string>",
"sshAuthorizedKeys": [
"<string>"
],
"volumes": [
{
"containerPath": "<string>",
"mode": "MODE_UNSPECIFIED",
"source": "<string>",
"sourcePath": "<string>"
}
],
"workingDir": "<string>"
},
"dryRun": true
}
'import requests
url = "https://api.nebius.cloud/ai/v1/devlabs"
payload = {
"metadata": {
"parentId": "<string>",
"id": "<string>",
"labels": {},
"name": "<string>",
"resourceVersion": "<string>"
},
"spec": {
"disk": {
"type": "UNSPECIFIED",
"sizeBytes": "<string>"
},
"platform": "<string>",
"preset": "<string>",
"subnetId": "<string>",
"workspace": { "containerPath": "<string>" },
"args": "<string>",
"authTokenMysteryboxSecret": {
"secretId": "<string>",
"versionId": "<string>"
},
"containerCommand": "<string>",
"environmentVariables": [
{
"name": "<string>",
"mysteryboxSecret": {
"secretId": "<string>",
"versionId": "<string>"
},
"value": "<string>"
}
],
"image": "<string>",
"injectedFiles": [
{
"containerPath": "<string>",
"content": "aSDinaTvuI8gbWludGxpZnk="
}
],
"ports": [
{
"protocol": "PROTOCOL_UNSPECIFIED",
"containerPort": 123,
"hostPort": 123
}
],
"primaryRoute": { "containerPort": 123 },
"publicIp": True,
"registryCredentials": { "mysteryboxSecretVersion": "<string>" },
"shmSizeBytes": "<string>",
"sshAuthorizedKeys": ["<string>"],
"volumes": [
{
"containerPath": "<string>",
"mode": "MODE_UNSPECIFIED",
"source": "<string>",
"sourcePath": "<string>"
}
],
"workingDir": "<string>"
},
"dryRun": True
}
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: {
parentId: '<string>',
id: '<string>',
labels: {},
name: '<string>',
resourceVersion: '<string>'
},
spec: {
disk: {type: 'UNSPECIFIED', sizeBytes: '<string>'},
platform: '<string>',
preset: '<string>',
subnetId: '<string>',
workspace: {containerPath: '<string>'},
args: '<string>',
authTokenMysteryboxSecret: {secretId: '<string>', versionId: '<string>'},
containerCommand: '<string>',
environmentVariables: [
{
name: '<string>',
mysteryboxSecret: {secretId: '<string>', versionId: '<string>'},
value: '<string>'
}
],
image: '<string>',
injectedFiles: [{containerPath: '<string>', content: 'aSDinaTvuI8gbWludGxpZnk='}],
ports: [{protocol: 'PROTOCOL_UNSPECIFIED', containerPort: 123, hostPort: 123}],
primaryRoute: {containerPort: 123},
publicIp: true,
registryCredentials: {mysteryboxSecretVersion: '<string>'},
shmSizeBytes: '<string>',
sshAuthorizedKeys: ['<string>'],
volumes: [
{
containerPath: '<string>',
mode: 'MODE_UNSPECIFIED',
source: '<string>',
sourcePath: '<string>'
}
],
workingDir: '<string>'
},
dryRun: true
})
};
fetch('https://api.nebius.cloud/ai/v1/devlabs', 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.nebius.cloud/ai/v1/devlabs",
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' => [
'parentId' => '<string>',
'id' => '<string>',
'labels' => [
],
'name' => '<string>',
'resourceVersion' => '<string>'
],
'spec' => [
'disk' => [
'type' => 'UNSPECIFIED',
'sizeBytes' => '<string>'
],
'platform' => '<string>',
'preset' => '<string>',
'subnetId' => '<string>',
'workspace' => [
'containerPath' => '<string>'
],
'args' => '<string>',
'authTokenMysteryboxSecret' => [
'secretId' => '<string>',
'versionId' => '<string>'
],
'containerCommand' => '<string>',
'environmentVariables' => [
[
'name' => '<string>',
'mysteryboxSecret' => [
'secretId' => '<string>',
'versionId' => '<string>'
],
'value' => '<string>'
]
],
'image' => '<string>',
'injectedFiles' => [
[
'containerPath' => '<string>',
'content' => 'aSDinaTvuI8gbWludGxpZnk='
]
],
'ports' => [
[
'protocol' => 'PROTOCOL_UNSPECIFIED',
'containerPort' => 123,
'hostPort' => 123
]
],
'primaryRoute' => [
'containerPort' => 123
],
'publicIp' => true,
'registryCredentials' => [
'mysteryboxSecretVersion' => '<string>'
],
'shmSizeBytes' => '<string>',
'sshAuthorizedKeys' => [
'<string>'
],
'volumes' => [
[
'containerPath' => '<string>',
'mode' => 'MODE_UNSPECIFIED',
'source' => '<string>',
'sourcePath' => '<string>'
]
],
'workingDir' => '<string>'
],
'dryRun' => true
]),
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.nebius.cloud/ai/v1/devlabs"
payload := strings.NewReader("{\n \"metadata\": {\n \"parentId\": \"<string>\",\n \"id\": \"<string>\",\n \"labels\": {},\n \"name\": \"<string>\",\n \"resourceVersion\": \"<string>\"\n },\n \"spec\": {\n \"disk\": {\n \"type\": \"UNSPECIFIED\",\n \"sizeBytes\": \"<string>\"\n },\n \"platform\": \"<string>\",\n \"preset\": \"<string>\",\n \"subnetId\": \"<string>\",\n \"workspace\": {\n \"containerPath\": \"<string>\"\n },\n \"args\": \"<string>\",\n \"authTokenMysteryboxSecret\": {\n \"secretId\": \"<string>\",\n \"versionId\": \"<string>\"\n },\n \"containerCommand\": \"<string>\",\n \"environmentVariables\": [\n {\n \"name\": \"<string>\",\n \"mysteryboxSecret\": {\n \"secretId\": \"<string>\",\n \"versionId\": \"<string>\"\n },\n \"value\": \"<string>\"\n }\n ],\n \"image\": \"<string>\",\n \"injectedFiles\": [\n {\n \"containerPath\": \"<string>\",\n \"content\": \"aSDinaTvuI8gbWludGxpZnk=\"\n }\n ],\n \"ports\": [\n {\n \"protocol\": \"PROTOCOL_UNSPECIFIED\",\n \"containerPort\": 123,\n \"hostPort\": 123\n }\n ],\n \"primaryRoute\": {\n \"containerPort\": 123\n },\n \"publicIp\": true,\n \"registryCredentials\": {\n \"mysteryboxSecretVersion\": \"<string>\"\n },\n \"shmSizeBytes\": \"<string>\",\n \"sshAuthorizedKeys\": [\n \"<string>\"\n ],\n \"volumes\": [\n {\n \"containerPath\": \"<string>\",\n \"mode\": \"MODE_UNSPECIFIED\",\n \"source\": \"<string>\",\n \"sourcePath\": \"<string>\"\n }\n ],\n \"workingDir\": \"<string>\"\n },\n \"dryRun\": true\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.nebius.cloud/ai/v1/devlabs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {\n \"parentId\": \"<string>\",\n \"id\": \"<string>\",\n \"labels\": {},\n \"name\": \"<string>\",\n \"resourceVersion\": \"<string>\"\n },\n \"spec\": {\n \"disk\": {\n \"type\": \"UNSPECIFIED\",\n \"sizeBytes\": \"<string>\"\n },\n \"platform\": \"<string>\",\n \"preset\": \"<string>\",\n \"subnetId\": \"<string>\",\n \"workspace\": {\n \"containerPath\": \"<string>\"\n },\n \"args\": \"<string>\",\n \"authTokenMysteryboxSecret\": {\n \"secretId\": \"<string>\",\n \"versionId\": \"<string>\"\n },\n \"containerCommand\": \"<string>\",\n \"environmentVariables\": [\n {\n \"name\": \"<string>\",\n \"mysteryboxSecret\": {\n \"secretId\": \"<string>\",\n \"versionId\": \"<string>\"\n },\n \"value\": \"<string>\"\n }\n ],\n \"image\": \"<string>\",\n \"injectedFiles\": [\n {\n \"containerPath\": \"<string>\",\n \"content\": \"aSDinaTvuI8gbWludGxpZnk=\"\n }\n ],\n \"ports\": [\n {\n \"protocol\": \"PROTOCOL_UNSPECIFIED\",\n \"containerPort\": 123,\n \"hostPort\": 123\n }\n ],\n \"primaryRoute\": {\n \"containerPort\": 123\n },\n \"publicIp\": true,\n \"registryCredentials\": {\n \"mysteryboxSecretVersion\": \"<string>\"\n },\n \"shmSizeBytes\": \"<string>\",\n \"sshAuthorizedKeys\": [\n \"<string>\"\n ],\n \"volumes\": [\n {\n \"containerPath\": \"<string>\",\n \"mode\": \"MODE_UNSPECIFIED\",\n \"source\": \"<string>\",\n \"sourcePath\": \"<string>\"\n }\n ],\n \"workingDir\": \"<string>\"\n },\n \"dryRun\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nebius.cloud/ai/v1/devlabs")
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 \"parentId\": \"<string>\",\n \"id\": \"<string>\",\n \"labels\": {},\n \"name\": \"<string>\",\n \"resourceVersion\": \"<string>\"\n },\n \"spec\": {\n \"disk\": {\n \"type\": \"UNSPECIFIED\",\n \"sizeBytes\": \"<string>\"\n },\n \"platform\": \"<string>\",\n \"preset\": \"<string>\",\n \"subnetId\": \"<string>\",\n \"workspace\": {\n \"containerPath\": \"<string>\"\n },\n \"args\": \"<string>\",\n \"authTokenMysteryboxSecret\": {\n \"secretId\": \"<string>\",\n \"versionId\": \"<string>\"\n },\n \"containerCommand\": \"<string>\",\n \"environmentVariables\": [\n {\n \"name\": \"<string>\",\n \"mysteryboxSecret\": {\n \"secretId\": \"<string>\",\n \"versionId\": \"<string>\"\n },\n \"value\": \"<string>\"\n }\n ],\n \"image\": \"<string>\",\n \"injectedFiles\": [\n {\n \"containerPath\": \"<string>\",\n \"content\": \"aSDinaTvuI8gbWludGxpZnk=\"\n }\n ],\n \"ports\": [\n {\n \"protocol\": \"PROTOCOL_UNSPECIFIED\",\n \"containerPort\": 123,\n \"hostPort\": 123\n }\n ],\n \"primaryRoute\": {\n \"containerPort\": 123\n },\n \"publicIp\": true,\n \"registryCredentials\": {\n \"mysteryboxSecretVersion\": \"<string>\"\n },\n \"shmSizeBytes\": \"<string>\",\n \"sshAuthorizedKeys\": [\n \"<string>\"\n ],\n \"volumes\": [\n {\n \"containerPath\": \"<string>\",\n \"mode\": \"MODE_UNSPECIFIED\",\n \"source\": \"<string>\",\n \"sourcePath\": \"<string>\"\n }\n ],\n \"workingDir\": \"<string>\"\n },\n \"dryRun\": true\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"description": "<string>",
"finishedAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"progressData": {
"@type": "<string>"
},
"progressTracker": {
"description": "<string>",
"estimatedFinishedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"steps": [
{
"description": "<string>",
"finishedAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"workDone": {
"doneTickCount": "<string>",
"totalTickCount": "<string>"
}
}
],
"workDone": {
"doneTickCount": "<string>",
"totalTickCount": "<string>"
}
},
"request": {
"@type": "<string>"
},
"requestHeaders": {},
"resourceId": "<string>",
"status": {
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}
}Authorizations
The Authorization header expects a Bearer token.
Body
A request to create a Devlab.
Response
A successful response.
Creation timestamp.
ID of the user or service account who initiated the operation.
Human-readable description of the operation. 0-256 characters long.
The time when the operation has finished.
ID of the operation.
Extra information about this operation's progress. MAY be absent while the operation is running, MUST be absent after the operation has completed.
Type of message that's stored inside [progress_data] is service-dependent.
Show child attributes
Show child attributes
Information about this operation's progress, if this operation tracks its progress.
If the operation tracks its progress, progress_tracker MUST be present both while
the operation is running and after it has been completed.
Show child attributes
Show child attributes
The request that generated this operation.
Show child attributes
Show child attributes
The request headers that are essential for the request that generated the operation.
For instance, x-resetmask. Without these headers the request might have been processed
differently if repeated.
All the header names must be converted to lower case.
Validator is based on:
https://httpwg.org/specs/rfc9110.html#considerations.for.new.field.names
Show child attributes
Show child attributes
ID of the resource that this operation creates, updates, deletes or otherwise changes.
If the operation affects multiple resources or does not affect any API resources at all (e.g. a routine maintenance operation visible to the user), the [resource_id] must be empty.
The status of this operation. Set when this operation is completed. See https://github.com/grpc/grpc/blob/master/src/proto/grpc/status/status.proto.
[status.code] is https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto:
- If [status.code] == OK, the operation has completed successfully.
- If [status.code] != OK, the operation has failed or has been cancelled.
- [status.message] will contain a user-readable and actionable error message.
- [status.details] will contain additional diagnostic information in the form of [ServiceError] from nebius/common/v1/error.proto
- [status.code] must belong to an Operation-compatible subset of GRPC codes: OK, CANCELLED, PERMISSION_DENIED, RESOURCE_EXHAUSTED, FAILED_PRECONDITION, ABORTED, INTERNAL
Show child attributes
Show child attributes
Was this page helpful?