REFERENCE

API reference

Every public endpoint with its request and response shapes, generated from the same constants the routes use. The full OpenAPI 3.1 document is at /openapi.json; every docs page is also available as markdown by appending .md, and /llms.txt indexes them for agents.

Machine-readable

/openapi.jsonOpenAPI 3.1

The complete schema: every endpoint, request body, response, and error type. Import it into Postman, Bruno, or a code generator.

/docs/<page>.mdMarkdown

Any docs page as plain markdown for agents and terminals, for example /docs/cad-extract.md.

/llms.txt, /llms-full.txtIndex

The docs index and the full text of every page for LLM context.

/api/mcpMCP

Model Context Protocol server: the same calls as tools, prompts, and resources.

/.well-known/skills/index.jsonAgent Skills

SKILL.md files an agent loads on demand: npx skills add https://fourechelon.com.

Authentication

Send Authorization: Bearer fe_live_.... Keys come from the dashboard and are hashed at rest. GET /api/v1/models and GET /api/health need no key. Non-2xx responses are never billed; every response carries X-Request-ID.

get/api/v1/modelsModels

List models and runtime availability

Public. Returns the model cards with pricing, supported tasks, and input modalities, plus whether the desktop inference runtime is available right now (runtime_available). Never billed.

200success

Model list

post/api/v1/responsesRowe

Run Rowe over a scene

Send a cad_scene (from /api/v1/cad/extract, ideally target_contract both) or a point_cloud_scene with a task_type. Returns typed spatial output, usage, and a request_id. Worker validation failures are 422 invalid_request_error; an unavailable runtime is 503 desktop_inference_unavailable. Requests wait up to 18 s for the desktop worker.

200success

Typed spatial output

400error

invalid_request_error: bad body, model, or Idempotency-Key

401error

authentication_error: missing, revoked, or invalid API key

402error

payment_required: an active or trialing paid API subscription is required

409error

idempotency_conflict / idempotency_in_progress

422error

invalid_request_error: the Rowe worker rejected the input (for example a task that needs an image, or a point cloud kind outside unknown/box/surface/container)

429error

rate_limit_exceeded (per-minute or billing-period ceiling; see Retry-After)

503error

desktop_inference_unavailable / billing_unavailable / usage_finalization_unavailable

post/api/v1/responses/batchRowe

Run up to 32 Rowe requests in one call

Each item has the same shape as POST /api/v1/responses. The envelope returns 200 when every item succeeded and 207 when any item failed; data[] is in request order and every entry carries its own status.

200success

Every item succeeded

207success

At least one item failed

400error

invalid_request_error

401error

authentication_error

413error

request_too_large

post/api/v1/cad/extractFour Cad

Extract a CAD, drawing, or draw.io file

Accepts STEP, STP, IGES, IGS, DXF, PDF, SVG, DRAWIO, XML, PNG (xml and png only when they carry a draw.io diagram). Send the file as multipart/form-data, as JSON with content_base64, or as JSON with content_url for the server to download. The hosting platform caps request bodies at about 6 MB, so inline uploads work up to roughly 4 MB; larger files (up to 26214400 bytes) must use content_url. Returns four-cad.extraction.v1. Billed as input tokens = ceil(bytes / 4) and output tokens = ceil(response JSON / 4); non-2xx is never billed.

200success

four-cad.extraction.v1

400error

invalid_request_error: missing file_name, bad base64, refused content_url, or invalid target_contract

401error

authentication_error

402error

payment_required

413error

request_too_large: body over the ~6 MB platform limit or file over 25 MB

415error

unsupported_file_type (SolidWorks native files: export STEP)

422error

parse_error / timeout_error passed through from the converter

503error

converter_unavailable

post/api/v1/cad/extract/batchFour Cad

Submit up to 32 files for asynchronous extraction

Multipart (repeat the files part) or JSON items[]. Returns 202 with a batch id and status_url; poll GET /api/v1/cad/extract/batch/{id}. Results and staged files are deleted 24 hours after submission. Only 2xx items are billed.

202success

Batch accepted

400error

invalid_request_error (details name the offending item)

401error

authentication_error

413error

request_too_large

415error

unsupported_file_type (the whole batch is rejected before anything is staged)

429error

rate_limit_exceeded: more than 5 batches in flight or 10 submitted per minute on one key

get/api/v1/cad/extract/batch/{id}Four Cad

Poll a batch

200success

Batch status and per-item results

401error

authentication_error

404error

not_found: unknown id or another account's batch

post/api/v1/cad/import-feature-treePartners

Import a partner feature tree as a cad_scene

For CAD partners (Adam, Onshape-style feature trees). Authenticated with the caller's API key; the feature tree becomes a scene Rowe can reason over.

200success

Imported scene

400error

invalid_request_error

401error

authentication_error

402error

payment_required

post/api/v1/cad/partner-webhookPartners

Receive a signed partner feature-tree event

Signed with HMAC-SHA256 over the raw body using the partner webhook secret, sent in X-Four-Echelon-Signature. Unsigned or badly signed posts are 401.

200success

Accepted

401error

invalid or missing signature

post/api/mcpMCP

Model Context Protocol server (Streamable HTTP, stateless JSON)

JSON-RPC 2.0. Methods: initialize, ping, tools/list, tools/call, prompts/list, prompts/get, resources/list, resources/read. Tools: extract_cad, extract_cad_from_url, rowe_respond, list_models, list_supported_formats. Billed tools forward to the REST routes they mirror under the same Authorization header. A missing key on a billed tool is HTTP 401 with a JSON-RPC error.

200success

JSON-RPC response or batch

202success

Notification accepted (no body)

401error

Billed tool called without Authorization

get/api/healthOperations

Aggregate health

Public. 200 with status healthy or degraded, 503 when down. Checks Convex, the Four Cad converter, the Rowe runtime, and desktop inference availability (rowe_availability).

200success

healthy or degraded

503error

down