Skip to main content

Outcome

After this flow, a customer can:
  • create a scoped service key
  • submit simulation jobs with pip install hardsim
  • download artifacts from successful jobs

1) Create Service API Key

  1. Open Hardlight dashboard.
  2. Go to API page.
  3. Click Create key.
  4. Copy the key immediately (shown once).
Use only hls_live_* service keys for SDK usage.

2) Install SDK

python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade hardsim

3) Configure Environment

export HARDSIM_API_URL=https://api-sim.hardlightsim.com
export HARDSIM_API_KEY=<your_hls_live_key>

4) Run A Job

import hardsim as hs

client = hs.HardsimClient.from_env()

job = client.submit(
    robot=client.upload_input("./assets/hardsim-smoke.urdf"),
    scene="table_top_v0",
    num_envs=8,
    steps=128,
)

result = client.wait(job.job_id, poll_interval_s=2.0, timeout_s=900.0, raise_on_error=False)
paths = client.download(job.job_id, "./outputs")

print(job.job_id, result["status"], paths)
The upload helper is presigned by API, so no customer AWS credentials are required in this default flow.

Common Errors

  • 403 Plan not entitled for simulation jobs: plan is not allowed by entitlement policy.
  • 402 Insufficient simulation credits: credits exhausted or billing guardrail hit.
  • 429 Tenant submit/concurrent limit exceeded: tenant guardrail triggered.
  • 404 Job not found: cross-tenant access attempt.