Skip to main content
POST
/
v1
/
job-recipes
/
{uuid}
/
cook
Cook Job from Recipe
curl --request POST \
  --url https://api.compute.x.io/v1/job-recipes/{uuid}/cook \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "description": "<string>",
  "task": "BATCH",
  "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>"
        }
      ]
    },
    "type": "docker"
  }
}
'
{
  "object": "job",
  "created_at": "2023-12-25",
  "updated_at": "2023-12-25",
  "status": "PENDING",
  "task": "BATCH",
  "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>"
        }
      ]
    },
    "type": "docker"
  },
  "timeout_assign_at_ms": 123,
  "uuid": "<string>",
  "started_at": "2023-12-25",
  "completed_at": "2023-12-25",
  "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,
  "container_access_tokens": [],
  "status_reason": "<string>",
  "source_recipe_uuid": "<string>"
}

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.

Response

Job created from recipe successfully

object
enum<string>
required
Available options:
job
created_at
string<date> | null
required
updated_at
string<date> | 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> | null
completed_at
string<date> | 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
container_access_tokens
object[]
status_reason
string | null
source_recipe_uuid
string | null