Skip to content

REST API

openIE CAD serves a small HTTP API under cad.openie.dev. The MCP endpoint at /mcp is the primary agent surface; this REST API is intended for simple direct calls and health checks.

For a guided introduction, see the quickstart. For the agent tooling, see the MCP tools reference.

Liveness check for the service.

Terminal window
curl https://cad.openie.dev/api/health

Returns the running service version.

Terminal window
curl https://cad.openie.dev/api/version

Returns a summary of the current project: its name, the number of bodies, and the number of recorded events.

Terminal window
curl https://cad.openie.dev/api/project
{
"name": "...",
"body_count": 0,
"event_count": 0
}

Returns the list of bodies in the project, each identified by its id.

Terminal window
curl https://cad.openie.dev/api/bodies
[
{ "id": "..." }
]

Creates a box in the kernel. The request body provides width, height, and depth; the response returns the new body_id.

Terminal window
curl -X POST https://cad.openie.dev/api/kernel/create-box \
-H "Content-Type: application/json" \
-d '{"width": 10, "height": 20, "depth": 5}'
{
"body_id": "..."
}

Creates a cylinder in the kernel. The request body provides radius and height; the response returns the new body_id.

Terminal window
curl -X POST https://cad.openie.dev/api/kernel/create-cylinder \
-H "Content-Type: application/json" \
-d '{"radius": 3, "height": 15}'
{
"body_id": "..."
}

The same host also serves the agent and authentication surfaces:

  • /mcp — MCP Streamable HTTP endpoint
  • /oauth/* — OAuth 2.0 provider
  • /.well-known/oauth-authorization-server — OAuth discovery
  • /.well-known/oauth-protected-resource — OAuth discovery