{
  "openapi": "3.1.1",
  "info": {
    "title": "Posed Figure Reference Maker API",
    "version": "1.0.0",
    "summary": "Create a stylized posed mannequin, drawing reference and reusable 3D scene.",
    "description": "Every endpoint performs the same calculation as the human page and returns inputs, result, units, assumptions, sources, warnings and computedAt. MCP endpoint: /mcp."
  },
  "servers": [
    {
      "url": "https://panelcraftfigurereference.usefulweb.site"
    }
  ],
  "paths": {
    "/api/v1/calculate": {
      "post": {
        "operationId": "calculate",
        "summary": "Create a stylized posed mannequin, drawing reference and reusable 3D scene.",
        "description": "Choose height, artistic proportions and one of eight original poses. Export single-view and four-view vector drawing references, a low-poly OBJ and editable figure or Form Studio projects; continue refining joint angles in Figure Lab.\n\nMethodology:\n- Original procedural geometry with millimetres and Z up; no MakeHuman meshes, assets or source code are included. Height is the neutral design height; bent poses occupy a different bounding box.\n- Arms and legs are constant-length articulated segments. Shoulder abduction and flex, elbow flex, hip flex and knee flex are in degrees. A lowest-vertex translation places the posed mesh on the ground.\n- The figure consists of separate ten-sided extruded solids. OBJ contains triangles in millimetres, without skinning, UVs, face detail, clothing or animation. SVG is an orthographic painter-order reference, not a production renderer.\n\nA stylized jointed mannequin for art and scene blocking. Proportions are artistic controls, not anatomical, medical or ergonomic measurements.",
        "tags": [
          "apps"
        ],
        "x-mcp-tool": "panelcraft_figure_reference",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PanelcraftFigureReferenceInput"
              },
              "examples": {
                "example1": {
                  "summary": "A neutral drawing reference",
                  "value": {}
                },
                "example2": {
                  "summary": "A seated figure in three quarters",
                  "value": {
                    "pose": "figure-seated",
                    "azimuth": -55,
                    "elevation": 25
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Calculation result envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PanelcraftFigureReferenceResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON body.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input (see errors[]).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (see Retry-After).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tool": {
      "get": {
        "operationId": "getToolDefinition",
        "summary": "Inputs, output schema and examples for this tool",
        "responses": {
          "200": {
            "description": "Tool definition.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Problem": {
        "type": "object",
        "description": "RFC 9457 problem details. 422 responses include per-field `errors`.",
        "required": [
          "type",
          "title",
          "status",
          "detail"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "field",
                "message"
              ],
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "PanelcraftFigureReferenceInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "pose": {
            "title": "Starting pose",
            "type": "string",
            "enum": [
              "figure-standing",
              "figure-wave",
              "figure-stride",
              "figure-seated",
              "figure-reach",
              "figure-run",
              "figure-present",
              "figure-crouch"
            ],
            "default": "figure-standing"
          },
          "height": {
            "title": "Neutral figure height (mm)",
            "type": "number",
            "minimum": 1200,
            "maximum": 2200,
            "default": 1750
          },
          "heads": {
            "title": "Height in head units",
            "type": "number",
            "minimum": 6,
            "maximum": 9,
            "default": 7.5
          },
          "shoulders": {
            "title": "Shoulder width (% of height)",
            "type": "number",
            "minimum": 18,
            "maximum": 32,
            "default": 25
          },
          "hips": {
            "title": "Hip width (% of height)",
            "type": "number",
            "minimum": 13,
            "maximum": 26,
            "default": 18
          },
          "build": {
            "title": "Limb and torso width (%)",
            "type": "number",
            "minimum": 65,
            "maximum": 140,
            "default": 100
          },
          "azimuth": {
            "title": "View azimuth (degrees)",
            "type": "number",
            "minimum": -360,
            "maximum": 360,
            "default": -90
          },
          "elevation": {
            "title": "View elevation (degrees)",
            "type": "number",
            "minimum": 5,
            "maximum": 85,
            "default": 12
          },
          "color": {
            "title": "Figure color (HEX)",
            "type": "string",
            "maxLength": 7,
            "default": "#668f87"
          },
          "joints": {
            "title": "Optional joint overrides (JSON)",
            "type": "string",
            "maxLength": 2000,
            "default": ""
          }
        },
        "required": []
      },
      "PanelcraftFigureReferenceResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schemaVersion",
          "tool",
          "computedAt",
          "inputs",
          "summary",
          "result",
          "units",
          "assumptions",
          "sources",
          "warnings",
          "presentation",
          "links"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string",
            "const": "1.0"
          },
          "tool": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "name",
              "version"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "version": {
                "type": "string"
              }
            }
          },
          "computedAt": {
            "type": "string",
            "format": "date-time"
          },
          "inputs": {
            "type": "object",
            "description": "Normalised inputs actually used, including applied defaults."
          },
          "summary": {
            "type": "string"
          },
          "result": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "project",
              "form",
              "solids",
              "triangles",
              "reference",
              "turnaround",
              "figureFile",
              "model",
              "formFile",
              "openInApp"
            ],
            "properties": {
              "project": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "format",
                  "version",
                  "name",
                  "height",
                  "heads",
                  "shoulders",
                  "hips",
                  "build",
                  "color",
                  "left",
                  "right",
                  "azimuth",
                  "elevation",
                  "outline"
                ],
                "properties": {
                  "format": {
                    "const": "usefulweb-figure"
                  },
                  "version": {
                    "const": 1
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "height": {
                    "type": "number",
                    "minimum": 1200,
                    "maximum": 2200
                  },
                  "heads": {
                    "type": "number",
                    "minimum": 6,
                    "maximum": 9
                  },
                  "shoulders": {
                    "type": "number",
                    "minimum": 0.18,
                    "maximum": 0.32
                  },
                  "hips": {
                    "type": "number",
                    "minimum": 0.13,
                    "maximum": 0.26
                  },
                  "build": {
                    "type": "number",
                    "minimum": 0.65,
                    "maximum": 1.4
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^#[a-fA-F0-9]{6}$"
                  },
                  "left": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "abduction",
                      "flex",
                      "elbow",
                      "hip",
                      "knee"
                    ],
                    "properties": {
                      "abduction": {
                        "type": "number",
                        "minimum": -30,
                        "maximum": 180
                      },
                      "flex": {
                        "type": "number",
                        "minimum": -90,
                        "maximum": 120
                      },
                      "elbow": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 150
                      },
                      "hip": {
                        "type": "number",
                        "minimum": -70,
                        "maximum": 100
                      },
                      "knee": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 150
                      }
                    }
                  },
                  "right": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "abduction",
                      "flex",
                      "elbow",
                      "hip",
                      "knee"
                    ],
                    "properties": {
                      "abduction": {
                        "type": "number",
                        "minimum": -30,
                        "maximum": 180
                      },
                      "flex": {
                        "type": "number",
                        "minimum": -90,
                        "maximum": 120
                      },
                      "elbow": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 150
                      },
                      "hip": {
                        "type": "number",
                        "minimum": -70,
                        "maximum": 100
                      },
                      "knee": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 150
                      }
                    }
                  },
                  "azimuth": {
                    "type": "number",
                    "minimum": -360,
                    "maximum": 360
                  },
                  "elevation": {
                    "type": "number",
                    "minimum": 5,
                    "maximum": 85
                  },
                  "outline": {
                    "type": "boolean"
                  }
                }
              },
              "form": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "format",
                  "version",
                  "name",
                  "units",
                  "grid",
                  "snap",
                  "objects",
                  "scenes"
                ],
                "properties": {
                  "format": {
                    "const": "kerfwise-form"
                  },
                  "version": {
                    "const": 1
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "units": {
                    "enum": [
                      "mm",
                      "in"
                    ]
                  },
                  "grid": {
                    "type": "number",
                    "minimum": 0.1,
                    "maximum": 10000
                  },
                  "snap": {
                    "type": "boolean"
                  },
                  "objects": {
                    "type": "array",
                    "maxItems": 128,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "id",
                        "name",
                        "tag",
                        "color",
                        "profile",
                        "height",
                        "x",
                        "y",
                        "z",
                        "rotation",
                        "visible",
                        "locked"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[-a-zA-Z0-9_]{1,64}$"
                        },
                        "name": {
                          "type": "string",
                          "maxLength": 80
                        },
                        "tag": {
                          "type": "string",
                          "maxLength": 40
                        },
                        "color": {
                          "type": "string",
                          "pattern": "^#[a-fA-F0-9]{6}$"
                        },
                        "profile": {
                          "type": "array",
                          "minItems": 3,
                          "maxItems": 64,
                          "items": {
                            "type": "array",
                            "minItems": 2,
                            "maxItems": 2,
                            "items": {
                              "type": "number",
                              "minimum": -100000,
                              "maximum": 100000
                            }
                          }
                        },
                        "height": {
                          "type": "number",
                          "minimum": 1,
                          "maximum": 100000
                        },
                        "x": {
                          "type": "number",
                          "minimum": -100000,
                          "maximum": 100000
                        },
                        "y": {
                          "type": "number",
                          "minimum": -100000,
                          "maximum": 100000
                        },
                        "z": {
                          "type": "number",
                          "minimum": -100000,
                          "maximum": 100000
                        },
                        "rotation": {
                          "type": "number"
                        },
                        "tiltX": {
                          "type": "number",
                          "minimum": -180,
                          "maximum": 180
                        },
                        "tiltY": {
                          "type": "number",
                          "minimum": -180,
                          "maximum": 180
                        },
                        "visible": {
                          "type": "boolean"
                        },
                        "locked": {
                          "type": "boolean"
                        },
                        "orthogonal": {
                          "type": "string",
                          "maxLength": 12000
                        }
                      }
                    }
                  },
                  "scenes": {
                    "type": "array",
                    "maxItems": 8,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "name",
                        "camera"
                      ],
                      "properties": {
                        "name": {
                          "type": "string",
                          "maxLength": 60
                        },
                        "camera": {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "azimuth",
                            "elevation",
                            "span",
                            "target"
                          ],
                          "properties": {
                            "azimuth": {
                              "type": "number"
                            },
                            "elevation": {
                              "type": "number",
                              "minimum": 5,
                              "maximum": 90
                            },
                            "span": {
                              "type": "number",
                              "minimum": 10,
                              "maximum": 1000000
                            },
                            "target": {
                              "type": "array",
                              "minItems": 3,
                              "maxItems": 3,
                              "items": {
                                "type": "number"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              },
              "solids": {
                "type": "number"
              },
              "triangles": {
                "type": "number"
              },
              "reference": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "description": "Download path on the same site (valid for about 2 hours)."
                  }
                }
              },
              "turnaround": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "description": "Download path on the same site (valid for about 2 hours)."
                  }
                }
              },
              "figureFile": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "description": "Download path on the same site (valid for about 2 hours)."
                  }
                }
              },
              "model": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "description": "Download path on the same site (valid for about 2 hours)."
                  }
                }
              },
              "formFile": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "description": "Download path on the same site (valid for about 2 hours)."
                  }
                }
              },
              "openInApp": {
                "type": "string"
              }
            }
          },
          "units": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "title"
              ],
              "properties": {
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "publisher": {
                  "type": "string"
                },
                "retrievedAt": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                }
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "presentation": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Display blocks used by the human page (same data)."
          },
          "links": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "human",
              "api",
              "openapi",
              "methodology"
            ],
            "properties": {
              "human": {
                "type": "string",
                "format": "uri"
              },
              "api": {
                "type": "string",
                "format": "uri"
              },
              "openapi": {
                "type": "string",
                "format": "uri"
              },
              "methodology": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      }
    }
  }
}