Developer docsCompute · Arena · API

CLI and Compute API

Launch SSH machines and manage private guided jobs programmatically.

Developers and automation authors · 10 min · Updated
Markdown

Connect your tools

  1. Install the HIM CLI once on your workstation.
  2. Sign in to HIM with GitHub or Discord.
  3. Open Account and create a developer token under API Tokens.
  4. Run him login. Paste the token into the hidden prompt; it will not enter shell history.
  5. Run him whoami to verify the account and access before starting a job.
Connect the CLI
curl -fsSL https://arena.himrobotics.com/install.sh | sh
him login --api-url https://<arena-origin>
him whoami --json

# CI: store both values in your CI provider's secret settings
export HIM_API_URL=https://<arena-origin>
export HIM_TOKEN=him_pat_<secret>

Launch an SSH machine

The CLI uses the same owner-scoped machine service as Compute. It reads one public-key file, chooses an allowlisted profile, calculates the minimum safe credit ceiling from live capabilities, waits for a verified SSH endpoint, and prints the connection and stop commands.

SSH machine lifecycle
him machine launch --key ~/.ssh/id_ed25519.pub --profile gpu --hours 6
him machine list --json
him machine status <machine-id> --json
him machine watch <machine-id> --json
him machine stop <machine-id>

Upload a policy or simulator

Create the same public Sims listing from the CLI or browser. You need one valid ZIP and one MP4 with a video track. The video can be up to 50 MB and both files together can be up to 100 MB.

Headless Builder upload
him upload ./project.zip \
  --video ./result.mp4 \
  --kind policy \
  --run-command "python evaluate.py" \
  --yes --json

CLI upload and compute commands

Common commands
# Publish a policy or simulator and its real result video:
him upload ./project.zip --video ./result.mp4 \
  --kind both --run-command "./run.sh" --yes --json

# Upload a versioned private dataset:
him dataset push dataset-manifest.json --file URI=PATH --yes --json

# Launch an optional bounded SSH machine:
him compute --key ~/.ssh/id_ed25519.pub --profile gpu
him machine stop <machine-id>
Advanced immutable package
him init . --simulator
him doctor . --json
him validate --json
him test --local --json
him push --visibility unlisted --yes --json

Versioned API

Standalone Compute endpoints
MethodPathPurpose
GET/api/healthPublic deployment and provider readiness
GET/api/v1/compute/capabilitiesProvider, workloads, and whether code execution is enabled
GET/api/v1/compute/ssh-machines/capabilitiesAllowlisted machine profiles, environments, prices, and lifetime limits
GET / POST/api/v1/compute/ssh-machinesList owner machines or launch one bounded SSH machine
GET/api/v1/compute/ssh-machines/:workspaceIdRefresh owner-only status and verified connection details
POST/api/v1/compute/ssh-machines/:workspaceId/stopIdempotently terminate the machine and settle credits
GET/api/v1/compute/jobsList the current owner’s private jobs
POST/api/v1/compute/jobsLaunch an immutable private job
PUT/api/v1/packages/:packageDigest/archiveStore the exact private .him package archive
PUT/api/v1/packages/:packageDigest/sourceStore a clean private Git source snapshot by digest
GET/api/v1/compute/jobs/:jobIdRead lifecycle, attempt, result, and evidence
POST/api/v1/compute/jobs/:jobId/cancelCancel inside the allowed window
POST/api/v1/compute/jobs/:jobId/retryRetry a retryable failure as a new attempt
POST/api/v1/compute/jobs/:jobId/resumeResume cancelled training from a published checkpoint
GET/api/v1/compute/jobs/:jobId/artifacts?uri=...Owner-only verified artifact delivery
GET/api/v1/compute/jobs/:jobId/failure-logOwner-only provider log or sanitized failure timeline
POST/api/v1/datasetsRegister a private immutable dataset version
POST/api/v1/datasets/:datasetId/artifactsIssue one exact direct-upload grant
POST/api/v1/datasets/:datasetId/finalizeVerify and finalize the Dataset Manifest
POST/api/v1/packages/:packageDigest/promote-to-arenaIdempotently add package-declared immutable catalog versions
POST/api/v1/packages/:packageDigest/community-challengesCreate a Community challenge from package entrypoints
POST/api/v1/community-challenges/:challengeVersionId/submissionsEnter an approved policy package in an exact Community challenge
GET/api/v1/community-challenges/:challengeVersionId/leaderboardRead that version’s provider-verified Community rankings
Launch a simulation from a signed-in client
const response = await fetch(`${process.env.HIM_API_URL}/api/v1/compute/jobs`, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.HIM_TOKEN}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    workload: "simulation",
    templateId: "mujoco-simulation-contract",
    runtimeFamily: "mujoco_mjx",
    source: {
      kind: "him_package",
      packageDigest: "sha256:<package-lock-digest>",
      entrypointId: "evaluate",
    },
    resourceClass: "gpu-standard",
    maxWallSeconds: 1800,
    maxCredits: 100,
  }),
});

if (!response.ok) throw new Error(`Job launch failed: ${response.status}`);
const job = await response.json();

API rules

  • Every write requires a stable Idempotency-Key. Repeating the same action is safe; conflicting reuse fails.
  • Send developer tokens only in the Authorization Bearer header. HIM rejects invalid, expired, or revoked tokens and does not fall back to another identity.
  • Use packages:write to push repositories, datasets:write to register captures, and compute:write to launch or manage jobs. Read-only tokens cannot mutate those resources.
  • Compute jobs are private and owner scoped. Super-admin management permission does not silently make results public.
  • Clients select a portable resource class. HIM maps it to an available runtime profile and enforces the job’s limits.
  • 401 means sign-in is required; 403 means the signed-in account lacks permission; 409 means the requested lifecycle action is not currently allowed.
  • A result is complete only after HIM has recorded its final lifecycle state, artifacts, and evidence.