Skip to main content
POST
Run a job

Authorizations

Authorization
string
header
required

Use a Runcrate API key with the rc_live_* prefix as the bearer token. Create one at https://www.runcrate.ai/dashboard/api-keys.

Body

application/json
command
string
required

Shell command, run with bash in /workspace. At most 65536 bytes.

Minimum string length: 1
gpu_type
string
required

GPU model (e.g. A4000, H100), as listed by GET /instances/types.

max_runtime_minutes
integer
required

Longest the command may run, counted from when it starts. Required: a job never runs unbounded.

Required range: 1 <= x <= 1440
gpu_count
integer
default:1
Required range: 1 <= x <= 8
template
string
default:ubuntu-devbox

OS template id from GET /templates.

image
string

Container image to run the command in. /workspace is mounted and the image is pulled before the max runtime starts. The GPUs are passed into the container only on machines with the NVIDIA container runtime; otherwise the job log says so and the command runs without GPUs. The image needs bash or sh.

env
object

Environment variables for the command, as { "KEY": "value" }, added to the environment's secrets (a name set in both takes this value). Keys match ^[A-Za-z_][A-Za-z0-9_]*$ and don't start with RUNCRATE_; at most 200 keys, values up to 32 KB, 64 KB in total with the secrets. Values are stored only encrypted and never returned.

storage_id
string

Volume to mount at /workspace. Must be in the same workspace and environment and not attached to another machine.

name
string

Defaults to job-<first 8 chars of id>.

Maximum string length: 63
region
string

Preferred region.

Response

Job created with status queued.

data
object
required

One command run on its own fresh GPU machine. The machine stops, and billing ends, as soon as the command exits, hits max_runtime_minutes or is cancelled.