Skip to main content
Hardsim supports customer-friendly local file uploads through a presigned API flow.
  1. SDK requests upload URL from POST /v0/inputs/presign-upload.
  2. SDK uploads file bytes to the presigned URL.
  3. SDK receives an s3://... input_uri.
  4. Submit job with that input_uri.
This means customers do not need AWS credentials in their local environment.

Python Example

import hardsim as hs

client = hs.HardsimClient.from_env()
robot_uri = client.upload_input("./assets/franka.urdf")
job = client.submit(robot=robot_uri, scene="table_top_v0", num_envs=8, steps=128)

API Endpoint

POST /v0/inputs/presign-upload Request:
{
  "filename": "franka.urdf",
  "content_type": "application/octet-stream",
  "size_bytes": 12345
}
Response:
{
  "upload_url": "https://...",
  "upload_method": "PUT",
  "upload_headers": {
    "Content-Type": "application/octet-stream"
  },
  "input_uri": "s3://.../inputs/<id>_franka.urdf",
  "expires_at": "2026-03-03T12:00:00Z"
}

Advanced Direct-S3 Mode

If needed, users can bypass presigned flow:
robot_uri = client.upload_input(
    "./assets/franka.urdf",
    bucket="my-input-bucket",
    key_prefix="hardsim/inputs",
    prefer_presigned=False,
)
Use this only when you want direct control of object placement and already have AWS credentials configured.