Create Job Recipe
curl --request POST \
--url https://api.dispersed.com/v1/job-recipes \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"payload": {
"title": "<string>",
"parameters": {
"parameters": {
"allowed_ips": [
"<string>"
],
"env": {},
"host": "<string>",
"image": "<string>",
"imagesrc": "<string>",
"ports": [
123
],
"secret": "<string>",
"sshkey": "<string>",
"tag": "<string>",
"user": "<string>",
"volumes": [
{
"image": "<string>",
"mount": "<string>",
"registry": "<string>",
"secret": "<string>",
"tag": "<string>",
"user": "<string>"
}
]
},
"type": "docker"
},
"min_vram_gb": 123,
"min_ram_gb": 123,
"min_storage_gb": 123,
"cpu_count": 4,
"gpu_count": 1,
"description": "<string>",
"max_timeout_assign_ms": 123,
"max_timeout_run_ms": 123,
"max_timeout_start_ms": 123,
"gpu_name": "RTX 3090",
"gpu_registry_uuid": "01234567-89ab-cdef-0123-456789abcdef",
"image_size_bytes": 2147483648,
"max_node_count": 123,
"max_retry_count": 123,
"allowed_region_codes": []
},
"description": "<string>",
"visibility": "PRIVATE",
"quickstart_md": "<string>",
"input_schema": [
{
"key": "<string>",
"label": "<string>",
"required": true,
"description": "<string>",
"placeholder": "<string>",
"default_value": "<string>",
"options": [
{
"label": "<string>",
"value": "<string>"
}
]
}
],
"thumbnail_url": "<string>",
"is_official": false
}
'import requests
url = "https://api.dispersed.com/v1/job-recipes"
payload = {
"name": "<string>",
"payload": {
"title": "<string>",
"parameters": {
"parameters": {
"allowed_ips": ["<string>"],
"env": {},
"host": "<string>",
"image": "<string>",
"imagesrc": "<string>",
"ports": [123],
"secret": "<string>",
"sshkey": "<string>",
"tag": "<string>",
"user": "<string>",
"volumes": [
{
"image": "<string>",
"mount": "<string>",
"registry": "<string>",
"secret": "<string>",
"tag": "<string>",
"user": "<string>"
}
]
},
"type": "docker"
},
"min_vram_gb": 123,
"min_ram_gb": 123,
"min_storage_gb": 123,
"cpu_count": 4,
"gpu_count": 1,
"description": "<string>",
"max_timeout_assign_ms": 123,
"max_timeout_run_ms": 123,
"max_timeout_start_ms": 123,
"gpu_name": "RTX 3090",
"gpu_registry_uuid": "01234567-89ab-cdef-0123-456789abcdef",
"image_size_bytes": 2147483648,
"max_node_count": 123,
"max_retry_count": 123,
"allowed_region_codes": []
},
"description": "<string>",
"visibility": "PRIVATE",
"quickstart_md": "<string>",
"input_schema": [
{
"key": "<string>",
"label": "<string>",
"required": True,
"description": "<string>",
"placeholder": "<string>",
"default_value": "<string>",
"options": [
{
"label": "<string>",
"value": "<string>"
}
]
}
],
"thumbnail_url": "<string>",
"is_official": False
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
payload: {
title: '<string>',
parameters: {
parameters: {
allowed_ips: ['<string>'],
env: {},
host: '<string>',
image: '<string>',
imagesrc: '<string>',
ports: [123],
secret: '<string>',
sshkey: '<string>',
tag: '<string>',
user: '<string>',
volumes: [
{
image: '<string>',
mount: '<string>',
registry: '<string>',
secret: '<string>',
tag: '<string>',
user: '<string>'
}
]
},
type: 'docker'
},
min_vram_gb: 123,
min_ram_gb: 123,
min_storage_gb: 123,
cpu_count: 4,
gpu_count: 1,
description: '<string>',
max_timeout_assign_ms: 123,
max_timeout_run_ms: 123,
max_timeout_start_ms: 123,
gpu_name: 'RTX 3090',
gpu_registry_uuid: '01234567-89ab-cdef-0123-456789abcdef',
image_size_bytes: 2147483648,
max_node_count: 123,
max_retry_count: 123,
allowed_region_codes: []
},
description: '<string>',
visibility: 'PRIVATE',
quickstart_md: '<string>',
input_schema: [
{
key: '<string>',
label: '<string>',
required: true,
description: '<string>',
placeholder: '<string>',
default_value: '<string>',
options: [{label: '<string>', value: '<string>'}]
}
],
thumbnail_url: '<string>',
is_official: false
})
};
fetch('https://api.dispersed.com/v1/job-recipes', 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.dispersed.com/v1/job-recipes",
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([
'name' => '<string>',
'payload' => [
'title' => '<string>',
'parameters' => [
'parameters' => [
'allowed_ips' => [
'<string>'
],
'env' => [
],
'host' => '<string>',
'image' => '<string>',
'imagesrc' => '<string>',
'ports' => [
123
],
'secret' => '<string>',
'sshkey' => '<string>',
'tag' => '<string>',
'user' => '<string>',
'volumes' => [
[
'image' => '<string>',
'mount' => '<string>',
'registry' => '<string>',
'secret' => '<string>',
'tag' => '<string>',
'user' => '<string>'
]
]
],
'type' => 'docker'
],
'min_vram_gb' => 123,
'min_ram_gb' => 123,
'min_storage_gb' => 123,
'cpu_count' => 4,
'gpu_count' => 1,
'description' => '<string>',
'max_timeout_assign_ms' => 123,
'max_timeout_run_ms' => 123,
'max_timeout_start_ms' => 123,
'gpu_name' => 'RTX 3090',
'gpu_registry_uuid' => '01234567-89ab-cdef-0123-456789abcdef',
'image_size_bytes' => 2147483648,
'max_node_count' => 123,
'max_retry_count' => 123,
'allowed_region_codes' => [
]
],
'description' => '<string>',
'visibility' => 'PRIVATE',
'quickstart_md' => '<string>',
'input_schema' => [
[
'key' => '<string>',
'label' => '<string>',
'required' => true,
'description' => '<string>',
'placeholder' => '<string>',
'default_value' => '<string>',
'options' => [
[
'label' => '<string>',
'value' => '<string>'
]
]
]
],
'thumbnail_url' => '<string>',
'is_official' => false
]),
CURLOPT_HTTPHEADER => [
"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.dispersed.com/v1/job-recipes"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"payload\": {\n \"title\": \"<string>\",\n \"parameters\": {\n \"parameters\": {\n \"allowed_ips\": [\n \"<string>\"\n ],\n \"env\": {},\n \"host\": \"<string>\",\n \"image\": \"<string>\",\n \"imagesrc\": \"<string>\",\n \"ports\": [\n 123\n ],\n \"secret\": \"<string>\",\n \"sshkey\": \"<string>\",\n \"tag\": \"<string>\",\n \"user\": \"<string>\",\n \"volumes\": [\n {\n \"image\": \"<string>\",\n \"mount\": \"<string>\",\n \"registry\": \"<string>\",\n \"secret\": \"<string>\",\n \"tag\": \"<string>\",\n \"user\": \"<string>\"\n }\n ]\n },\n \"type\": \"docker\"\n },\n \"min_vram_gb\": 123,\n \"min_ram_gb\": 123,\n \"min_storage_gb\": 123,\n \"cpu_count\": 4,\n \"gpu_count\": 1,\n \"description\": \"<string>\",\n \"max_timeout_assign_ms\": 123,\n \"max_timeout_run_ms\": 123,\n \"max_timeout_start_ms\": 123,\n \"gpu_name\": \"RTX 3090\",\n \"gpu_registry_uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"image_size_bytes\": 2147483648,\n \"max_node_count\": 123,\n \"max_retry_count\": 123,\n \"allowed_region_codes\": []\n },\n \"description\": \"<string>\",\n \"visibility\": \"PRIVATE\",\n \"quickstart_md\": \"<string>\",\n \"input_schema\": [\n {\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"required\": true,\n \"description\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"default_value\": \"<string>\",\n \"options\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ],\n \"thumbnail_url\": \"<string>\",\n \"is_official\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
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.dispersed.com/v1/job-recipes")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"payload\": {\n \"title\": \"<string>\",\n \"parameters\": {\n \"parameters\": {\n \"allowed_ips\": [\n \"<string>\"\n ],\n \"env\": {},\n \"host\": \"<string>\",\n \"image\": \"<string>\",\n \"imagesrc\": \"<string>\",\n \"ports\": [\n 123\n ],\n \"secret\": \"<string>\",\n \"sshkey\": \"<string>\",\n \"tag\": \"<string>\",\n \"user\": \"<string>\",\n \"volumes\": [\n {\n \"image\": \"<string>\",\n \"mount\": \"<string>\",\n \"registry\": \"<string>\",\n \"secret\": \"<string>\",\n \"tag\": \"<string>\",\n \"user\": \"<string>\"\n }\n ]\n },\n \"type\": \"docker\"\n },\n \"min_vram_gb\": 123,\n \"min_ram_gb\": 123,\n \"min_storage_gb\": 123,\n \"cpu_count\": 4,\n \"gpu_count\": 1,\n \"description\": \"<string>\",\n \"max_timeout_assign_ms\": 123,\n \"max_timeout_run_ms\": 123,\n \"max_timeout_start_ms\": 123,\n \"gpu_name\": \"RTX 3090\",\n \"gpu_registry_uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"image_size_bytes\": 2147483648,\n \"max_node_count\": 123,\n \"max_retry_count\": 123,\n \"allowed_region_codes\": []\n },\n \"description\": \"<string>\",\n \"visibility\": \"PRIVATE\",\n \"quickstart_md\": \"<string>\",\n \"input_schema\": [\n {\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"required\": true,\n \"description\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"default_value\": \"<string>\",\n \"options\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ],\n \"thumbnail_url\": \"<string>\",\n \"is_official\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dispersed.com/v1/job-recipes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"payload\": {\n \"title\": \"<string>\",\n \"parameters\": {\n \"parameters\": {\n \"allowed_ips\": [\n \"<string>\"\n ],\n \"env\": {},\n \"host\": \"<string>\",\n \"image\": \"<string>\",\n \"imagesrc\": \"<string>\",\n \"ports\": [\n 123\n ],\n \"secret\": \"<string>\",\n \"sshkey\": \"<string>\",\n \"tag\": \"<string>\",\n \"user\": \"<string>\",\n \"volumes\": [\n {\n \"image\": \"<string>\",\n \"mount\": \"<string>\",\n \"registry\": \"<string>\",\n \"secret\": \"<string>\",\n \"tag\": \"<string>\",\n \"user\": \"<string>\"\n }\n ]\n },\n \"type\": \"docker\"\n },\n \"min_vram_gb\": 123,\n \"min_ram_gb\": 123,\n \"min_storage_gb\": 123,\n \"cpu_count\": 4,\n \"gpu_count\": 1,\n \"description\": \"<string>\",\n \"max_timeout_assign_ms\": 123,\n \"max_timeout_run_ms\": 123,\n \"max_timeout_start_ms\": 123,\n \"gpu_name\": \"RTX 3090\",\n \"gpu_registry_uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"image_size_bytes\": 2147483648,\n \"max_node_count\": 123,\n \"max_retry_count\": 123,\n \"allowed_region_codes\": []\n },\n \"description\": \"<string>\",\n \"visibility\": \"PRIVATE\",\n \"quickstart_md\": \"<string>\",\n \"input_schema\": [\n {\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"required\": true,\n \"description\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"default_value\": \"<string>\",\n \"options\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ],\n \"thumbnail_url\": \"<string>\",\n \"is_official\": false\n}"
response = http.request(request)
puts response.read_body{
"object": "job_recipe",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>",
"payload": {
"title": "<string>",
"parameters": {
"parameters": {
"allowed_ips": [
"<string>"
],
"env": {},
"host": "<string>",
"image": "<string>",
"imagesrc": "<string>",
"ports": [
123
],
"secret": "<string>",
"sshkey": "<string>",
"tag": "<string>",
"user": "<string>",
"volumes": [
{
"image": "<string>",
"mount": "<string>",
"registry": "<string>",
"secret": "<string>",
"tag": "<string>",
"user": "<string>"
}
]
},
"type": "docker"
},
"min_vram_gb": 123,
"min_ram_gb": 123,
"min_storage_gb": 123,
"cpu_count": 4,
"gpu_count": 1,
"description": "<string>",
"max_timeout_assign_ms": 123,
"max_timeout_run_ms": 123,
"max_timeout_start_ms": 123,
"gpu_name": "RTX 3090",
"gpu_registry_uuid": "01234567-89ab-cdef-0123-456789abcdef",
"image_size_bytes": 2147483648,
"max_node_count": 123,
"max_retry_count": 123,
"allowed_region_codes": []
},
"is_official": true,
"last_used_at": "2023-11-07T05:31:56Z",
"usage_count": 123,
"fork_count": 123,
"uuid": "<string>",
"quickstart_md": "<string>",
"input_schema": [
{
"key": "<string>",
"label": "<string>",
"required": true,
"description": "<string>",
"placeholder": "<string>",
"default_value": "<string>",
"options": [
{
"label": "<string>",
"value": "<string>"
}
]
}
],
"thumbnail_url": "<string>",
"is_owner": true,
"forked_from_recipe_uuid": "<string>",
"created_by_account_uuid": "<string>",
"created_by_account": {
"uuid": "<string>",
"email": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"timestamp": "<string>",
"details": []
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"timestamp": "<string>",
"details": []
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"timestamp": "<string>",
"details": []
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"timestamp": "<string>",
"details": []
}
}Job Recipes
Create Job Recipe
POST
/
v1
/
job-recipes
Create Job Recipe
curl --request POST \
--url https://api.dispersed.com/v1/job-recipes \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"payload": {
"title": "<string>",
"parameters": {
"parameters": {
"allowed_ips": [
"<string>"
],
"env": {},
"host": "<string>",
"image": "<string>",
"imagesrc": "<string>",
"ports": [
123
],
"secret": "<string>",
"sshkey": "<string>",
"tag": "<string>",
"user": "<string>",
"volumes": [
{
"image": "<string>",
"mount": "<string>",
"registry": "<string>",
"secret": "<string>",
"tag": "<string>",
"user": "<string>"
}
]
},
"type": "docker"
},
"min_vram_gb": 123,
"min_ram_gb": 123,
"min_storage_gb": 123,
"cpu_count": 4,
"gpu_count": 1,
"description": "<string>",
"max_timeout_assign_ms": 123,
"max_timeout_run_ms": 123,
"max_timeout_start_ms": 123,
"gpu_name": "RTX 3090",
"gpu_registry_uuid": "01234567-89ab-cdef-0123-456789abcdef",
"image_size_bytes": 2147483648,
"max_node_count": 123,
"max_retry_count": 123,
"allowed_region_codes": []
},
"description": "<string>",
"visibility": "PRIVATE",
"quickstart_md": "<string>",
"input_schema": [
{
"key": "<string>",
"label": "<string>",
"required": true,
"description": "<string>",
"placeholder": "<string>",
"default_value": "<string>",
"options": [
{
"label": "<string>",
"value": "<string>"
}
]
}
],
"thumbnail_url": "<string>",
"is_official": false
}
'import requests
url = "https://api.dispersed.com/v1/job-recipes"
payload = {
"name": "<string>",
"payload": {
"title": "<string>",
"parameters": {
"parameters": {
"allowed_ips": ["<string>"],
"env": {},
"host": "<string>",
"image": "<string>",
"imagesrc": "<string>",
"ports": [123],
"secret": "<string>",
"sshkey": "<string>",
"tag": "<string>",
"user": "<string>",
"volumes": [
{
"image": "<string>",
"mount": "<string>",
"registry": "<string>",
"secret": "<string>",
"tag": "<string>",
"user": "<string>"
}
]
},
"type": "docker"
},
"min_vram_gb": 123,
"min_ram_gb": 123,
"min_storage_gb": 123,
"cpu_count": 4,
"gpu_count": 1,
"description": "<string>",
"max_timeout_assign_ms": 123,
"max_timeout_run_ms": 123,
"max_timeout_start_ms": 123,
"gpu_name": "RTX 3090",
"gpu_registry_uuid": "01234567-89ab-cdef-0123-456789abcdef",
"image_size_bytes": 2147483648,
"max_node_count": 123,
"max_retry_count": 123,
"allowed_region_codes": []
},
"description": "<string>",
"visibility": "PRIVATE",
"quickstart_md": "<string>",
"input_schema": [
{
"key": "<string>",
"label": "<string>",
"required": True,
"description": "<string>",
"placeholder": "<string>",
"default_value": "<string>",
"options": [
{
"label": "<string>",
"value": "<string>"
}
]
}
],
"thumbnail_url": "<string>",
"is_official": False
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
payload: {
title: '<string>',
parameters: {
parameters: {
allowed_ips: ['<string>'],
env: {},
host: '<string>',
image: '<string>',
imagesrc: '<string>',
ports: [123],
secret: '<string>',
sshkey: '<string>',
tag: '<string>',
user: '<string>',
volumes: [
{
image: '<string>',
mount: '<string>',
registry: '<string>',
secret: '<string>',
tag: '<string>',
user: '<string>'
}
]
},
type: 'docker'
},
min_vram_gb: 123,
min_ram_gb: 123,
min_storage_gb: 123,
cpu_count: 4,
gpu_count: 1,
description: '<string>',
max_timeout_assign_ms: 123,
max_timeout_run_ms: 123,
max_timeout_start_ms: 123,
gpu_name: 'RTX 3090',
gpu_registry_uuid: '01234567-89ab-cdef-0123-456789abcdef',
image_size_bytes: 2147483648,
max_node_count: 123,
max_retry_count: 123,
allowed_region_codes: []
},
description: '<string>',
visibility: 'PRIVATE',
quickstart_md: '<string>',
input_schema: [
{
key: '<string>',
label: '<string>',
required: true,
description: '<string>',
placeholder: '<string>',
default_value: '<string>',
options: [{label: '<string>', value: '<string>'}]
}
],
thumbnail_url: '<string>',
is_official: false
})
};
fetch('https://api.dispersed.com/v1/job-recipes', 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.dispersed.com/v1/job-recipes",
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([
'name' => '<string>',
'payload' => [
'title' => '<string>',
'parameters' => [
'parameters' => [
'allowed_ips' => [
'<string>'
],
'env' => [
],
'host' => '<string>',
'image' => '<string>',
'imagesrc' => '<string>',
'ports' => [
123
],
'secret' => '<string>',
'sshkey' => '<string>',
'tag' => '<string>',
'user' => '<string>',
'volumes' => [
[
'image' => '<string>',
'mount' => '<string>',
'registry' => '<string>',
'secret' => '<string>',
'tag' => '<string>',
'user' => '<string>'
]
]
],
'type' => 'docker'
],
'min_vram_gb' => 123,
'min_ram_gb' => 123,
'min_storage_gb' => 123,
'cpu_count' => 4,
'gpu_count' => 1,
'description' => '<string>',
'max_timeout_assign_ms' => 123,
'max_timeout_run_ms' => 123,
'max_timeout_start_ms' => 123,
'gpu_name' => 'RTX 3090',
'gpu_registry_uuid' => '01234567-89ab-cdef-0123-456789abcdef',
'image_size_bytes' => 2147483648,
'max_node_count' => 123,
'max_retry_count' => 123,
'allowed_region_codes' => [
]
],
'description' => '<string>',
'visibility' => 'PRIVATE',
'quickstart_md' => '<string>',
'input_schema' => [
[
'key' => '<string>',
'label' => '<string>',
'required' => true,
'description' => '<string>',
'placeholder' => '<string>',
'default_value' => '<string>',
'options' => [
[
'label' => '<string>',
'value' => '<string>'
]
]
]
],
'thumbnail_url' => '<string>',
'is_official' => false
]),
CURLOPT_HTTPHEADER => [
"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.dispersed.com/v1/job-recipes"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"payload\": {\n \"title\": \"<string>\",\n \"parameters\": {\n \"parameters\": {\n \"allowed_ips\": [\n \"<string>\"\n ],\n \"env\": {},\n \"host\": \"<string>\",\n \"image\": \"<string>\",\n \"imagesrc\": \"<string>\",\n \"ports\": [\n 123\n ],\n \"secret\": \"<string>\",\n \"sshkey\": \"<string>\",\n \"tag\": \"<string>\",\n \"user\": \"<string>\",\n \"volumes\": [\n {\n \"image\": \"<string>\",\n \"mount\": \"<string>\",\n \"registry\": \"<string>\",\n \"secret\": \"<string>\",\n \"tag\": \"<string>\",\n \"user\": \"<string>\"\n }\n ]\n },\n \"type\": \"docker\"\n },\n \"min_vram_gb\": 123,\n \"min_ram_gb\": 123,\n \"min_storage_gb\": 123,\n \"cpu_count\": 4,\n \"gpu_count\": 1,\n \"description\": \"<string>\",\n \"max_timeout_assign_ms\": 123,\n \"max_timeout_run_ms\": 123,\n \"max_timeout_start_ms\": 123,\n \"gpu_name\": \"RTX 3090\",\n \"gpu_registry_uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"image_size_bytes\": 2147483648,\n \"max_node_count\": 123,\n \"max_retry_count\": 123,\n \"allowed_region_codes\": []\n },\n \"description\": \"<string>\",\n \"visibility\": \"PRIVATE\",\n \"quickstart_md\": \"<string>\",\n \"input_schema\": [\n {\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"required\": true,\n \"description\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"default_value\": \"<string>\",\n \"options\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ],\n \"thumbnail_url\": \"<string>\",\n \"is_official\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
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.dispersed.com/v1/job-recipes")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"payload\": {\n \"title\": \"<string>\",\n \"parameters\": {\n \"parameters\": {\n \"allowed_ips\": [\n \"<string>\"\n ],\n \"env\": {},\n \"host\": \"<string>\",\n \"image\": \"<string>\",\n \"imagesrc\": \"<string>\",\n \"ports\": [\n 123\n ],\n \"secret\": \"<string>\",\n \"sshkey\": \"<string>\",\n \"tag\": \"<string>\",\n \"user\": \"<string>\",\n \"volumes\": [\n {\n \"image\": \"<string>\",\n \"mount\": \"<string>\",\n \"registry\": \"<string>\",\n \"secret\": \"<string>\",\n \"tag\": \"<string>\",\n \"user\": \"<string>\"\n }\n ]\n },\n \"type\": \"docker\"\n },\n \"min_vram_gb\": 123,\n \"min_ram_gb\": 123,\n \"min_storage_gb\": 123,\n \"cpu_count\": 4,\n \"gpu_count\": 1,\n \"description\": \"<string>\",\n \"max_timeout_assign_ms\": 123,\n \"max_timeout_run_ms\": 123,\n \"max_timeout_start_ms\": 123,\n \"gpu_name\": \"RTX 3090\",\n \"gpu_registry_uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"image_size_bytes\": 2147483648,\n \"max_node_count\": 123,\n \"max_retry_count\": 123,\n \"allowed_region_codes\": []\n },\n \"description\": \"<string>\",\n \"visibility\": \"PRIVATE\",\n \"quickstart_md\": \"<string>\",\n \"input_schema\": [\n {\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"required\": true,\n \"description\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"default_value\": \"<string>\",\n \"options\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ],\n \"thumbnail_url\": \"<string>\",\n \"is_official\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dispersed.com/v1/job-recipes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"payload\": {\n \"title\": \"<string>\",\n \"parameters\": {\n \"parameters\": {\n \"allowed_ips\": [\n \"<string>\"\n ],\n \"env\": {},\n \"host\": \"<string>\",\n \"image\": \"<string>\",\n \"imagesrc\": \"<string>\",\n \"ports\": [\n 123\n ],\n \"secret\": \"<string>\",\n \"sshkey\": \"<string>\",\n \"tag\": \"<string>\",\n \"user\": \"<string>\",\n \"volumes\": [\n {\n \"image\": \"<string>\",\n \"mount\": \"<string>\",\n \"registry\": \"<string>\",\n \"secret\": \"<string>\",\n \"tag\": \"<string>\",\n \"user\": \"<string>\"\n }\n ]\n },\n \"type\": \"docker\"\n },\n \"min_vram_gb\": 123,\n \"min_ram_gb\": 123,\n \"min_storage_gb\": 123,\n \"cpu_count\": 4,\n \"gpu_count\": 1,\n \"description\": \"<string>\",\n \"max_timeout_assign_ms\": 123,\n \"max_timeout_run_ms\": 123,\n \"max_timeout_start_ms\": 123,\n \"gpu_name\": \"RTX 3090\",\n \"gpu_registry_uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"image_size_bytes\": 2147483648,\n \"max_node_count\": 123,\n \"max_retry_count\": 123,\n \"allowed_region_codes\": []\n },\n \"description\": \"<string>\",\n \"visibility\": \"PRIVATE\",\n \"quickstart_md\": \"<string>\",\n \"input_schema\": [\n {\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"required\": true,\n \"description\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"default_value\": \"<string>\",\n \"options\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ],\n \"thumbnail_url\": \"<string>\",\n \"is_official\": false\n}"
response = http.request(request)
puts response.read_body{
"object": "job_recipe",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>",
"payload": {
"title": "<string>",
"parameters": {
"parameters": {
"allowed_ips": [
"<string>"
],
"env": {},
"host": "<string>",
"image": "<string>",
"imagesrc": "<string>",
"ports": [
123
],
"secret": "<string>",
"sshkey": "<string>",
"tag": "<string>",
"user": "<string>",
"volumes": [
{
"image": "<string>",
"mount": "<string>",
"registry": "<string>",
"secret": "<string>",
"tag": "<string>",
"user": "<string>"
}
]
},
"type": "docker"
},
"min_vram_gb": 123,
"min_ram_gb": 123,
"min_storage_gb": 123,
"cpu_count": 4,
"gpu_count": 1,
"description": "<string>",
"max_timeout_assign_ms": 123,
"max_timeout_run_ms": 123,
"max_timeout_start_ms": 123,
"gpu_name": "RTX 3090",
"gpu_registry_uuid": "01234567-89ab-cdef-0123-456789abcdef",
"image_size_bytes": 2147483648,
"max_node_count": 123,
"max_retry_count": 123,
"allowed_region_codes": []
},
"is_official": true,
"last_used_at": "2023-11-07T05:31:56Z",
"usage_count": 123,
"fork_count": 123,
"uuid": "<string>",
"quickstart_md": "<string>",
"input_schema": [
{
"key": "<string>",
"label": "<string>",
"required": true,
"description": "<string>",
"placeholder": "<string>",
"default_value": "<string>",
"options": [
{
"label": "<string>",
"value": "<string>"
}
]
}
],
"thumbnail_url": "<string>",
"is_owner": true,
"forked_from_recipe_uuid": "<string>",
"created_by_account_uuid": "<string>",
"created_by_account": {
"uuid": "<string>",
"email": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"timestamp": "<string>",
"details": []
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"timestamp": "<string>",
"details": []
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"timestamp": "<string>",
"details": []
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"timestamp": "<string>",
"details": []
}
}Body
application/json
Required string length:
1 - 100Show child attributes
Show child attributes
Maximum string length:
500Available options:
ARCHIVED, PRIVATE, PUBLIC, UNLISTED Markdown content for the quickstart guide
Maximum string length:
10000Schema defining required user inputs when cooking this recipe
Show child attributes
Show child attributes
URL to a thumbnail image for the recipe card
Response
Job recipe created successfully (fields filtered by role)
Available options:
job_recipe Available options:
ARCHIVED, PRIVATE, PUBLIC, UNLISTED Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I