The SetPose offline programming API is a WebSocket-based API available exclusively for SetPose Pro+ users. It allows external applications to programmatically control the SetPose editor in real-time.
To enable the API bridge on the web client, open the the SetPose editor on https://setpose.com/?olp=true.
By default, the OLP API attempts to connect to a local WebSocket server at ws://127.0.0.1:8080/.
Your external software must run a WebSocket server on this port to send and receive commands from the web
client.
When the client connection is successfully established, the API handles incoming JSON payloads in the following format:
{
"type": "COMMAND_NAME",
...additional properties
}
Sets the rotation values for a specific joint on the active model.
Parameters:
joint string: The internal identifier of the joint.
See Joint Identifiers below for a comprehensive list.
values object: Defines adjustments for `bend` (z), `turn`
(y), `tilt` (x).{
"type": "SET_JOINT",
"joint": "l_arm",
"values": { "bend": 45, "turn": 20 }
}
Overrides the current model's posture completely using a JSON posture string or object.
Parameters:
posture string | object: A complete SetPose posture dataset
mapping joint transforms.Requests the current live status and posture from the viewport.
Returns: The client will emit a socket message back to the server:
{"type": "STATUS", "posture": "..."}
Utility functions to mimic history tracking on the web interface.
{ "type": "UNDO" }
{ "type": "REDO" }
{ "type": "RESET" }
Swaps the current viewport model.
Parameters:
model string: The identifier of the target model type.
Accepted values:
"basic", "detailed", "detailed2", "anime",
"anime2", "bodybuilder", "dog", "horse".
Direct world-space manipulation of the active model.
Parameters:
values object: An object with x,
y, and z keys (for POSITION and ROTATION).
value number: A direct multiplier for scaling
proportionally.{
"type": "SET_POSITION",
"values": { "x": 10, "y": 0, "z": -5 }
}
Controls the automatic viewport camera orbiting.
Parameters:
active boolean: Enables or disables auto-rotation.speed number: Rotation speed.{
"type": "ORBIT",
"active": true,
"speed": 2.5
}
Allows creation or playback for keyframe animation.
ANIMATION_PLAY: Starts playback sequence of keyframes (poses).ANIMATION_STOP: Halts playback.ANIMATION_ADD_KEYFRAME: Saves the active pose as a keyframe.ANIMATION_CLEAR: Cleans the keyframes timeline.Generates a snapshot image download of the viewport via browser download.
Parameters:
resolution string: E.g. "0" (screen
resolution), "1920", "3840".background string: "solid" or
"transparent"
{
"type": "EXPORT_IMAGE",
"resolution": "1920",
"background": "transparent"
}
Dumps the model or scene as a mesh file via browser download.
Parameters:
format string: File output format ("glb", "gltf" or
"obj").
objects string: Defines inclusion criteria
("model" or "scene").Configures metric height scaling of the model.
Parameters:
height number: Desired output height in cm (e.g.
170.5).
Applies established height preset based off the CAESAR anthropometric dataset.
Parameters:
preset string: "mixed-5",
"mixed-median", "mixed-95", "male-5", "male-median",
"male-95", "female-5", "female-median", "female-95".
Sets the movement limiter rules restricting joint over-rotation possibilities.
Parameters:
mode string: The target constraint mode restriction set.
Use
"none" to disable all limiters, "biological" for default limits, or
dynamically apply your saved custom subsets by concatenating "custom_" with the set name
(e.g. "custom_MyPresetName").
Creates a new set of movement limiter rules on all axis at a per-joint basis and applies the rules.
Parameters:
name string: Name identifier for the database.constraints object: A multi-dictionary defining min/max
values for `X`, `Y`, and `Z` per joint name. Example:
{ "l_arm": { "minX": -24, "maxX": 50, "minY": 0, "maxY": 0, "minZ": -3, "maxZ": 3 } }.
This section lists all acceptable strings for the joint argument when targeting individual 3D model
parts.
"pelvis" (Global Controller),
"torso" (Chest/Spine), "neck", "head"
"l_leg" (Upper Leg/Thigh), "l_knee" (Lower
Leg/Calf), "l_ankle" (Foot), "l_toes""r_leg" (Upper Leg/Thigh), "r_knee" (Lower
Leg/Calf), "r_ankle" (Foot), "r_toes""l_arm" (Upper Arm), "l_elbow"
(Forearm), "l_wrist" (Hand), "l_fingers" (Middle/Whole Hand),
"l_fingers2" (Index), "l_fingers3" (Ring), "l_fingers4"
(Pinky), "l_fingers5" (Thumb)
"r_arm" (Upper Arm), "r_elbow"
(Forearm), "r_wrist" (Hand), "r_fingers" (Middle/Whole Hand),
"r_fingers2" (Index), "r_fingers3" (Ring), "r_fingers4"
(Pinky), "r_fingers5" (Thumb)