SkyCiv API Integration
Ever wondered how to automate your daily tasks without switching between multiple tools and platforms? In today’s fast-paced world, where we juggle countless responsibilities, automating repetitive tasks isn't just a convenience — it's essential.
The SkyCiv Structural Analysis and Design API (https://skyciv.com/api/v3/) does exactly that and more. It is super easy to get started and use in your workflows. Even if your engineers don't have much of a coding experience, tutorials & samples will help you get started. It also supports multiple popular languages so that you don't have to learn new one just to use the API.
Let us jump right into it.
We will go from 𝗺𝗼𝗱𝗲𝗹 → 𝗹𝗶𝘃𝗲 3𝗗 → 𝗮𝗻𝗮𝗹𝘆𝘀𝗶𝘀 𝗿𝗲𝘀𝘂𝗹𝘁𝘀 𝗶𝗻 𝗼𝗻𝗲 𝘀𝗺𝗼𝗼𝘁𝗵 𝗹𝗼𝗼𝗽. That makes it ideal for design calculators, configurators, and feasibility checks embedded in your app.
What you’ll see below
1) 𝗗𝗲𝗳𝗶𝗻𝗲 𝘁𝗵𝗲 𝗺𝗼𝗱𝗲𝗹 (𝘀3𝗱_𝗺𝗼𝗱𝗲𝗹) – 𝗙𝗿𝗼𝗺 𝗝𝗦𝗢𝗡 𝘁𝗼 𝗠𝗼𝗱𝗲𝗹
Keep the first pass lean. Add plates/meshes and advanced combinations later once your model & overall setup is stable.
{
"settings": {
"units": {
"length": "m",
"force": "kn",
"moment": "kn-m"
},
"vertical_axis": "Z"
},
"nodes": {
"1": {
"x": 0,
"y": 0,
"z": 0
},
"2": {
"x": 5,
"y": 0,
"z": 0
}
},
"materials": {
"1": {
"name": "Steel",
"elasticity_modulus": 200000,
"yield_strength": 350,
"class": "steel",
"density": 7850
}
},
"sections": {
"1": {
"name": "RHS 100x50x5",
"material_id": 1
}
},
"members": {
"1": {
"node_A": 1,
"node_B": 2,
"section_id": 1,
"type": "normal"
}
},
"supports": {
"A": {
"node": 1,
"restraint_code": "FFFFFF"
},
"B": {
"node": 2,
"restraint_code": "FFFFRF"
}
},
"point_loads": {
"P1": {
"member": 1,
"position": 50,
"z_mag": -10
}
},
"load_combinations": {
"1": {
"name": "LC1",
"Live": 1
}
}
}
You can find more on this at https://skyciv.com/api/v3/docs/s3d-functions-solve/
Recommended by LinkedIn
2) 𝗦𝘁𝗮𝗿𝘁 𝘀𝗲𝘀𝘀𝗶𝗼𝗻 → 𝘀𝗲𝘁 𝗺𝗼𝗱𝗲𝗹 → 𝘀𝗼𝗹𝘃𝗲
The request has auth, optional options, and a functions array executed in order.We start a session (faster follow-ups), set the model, then solve. 𝗦3𝗗.𝗺𝗼𝗱𝗲𝗹.𝘀𝗼𝗹𝘃𝗲 carries out the analysis according to the options given. For entire list of options, please go through the link above.
// POST to SkyCiv's API
// Keep credentials server-side (never expose API keys in the browser).
const payload = {
auth: { username: "YOUR_USER", key: "YOUR_API_KEY" },
// You can get your API Key from SkyCiv once you register
options: { validate_input: true }, // guardrails while iterating
functions: [
{ function: "S3D.session.start", arguments: { keep_open: true } },
{ function: "S3D.model.set", arguments: { s3d_model } },
{ function: "S3D.model.solve", arguments: { analysis_type: "linear" }
]
};
const res = await fetch("XXXXX", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload)
}).then(r => r.json());
const analysis_results = res?.response?.data;
3) 𝗥𝗲𝗻𝗱𝗲𝗿 𝗶𝗻𝘀𝘁𝗮𝗻𝘁𝗹𝘆 𝗶𝗻 𝘁𝗵𝗲 𝗯𝗿𝗼𝘄𝘀𝗲𝗿
Drop in the SkyCiv renderer, show the model, and later toggle to results with the same canvas. The instant feedback is very handy for the user to cross -check the model as well.
<!-- Include the SkyCiv renderer bundle per docs -->
<script src="/path/to/skyciv-renderer-dist.js"></script>
<div id=”renderer” style=”width:100%;height:420px;position:relative;”> </div>
<script>
const viewer = new SKYCIV.renderer({ container_selector: ‘#renderer’ });
// Show model
viewer.model.set(window.s3d_model);
viewer.model.buildStructure();
viewer.render();
𝗣𝗿𝗮𝗰𝘁𝗶𝗰𝗮𝗹 𝘁𝗶𝗽𝘀 𝘄𝗲 𝘂𝘀𝗲 𝗶𝗻 𝗽𝗿𝗼𝗱𝘂𝗰𝘁𝗶𝗼𝗻
𝗡𝗲𝗲𝗱 𝗛𝗲𝗹𝗽 𝗶𝗻 𝗜𝗻𝘁𝗲𝗴𝗿𝗮𝘁𝗶𝗻𝗴 𝗦𝗸𝘆𝗖𝗶𝘃 𝗶𝗻 𝘆𝗼𝘂𝗿 𝘄𝗼𝗿𝗸𝗳𝗹𝗼𝘄? 𝗧𝗮𝗹𝗸 𝘁𝗼 𝗨𝘀!!
#devcreate #skyciv #api #integration #automation