Skip to main content
POST
/
v1
/
job-recipes
/
{uuid}
/
cook
Cook Job from Recipe
curl --request POST \
  --url https://api.dispersed.com/v1/job-recipes/{uuid}/cook \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "description": "<string>",
  "cpu_count": 1,
  "gpu_count": 1,
  "gpu_name": "<string>",
  "gpu_registry_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "min_vram_gb": 1,
  "min_ram_gb": 1,
  "min_storage_gb": 1,
  "max_node_count": 123,
  "max_retry_count": 1,
  "max_timeout_assign_ms": 300001,
  "max_timeout_start_ms": 120001,
  "max_timeout_run_ms": 60001,
  "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>"
        }
      ]
    }
  },
  "allowed_region_codes": []
}
'
{
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "title": "<string>",
  "cpu_count": 123,
  "gpu_count": 123,
  "min_ram_gb": 123,
  "min_vram_gb": 123,
  "min_storage_gb": 123,
  "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>"
        }
      ]
    }
  },
  "timeout_assign_at_ms": 123,
  "uuid": "<string>",
  "started_at": "2023-11-07T05:31:56Z",
  "completed_at": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "gpu_name": "<string>",
  "gpu_registry_uuid": "<string>",
  "max_timeout_assign_ms": 123,
  "max_timeout_run_ms": 123,
  "max_timeout_start_ms": 123,
  "max_retry_count": 123,
  "max_node_count": 123,
  "image_size_bytes": 123,
  "allowed_region_codes": [],
  "container_access_tokens": [],
  "status_reason": "<string>",
  "source_recipe_uuid": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://otoyinc.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Path Parameters

uuid
string
required

Body

application/json
title
string

Override the job title from the recipe.

description
string | null

Override the job description from the recipe.

task
enum<string>

Override the task type. BATCH jobs run to completion; PERSISTENT jobs run indefinitely.

Available options:
BATCH,
PERSISTENT
cpu_count
number

Override the number of CPU cores required.

Required range: x >= 0
gpu_count
number

Override the number of GPUs required.

Required range: x >= 0
gpu_name
string | null

Override the GPU name requirement. Cannot be used with gpu_registry_uuid.

gpu_registry_uuid
string<uuid> | null

Override with a specific GPU registry UUID for precise matching. Cannot be used with gpu_name.

min_vram_gb
number

Override the minimum VRAM in GB.

Required range: x >= 0
min_ram_gb
number

Override the minimum RAM in GB.

Required range: x >= 0
min_storage_gb
number

Override the minimum storage in GB.

Required range: x >= 0
max_node_count
number

Override the maximum number of nodes.

max_retry_count
number

Override the maximum retry count.

Required range: x >= 0
max_timeout_assign_ms
number

Override the assignment timeout in milliseconds.

Required range: x >= 300000
max_timeout_start_ms
number

Override the start timeout in milliseconds.

Required range: x >= 120000
max_timeout_run_ms
number | null

Override the run timeout in milliseconds. Required for BATCH tasks, must be null for PERSISTENT tasks.

Required range: x >= 60000
parameters
object

Override the container/execution parameters.

allowed_region_codes
enum<string>[]

Override the recipe`s allowed_region_codes for this cooked Job.

Maximum array length: 36
Available options:
ca-central-1,
ca-west-1,
mx-central-1,
sa-east-1,
us-east-1,
us-east-2,
us-west-1,
us-west-2,
eu-central-1,
eu-central-2,
eu-north-1,
eu-south-1,
eu-south-2,
eu-west-1,
eu-west-2,
eu-west-3,
ap-east-1,
ap-east-2,
ap-northeast-1,
ap-northeast-2,
ap-northeast-3,
ap-south-1,
ap-south-2,
ap-southeast-1,
ap-southeast-2,
ap-southeast-3,
ap-southeast-4,
ap-southeast-5,
ap-southeast-6,
ap-southeast-7,
cn-north-1,
cn-northwest-1,
af-south-1,
il-central-1,
me-central-1,
me-south-1

Response

Job created from recipe successfully

object
enum<string>
required
Available options:
job
created_at
string<date-time> | null
required
updated_at
string<date-time> | null
required
status
enum<string>
required
Available options:
PENDING,
ASSIGNED,
RUNNING,
COMPLETED,
CANCELLED,
FAILED
task
enum<string>
required
Available options:
BATCH,
PERSISTENT
title
string
required
cpu_count
number | null
required
gpu_count
number | null
required
min_ram_gb
number
required
min_vram_gb
number
required
min_storage_gb
number
required
parameters
object
required
timeout_assign_at_ms
number | null
required
uuid
string | null
started_at
string<date-time> | null
completed_at
string<date-time> | null
description
string | null
gpu_name
string | null
gpu_registry_uuid
string | null
max_timeout_assign_ms
number | null
max_timeout_run_ms
number | null
max_timeout_start_ms
number | null
max_retry_count
number | null
max_node_count
number | null
image_size_bytes
number | null
allowed_region_codes
enum<string>[]

Coarse geographic-network region identifier (AWS-style naming).

Available options:
ca-central-1,
ca-west-1,
mx-central-1,
sa-east-1,
us-east-1,
us-east-2,
us-west-1,
us-west-2,
eu-central-1,
eu-central-2,
eu-north-1,
eu-south-1,
eu-south-2,
eu-west-1,
eu-west-2,
eu-west-3,
ap-east-1,
ap-east-2,
ap-northeast-1,
ap-northeast-2,
ap-northeast-3,
ap-south-1,
ap-south-2,
ap-southeast-1,
ap-southeast-2,
ap-southeast-3,
ap-southeast-4,
ap-southeast-5,
ap-southeast-6,
ap-southeast-7,
cn-north-1,
cn-northwest-1,
af-south-1,
il-central-1,
me-central-1,
me-south-1
container_access_tokens
object[]
status_reason
string | null
source_recipe_uuid
string | null