How a job runs
1
Submit
You send a command, a GPU type and a maximum runtime. The job is
queued while a machine is requested.2
Start
A fresh machine with that GPU launches and runs its setup (
starting). If you attached a volume, its files are in /workspace. Some machines install the GPU driver after they boot: the job waits for it, so your command starts with the GPU ready.3
Run
Your command runs under bash in
/workspace (running). Its stdout and stderr are streamed as logs you can follow live.4
Stop
When the command exits, hits its maximum runtime or is cancelled, the machine stops and billing ends. Files under
/workspace are saved back to the volume.Run a job
- Ask your agent
- See the code
Connect the Runcrate MCP server to Claude Code, Codex, Cursor or any MCP client, then ask in plain words:What the agent does with the first prompt:
list_volumesto find the id oftraining-data.run_jobwithgpu: "A4000",command: "python train.py",max_runtime_minutes: 120and the volume’sstorage_id. It gets the job id back.get_job_logswithfollow: true, passing the returnedcursorback asaftereach time, untildoneis true. It reads the loss from the output.get_jobfor the final status, exit code and cost, then answers you.
run_job’s env object ({ "HF_TOKEN": "..." }). For the third it finds the job with list_jobs, reads it with get_job_logs, and stops it with cancel_job. run_job also takes region, and workspace and environment to choose where the job runs. See MCP tools for every parameter.Statuses
succeeded, failed, cancelled and timed_out are final: they never change, and ended_at is set on all of them.
Logs
Output is stdout and stderr combined, in order, delivered as chunks. A chunk is a raw fragment of output, not a line: print itstext as is.
- Follow with a cursor. Each response has a
cursor. Pass it back asafterto get only what is new. Withfollow=true, a request waits up to 25 seconds for new output or for the job to end. - Stop on
done.done: truemeans the job has ended and you have read every chunk. - Capped at 10 MB per job. The first 5 MB and the newest output are kept. When the middle is dropped,
truncatedis true and a marker chunk withseq: nullsits where the gap is. - Very fast output. When a command writes faster than its output can be sent, the newest output is sent first and the part in between is dropped the same way, so a job’s final lines are never held back.
- Kept 30 days after the job ends.
Results and volumes
Attach a volume withstorage_id (CLI: --volume) and its files are in /workspace when your command starts. Write checkpoints, metrics and outputs under /workspace: they are saved back to the volume when the machine stops, whatever the final status. Without a volume, files on the machine are gone when it stops, so print what you need to the logs.
The volume must be in the same workspace and environment as the job, and not attached to another machine. See Storage.
Environment variables
Every job gets its environment’s secrets, set in the dashboard, as environment variables, along withRUNCRATE_ENVIRONMENT, RUNCRATE_INSTANCE_ID and RUNCRATE_JOB_ID. Pass anything else, such as a one-off HF_TOKEN, in env; a name set in both takes the value from env. The values reach your command, are stored only encrypted and are never shown again: the job only reports their names in env_keys. If the machine cannot get them when it starts, the command does not run and the job fails. Sensitive hides a secret’s value in Runcrate. Every machine launched into its environments receives it, so anyone who can launch there can read it on the machine.
Containers
Setimage to run your command inside a container image instead of on the template directly. /workspace is mounted, and the image is pulled while the job is starting, so the pull does not use up the maximum runtime. The image needs bash or sh.
The GPUs are passed into the container only on machines that have the NVIDIA container runtime. On other machines the job log says so and the command runs in the container without GPUs. If your command needs the GPU, leave image out: on the machine itself the GPUs are always available.
Workspaces and environments
Jobs belong to a workspace and an environment, like instances. An API key or agent session sees only the jobs in its own environment. Otherwise, pick one with theX-Environment header or the environment query parameter (MCP: the environment parameter).
Billing
A job is billed at its machine’s hourly rate (cost_per_hour, in dollars) from when the machine is running until it stops. Setup time is included. cost_usd on the job is the cost so far and is final once the job ends. See pricing for current rates per GPU-hour.
The maximum runtime is counted from when your command starts, so setup does not use it up.
GPU readiness
Your command starts once the GPU driver answers. On machines that install the driver after they boot, the job staysstarting while it waits, for up to 20 minutes. If the driver is still not ready after that, the command runs anyway, the job log says so, and GPU calls in it will usually fail, so the job usually ends failed. Cancel and resubmit if that happens; a new job gets a fresh machine.
Limits
Errors
If the machine cannot be launched after the job was created, the error carries
details.job_id and that job is failed.