Run one shell command as a job on its own fresh GPU machine. The command runs under bash in /workspace, and the machine stops (billing ends) as soon as the command exits. Billing is the machine's per-hour rate from when it is running until it stops, setup included. ALWAYS set max_runtime_minutes to a realistic upper bound for the command: a job that runs longer is stopped as timed_out. PREFER a list for gpu, e.g. ["H100", "A100-80GB:2", "L40S"]: the GPUs are tried in order, and with no capacity for any of them the job waits (status queued, queue_reason no_capacity, next_attempt_at) up to capacity_wait_minutes (default 30) instead of failing. To send code, pass files (path to text, up to 1 MB in all) or code.git (a repository and ref): it is put in /workspace/code before the command starts, and the command runs there. An agent with a shell and the Runcrate CLI can send a whole directory instead: runcrate run --code . -- <command>. To keep results, write them to $RUNCRATE_OUTPUT_DIR (/workspace/outputs): they are kept 30 days after the job (up to 5 GB), whatever its status; read them with list_job_artifacts and read_job_artifact. Or pass storage_id: the volume's files are in /workspace, and files written under /workspace are saved to the volume when the machine stops. For long or flaky work set max_retries: a machine that fails is replaced and the command runs again (RUNCRATE_JOB_ATTEMPT says which attempt), so write checkpoints to the volume and resume from them. count (or params, one variables object per job) runs many copies at once as a group (RUNCRATE_JOB_INDEX, RUNCRATE_JOB_COUNT), max_parallel at a time. The machine also gets the environment's secrets (list_secrets shows their names); variables of the same name win over them. Returns the job (status starting while its machine launches, or queued while it waits), or for count or params the group with its jobs. Then call get_job_logs with after 0, pass each returned cursor as after on the next call (follow: true waits up to 25 s for new output), and stop when done is true. Finally call get_job for status, exit_code and cost_usd. Statuses: queued, starting, running, then succeeded, failed, cancelled or timed_out. cancel_job stops a job early; rerun_job runs it again with changes. A retried call is not run twice: the job it already started is returned. The command starts once the GPU driver answers: on machines that install it after boot the job waits in starting for up to 20 minutes, and if the driver is still not ready then, the command runs anyway (usually failing on its GPU calls) and the job log says so. get_job_events shows each setup step.