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
- Authenticate and keep credentials outside source control.
- Create an empty construct model with Create Construct Model.
- Add nodes, frames, materials, sections, supports, and areas with the generated model creation endpoints.
- Fetch the viewer-ready payload with Get Construct Viewer Model.
- 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.