API Reference

Developer Docs

Configure, calibrate, and export physically accurate, simulation-ready 3D assets and robotic workspaces in seconds.

EnviScale uses a geometry-first approach, automatically deriving mass distribution, centers of mass, and bounding properties from mesh structures. It validates compatibility, builds collision hierarchies, generates domain randomization (DR) profiles, and compiles assets directly for MuJoCo, PyBullet, and Omniverse Isaac Sim.

Introduction

EnviScale bridges the gap between raw 3D assets and high-fidelity physics simulators. By automating the mechanical property extraction, collision geometry generation, and scene assembly pipeline, EnviScale eliminates manual parameter tuning and guesswork.

Two Core API Capabilities

  • 1. Single Asset & CAD Compiler (POST /api/v1/scene): Compiles a raw 3D mesh or multi-part STEP CAD assembly once into a verified, solver-safe simulation bundle (MJCF, URDF, USD Physics) with CoACD convex decomposition, positive-definite inertia tensors, and automated headless MuJoCo settle QA. Use this for offline asset ingestion and CI/CD asset validation.
  • 2. Benchmark Scene Assembler (POST /api/v1/scene/composition): Packages multiple objects onto calibrated workspace environments (tabletop manipulation, shelves, warehouse bins) with physical support parameters, ground planes, and camera sensors for deterministic rollout benchmarking.
  • 3. Runtime Policy Training: Once compiled, spawn assets programmatically in your Isaac Lab, MuJoCo, or Gymnasium training scripts where domain randomization is applied dynamically at every episode reset.

Quick Start

Interact with the API immediately by posting raw geometries. Here is how to ingest an individual CAD model/mesh or package a multi-object benchmark stage.

POST /api/v1/scene (Asset & CAD Compiler)
Primary CI/CD Endpoint
curl -X POST https://api.enviscale.com/api/v1/scene \
  -H "X-API-Key: es_live_YOUR_KEY" \
  -F "file=@gearbox_housing.step" \
  -F "export_format=mjcf" \
  -F "collision_quality=balanced" \
  --output gearbox_simready.zip
POST /api/v1/scene/composition (Benchmark Scene Assembler)
Evaluation Stage
curl -X POST https://api.enviscale.com/api/v1/scene/composition \
  -H "X-API-Key: es_live_YOUR_KEY" \
  -F "files=@cup.glb" \
  -F "files=@pliers.glb" \
  -F "template=tabletop_manipulation" \
  -F "seed=42" \
  -F "export_format=mjcf" \
  --output tabletop_benchmark.zip

CLI & Python SDK

Automate your robotics training pipeline with the official enviscale package. Provides headless single-asset compilation, Parallel-Axis inertia calculation for multi-part CAD, deterministic scene composition, and domain randomization hooks.

InstallationPyPI Package
pip install enviscale

1. Command-Line Interface (CLI)

Use the enviscale executable in your asset ingestion scripts and CI/CD pipelines without writing boilerplate code. Set ENVISCALE_API_KEY in your environment.

Single Asset & CAD Assembly Ingestion
# Ingest and compile raw 3D mesh or multi-part STEP CAD assembly
enviscale compile gearbox_housing.step \
  --format mjcf \
  --quality balanced \
  --output ./simready_gearbox/

# Container-aware liquid filling profiles
enviscale compile mug.glb --fill full --output ./simready_mug/
Benchmark Scene Composition
# Package multi-object evaluation stage on calibrated tabletop
enviscale compose mug.glb screwdriver.glb \
  --template tabletop_manipulation \
  --seed 42 \
  --output ./tabletop_benchmark/

2. Programmatic Python SDK

The Python SDK integrates directly into your data generation and reinforcement learning training loops:

Python Pipeline Integration
from enviscale import EnviScale

# Initialize client (picks up ENVISCALE_API_KEY automatically)
client = EnviScale()

# 1. Ingest asset with multi-part Parallel-Axis Theorem inertia
asset = client.compile(
    file_path="lantern.gltf",
    scene_name="lantern_asset",
    export_format="mjcf",
    output_dir="./simready_lantern"
)

