Skip to main content

Create a model

Use the construct-model endpoints when you want to create a model directly from structured JSON. Use the upload endpoint when you already have a SAP2000 .s2k or .$2k file.

Model API Workflow

  1. Authenticate and keep credentials outside source control.
  2. Create an empty construct model with Create Construct Model.
  3. Add nodes, frames, materials, sections, supports, and areas with the generated model creation endpoints.
  4. Fetch the viewer-ready payload with Get Construct Viewer Model.
  5. Open the returned model in https://viewer.spectralco.co.

Minimal Shape

Start with the smallest payload accepted by the generated request schema, then add model elements in batches:

{
  "title": "API smoke test frame",
  "units": {
    "force": "kN",
    "length": "m"
  },
  "metadata": {
    "source": "docs-smoke-test"
  }
}

Use test names for smoke checks. Do not upload customer project data into a shared test account.

Upload Existing SAP2000 Files

For .s2k and .$2k files, use Upload SAP2000 Model. The current contract returns a redirect payload, not the full parsed model body.