SkyCiv Core API Skill
You are an agent that interacts with the SkyCiv API. This skill covers authentication, session management, the request/response envelope, and all common patterns shared across every SkyCiv API function.
API Endpoint#
All requests are HTTP POST to:
Content-Type must be application/json.
Request Object Structure#
Every API call sends a single JSON body with three top-level keys:
auth#
| Key | Type | Description |
|---|---|---|
username | string | SkyCiv account email / username |
key | string | API key from account settings (required on first call) |
session_id | string | Reuse an open session from a prior call (optional) |
First call โ always provide key:
Subsequent calls within 30 min โ provide both to allow automatic fallback if session expires:
When
session_idis valid it is used; if expired,keystarts a fresh session. Ifkeyis absent andsession_idis expired, the call fails.
options#
All fields optional.
| Key | Type | Default | Description |
|---|---|---|---|
validate_input | boolean | false | Run model validation before executing. Strongly recommended. |
response_data_only | boolean | false | Return only response.data from the last function, omitting the full functions array. Reduces response size. |
timeout | int (ms) | auto | Override solver timeout. Only use for calls that need extra time. |
return_log | boolean | false | Include a process log for debugging. |
return_base64_image_on_error | boolean | true | Return a screenshot on error for debugging. |
response_webhook_url | string | โ | Send the response to this URL instead of the caller (useful for long-running jobs). |
timezone | number | UTC | UTC offset for report timestamps (e.g. 10 for GMT+10). |
functions#
An ordered array of function objects. Functions execute sequentially. Each object must have:
return_data (boolean, default false) can be added to any function object to omit that function's data from the response.
S3D.session.start#
Must always be the first function in the array โ even when reusing a session_id.
| Key | Type | Default | Description |
|---|---|---|---|
keep_open | boolean | false | Keep the session alive for 30 min. Subsequent calls using the returned session_id will be 4โ8ร faster by skipping re-authentication. |
Response includes:
Store last_session_id for the next call's auth.session_id.
Response Object Structure#
| Field | Meaning |
|---|---|
response.status | 0 = success, โฅ1 = failure |
response.data | Data from the last function executed |
response.msg | Status or error message |
functions[i] | Per-function result at index i |
Always check response.status === 0 before using results.
Full Minimal Example#
Session start โ set model โ solve:
Available Function Namespaces#
| Namespace | Purpose |
|---|---|
S3D.session | Session management |
S3D.model | Set, solve, repair, screenshot, mesh a structural model |
S3D.results | Retrieve and post-process analysis results |
S3D.file | Save/open/share S3D files in cloud storage |
S3D.design | Member and RC design checks |
S3D.SB | Section Builder โ load library sections, build custom shapes |
standalone.foundation | Standalone foundation design |
standalone.member | Standalone member design |
standalone.loads | Wind and snow loads |
cloudcad.model | Create CAD models |
cloudcad.file | Save/open CAD files in cloud storage |
Common Patterns#
Check success before using data:
Minimise response size with filters:
Use result_filter and lc_filter in solve/results calls to return only what you need.
Reuse sessions for speed:
Set keep_open: true in S3D.session.start, then pass the returned last_session_id as auth.session_id in subsequent calls. This skips re-authentication and is 4โ8ร faster.