print(f"Reconciled Mass: {asset.mass_kg:.3f} kg")
print(f"Full Inertia Tensor: {asset.inertia_tensor}")
print(f"Native Parts ({asset.native_parts_count}):")
for part in asset.native_parts:
    print(f" - {part.name}: {part.material} ({part.mass_kg:.3f} kg)")

# 2. Package benchmark evaluation stage
scene = client.compose(
    files=["lantern.gltf", "screwdriver.glb"],
    template="tabletop_manipulation",
    seed=101,
    output_dir="./sim_stage"
)

print(f"Spawned {scene.object_count} objects in {scene.world_xml_path}")

3. Robotics CI/CD & RL Training Integration

Automate simulation asset validation on every pull request using GitHub Actions:

.github/workflows/verify-simready-assets.yml
name: Verify Simulation Assets
on: [push, pull_request]

jobs:
  validate-assets:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      
      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.11'
          
      - name: Install EnviScale
        run: pip install enviscale
        
      - name: Ingest & Certify Simulation Assets
        env:
          ENVISCALE_API_KEY: ${{ secrets.ENVISCALE_API_KEY }}
        run: |
          enviscale compile cad/gripper.step --format mjcf -o ./sim/gripper/
          enviscale compile cad/housing.step --format usd_physics -o ./sim/housing/

Authentication

All API requests must be explicitly authenticated. Generate a key from your dashboard and inject it as the X-API-Key header.

# HTTP Header
X-API-Key: es_live_YOUR_API_KEY_HERE

Supported Formats

EnviScale ingests visual, mechanical assembly, or CAD formats, and unrolls nested ZIP packages natively to resolve external textures or material definitions.

.obj
Wavefront OBJ
.ply
Polygon File Format
.glb
Binary GLTF
.gltf
JSON GLTF
.stl
Stereolithography
.step / .stp
ISO STEP CAD Assembly
.usd / .usda / .usdc
Universal Scene Description
.fbx
Filmbox exchange format
.zip
Zipped Mesh Bundle
Zip Bundling Guideline: When uploading a `.zip`, package the main 3D file at the root or within folders. The engine automatically walks directories, binds companion files (such as `.bin` data or external textures like `textures/baseColor.png`), and maps them to visual materials.

Single Object API Reference

Extract physical parameters, analyze geometry, reconcile native multi-part assemblies via the 3D Parallel-Axis Theorem, and generate randomized domain files from a single input model.

POST https://api.enviscale.com/api/v1/scene
Automatic Multi-Part PhysicsParallel-Axis Theorem Inertia

When uploading multi-part assemblies (GLTF/GLB with node hierarchies, STEP assemblies, USD prims), EnviScale automatically discovers subparts, estimates individual densities/volumes, reconciles raw masses against an anchor prior, and computes cumulative rigid-body mechanics using the 3D Parallel-Axis Theorem:

I_global = Σ [ I_i + m_i (|r_i|² I₃ - r_i ⊗ r_i) ]

Exported MuJoCo MJCF files automatically receive full 6-element tensors (fullinertia="Ixx Iyy Izz Ixy Ixz Iyz") rather than diagonal box approximations. The response header X-Compiler-Mode: native_multipart and X-Native-Parts-Count indicate when multi-part reconciliation occurred.

fileFile
Required

Primary 3D asset or ZIP archive.

companion_filesFiles Array
Optional

Buffers (.bin) or textures for .gltf uploads.

export_formatString
mjcf | urdf | usd_physics (default: mjcf)

The target simulator description format.

collision_qualityString
fast | balanced | precise (default: balanced)

Convex decomposition quality level.

input_unitsString
auto | meters | centimeters | millimeters | inches (default: auto)

Geometric unit scale override.

Scene Composition API Reference

Generate a multi-object scene composition. Places 1 to 8 files or zip objects onto a layout surface (table, desk, shelf, or bin), resolving physics for each object and returning a single aggregated simulation environment.

POST https://api.enviscale.com/api/v1/scene/composition

Legacy endpoint alias: POST /api/v1/scene/room is preserved for backward compatibility.

