Run a job
Run one command on its own fresh GPU machine. Runcrate launches the machine, runs the command with bash in /workspace, streams its output to GET /jobs/{id}/logs, and stops the machine as soon as the command exits, hits max_runtime_minutes or is cancelled. Files written under /workspace are saved back to the volume (storage_id) when the machine stops. The machine also shows in GET /instances while it runs. If the machine could not be launched after the job was created, the error has details.job_id and that job is failed.
Authorizations
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
Shell command, run with bash in /workspace. At most 65536 bytes.
1GPU model (e.g. A4000, H100), as listed by GET /instances/types.
Longest the command may run, counted from when it starts. Required: a job never runs unbounded.
1 <= x <= 14401 <= x <= 8OS template id from GET /templates.
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.
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.
Volume to mount at /workspace. Must be in the same workspace and environment and not attached to another machine.
Defaults to job-<first 8 chars of id>.
63Preferred region.
Response
Job created with status queued.
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.