« Back to all guides

SetPose Pro+ API Documentation

Published on: March 18, 2026

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.

Connection Protocol

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
}

Supported Commands

SET_JOINT

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 }
}

SET_POSTURE

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.

GET_STATUS

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": "..."}

UNDO / REDO / RESET

Utility functions to mimic history tracking on the web interface.

{ "type": "UNDO" }
{ "type": "REDO" }
{ "type": "RESET" }

CHANGE_MODEL

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".

SET_POSITION / SET_ROTATION / SET_SCALE

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 }
}

ORBIT

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
}

Animation Commands

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.

EXPORT_IMAGE

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"
}

EXPORT_3D

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").

SET_MODEL_HEIGHT

Configures metric height scaling of the model.

Parameters:

  • height number: Desired output height in cm (e.g. 170.5).

SET_MODEL_HEIGHT_PRESET

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".

SET_CONSTRAINT_MODE

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").

CREATE_CONSTRAINT_SET

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 } }.

Joint Identifiers

This section lists all acceptable strings for the joint argument when targeting individual 3D model parts.