Scene Workspace Templates Details:

  • desk_manipulation: Places objects on a standard 1.2m x 0.8m office desk at height 0.75m. Uses a real, textured desk mesh.
  • tabletop_manipulation: Places objects on a compact 0.8m x 0.8m table at height 0.6m. Uses the real, textured table model from table.zip.
  • shelf_grasp: Spreads objects across levels of a standing-reach shelf unit up to height 1.2m. Uses a real shelf model.
  • warehouse_bin: Places objects inside a floor-level picking bin. Enforces sizing filters to skip objects that would penetrate the bin walls.

Physics Constraints

EnviScale does not estimate physics values arbitrarily. The system enforces strict physical bounds derived directly from geometric properties:

1. Mass-Volume Scaling

Watertight volume V is calculated. Based on the identified material (e.g., metal, wood, plastic), mass is restricted within physical limits:Mass Range = [Volume × DensityMin, Volume × DensityMax]If an override falls outside these bounds, or the inferred mass violates this, warnings are returned.

2. Hollow Shell Approximation

For hollow container categories, solid volume estimates would yield unrealistic masses. EnviScale calculates shell volumes based on a material-specific wall thickness:Shell Volume ≈ Surface Area × Wall ThicknessThis approximates realistic weights for items like plastic cups, metallic buckets, and ceramic vases.

3. Inertia & Stability Constraints

Moments of inertia are calculated along principal axes. To prevent physics engines from blowing up due to zero or negative inertia values, EnviScale enforces a strict diagonal minimum of 10⁻⁶ kg·m².

Calibration Overrides

Advanced workflows benefit from injecting real hardware calibration measurements. Optional override parameters let you overwrite inferred defaults:

Overrides Prioritization & Hierarchy

  1. Inference Phase: watertight volume, baseline center of mass, and default material properties are resolved.
  2. Overrides Layering: If material_override, density_override, mass_override_kg, friction_override, or restitution_override are supplied, they are layered on top of the geometry properties.
  3. Mass Dominance: If both density_override and mass_override_kg are present, mass_override_kg becomes authoritative.
  4. DR Realignment: Friction boundaries and domain randomization ranges automatically center around the final overridden values.

Domain Randomization (DR) Profiles

EnviScale generates multiple, distinct simulator profiles to support robust sim-to-real transfer. These profiles permute friction parameters and mass distribution:

Friction Wear Profiles

  • clean (1.0x): Standard surface contact friction.
  • worn (0.6x): Scuffed surface sliding friction (0.6x) and lower restitution (0.85x).
  • contaminated (0.35x): Simulates oily/wet contact with low sliding friction (0.35x) and reduced torsion.

Fluid Fill Profiles

  • empty (0.0x): Empty containers with standard CoM.
  • half_full (0.5x): Adds fluid mass (water-equivalent) and shifts the CoM downward by 15% of object height.
  • full (1.0x): Adds full fluid mass and shifts CoM downward by 25% of height.

Robot & USD Validation

Prior to returning response binaries, EnviScale runs automated simulation QA tests on the generated files to prevent physics errors:

MJCF Physics Sanity Checks

Validates that the XML complies with MuJoCo expectations. Ensures diagonal inertia parameters satisfy the triangle inequality, joints are free from initial interpenetration, and geoms have correct contype and conaffinity mappings.

USD stage & Isaac Sim Diagnostics

If export format includes usd_physics, the engine runs Omniverse/Isaac Sim compliance tests. Checks bounding APIs, physics schemas, material bindings, and rigid body configurations.

Real-time Header Telemetry

Check response headers for direct pipeline validation results without needing to unzip:

X-Processing-Time: 4.82s
X-Confidence: 0.92
X-Final-Mass: 0.3541
X-Inferred-Material: plastic
X-Object-Name: spray_bottle
X-Overrides-Applied: false

Code Examples

Integrate EnviScale processing endpoints into your Python training or dataset preparation scripts.

1. Single Asset Upload

Basic request exporting MJCF physics for a local GLB model.

import requests

url = "https://api.enviscale.com/api/v1/scene"
headers = {"X-API-Key": "es_live_YOUR_API_KEY"}
data = {
    "export_format": "mjcf",
    "collision_quality": "balanced"
}

with open("mug.glb", "rb") as f:
    response = requests.post(url, headers=headers, files={"file": f}, data=data)

with open("mug_compiled.zip", "wb") as out:
    out.write(response.content)

2. Processing with Calibration Overrides

Injecting real mass and sliding friction overrides.

import requests

url = "https://api.enviscale.com/api/v1/scene"
headers = {"X-API-Key": "es_live_YOUR_API_KEY"}
data = {
    "mass_override_kg": "0.24",      # exact weight from scale
    "friction_override": "0.45"      # calibrated slide friction
}

with open("pliers.gltf", "rb") as f:
    response = requests.post(url, headers=headers, files={"file": f}, data=data)

3. ZIP Dataset Upload (GLTF with textures)

Send a ZIP package containing GLTF mesh files and local textures directory.

import requests

url = "https://api.enviscale.com/api/v1/scene"
headers = {"X-API-Key": "es_live_YOUR_API_KEY"}

with open("vase_textures_bundle.zip", "rb") as f:
    response = requests.post(
        url,
        headers=headers,
        files={"file": ("vase.zip", f, "application/zip")}
    )
New

4. Multi-Object Scene Composition

Places multiple objects onto a workspace layout surface with correct physical support geometry.

import requests

url = "https://api.enviscale.com/api/v1/scene/composition"
headers = {"X-API-Key": "es_live_YOUR_API_KEY"}
data = {
    "template": "tabletop_manipulation",    # Places on 0.6m table
    "seed": "101",                          # Deterministic layout seed
    "surface_condition": "clean"
}

files = [
    ("files", ("mug.zip", open("mug.zip", "rb"), "application/zip")),
    ("files", ("pliers.zip", open("pliers.zip", "rb"), "application/zip")),
]

response = requests.post(url, headers=headers, files=files, data=data)

with open("compiled_scene_composition.zip", "wb") as out:
    out.write(response.content)

Response Structure

The API responds directly with an `application/zip` stream. Below is the internal format and structure of files contained within the returned archive:

dataset_compiled.zip/
├── assets/
│ ├── object_visual.obj # visual mesh (re-oriented & UV mapped)
│ ├── object_collision_part_0.obj # decomposed convex collision hull 0
│ ├── object_collision_part_1.obj # decomposed convex collision hull 1
│ └── textures/ # extracted material textures
├── scene_clean_empty.xml # MuJoCo MJCF for clean empty state
├── scene_worn_empty.xml # MuJoCo MJCF for worn empty state
├── scene_contaminated_empty.xml # MuJoCo MJCF for contaminated state
└── physics_report.json # Full pipeline telemetry & QA checks

Sample physics_report.json Telemetry Data

{
  "job_id": "8b949e22-4a62-43e7-9381-c886080a8c26",
  "scene_name": "ceramic_vase",
  "object_category": "container",
  "primary_material": "ceramic",
  "unit_resolution": {
    "source_units": "millimeters",
    "scale_factor": 0.001,
    "unit_confidence": 0.95
  },
  "geometry": {
    "volume_m3": 0.000215,
    "bounding_box_m": [0.082, 0.082, 0.165],
    "collision_strategy": "convex_decomposition",
    "is_watertight": true
  },
  "base_physics": {
    "inferred": {
      "mass_kg": 0.516,
      "density_kgm3": 2400
    },
    "final": {
      "mass_kg": 0.516,
      "density_kgm3": 2400,
      "friction_sliding": 0.60
    }
  },
  "is_native_multipart": false,
  "native_parts_count": 0,
  "inertia_source": "regional_mass_distribution_clamped",
  "warnings": [],
  "processing_time_seconds": 3.82
}

Errors & Limits

API Response Codes

400Invalid mesh structure, unsupported file extension, or file too large (>50 MB).
401Missing, inactive, or malformed API Key.
403Subscription quota exceeded, or tier restricted operation.
422Unprocessable parameter inputs (e.g. invalid template or unit keyword).
500Internal pipeline execution error. Check error messages for trace details.

API Boundaries & Thresholds

Payload Size Limit: Strict 50 MB request limit. Large assemblies should be simplified prior to uploading.
Processing Window: Processing typically takes 2 to 5 seconds depending on convex decomposition quality profiles.
Usage limits: Free includes 25 asset compilations/month (playground only, no API). Production includes 500 asset compilations/month with API access; additional usage is billed based on production workload. Enterprise usage is custom.