Reference

API reference

OpenAI-compatible chat completions against your own governed flows.

Everything the console does runs over an HTTP API authenticated with your platform API key (Settings → API keys). The primary endpoint is an OpenAI-compatible chat completion that runs one of your flows — including its bound tools and governance.

Authentication

Send your platform API key as a bearer token. Keys are shown once at creation, can be rotated, and can be disabled — the last active key cannot be disabled, so you cannot lock yourself out.

Chat with a flow

curl -X POST https://api.toolsanatomy.com/v1/chat/completions \
  -H "Authorization: Bearer <your platform api key>" \
  -H "Content-Type: application/json" \
  -H "X-Flow-ID: <flow id>" \
  -d '{
    "messages": [
      {"role": "user", "content": "Order 2kg of espresso beans"}
    ]
  }'

Headers

  • X-Flow-ID (required) — which of your flows answers. Find the ID on the flow's page.
  • X-Contact-ID (optional) — an external customer identifier; lets the runtime resolve that customer's context values for tool calls.
  • X-Conversation-ID (optional) — an external conversation identifier to continue a thread across requests.

Response

The response follows the OpenAI chat-completion shape. When the flow executes tools, the governed execution happens server-side within the request; the reply reflects the tool results. Failures are explicit: flow_disabled, flow_not_found, or a validation error — never a silent fallback.

Flow management (create, list, update) is also available over the API under /v1/flows with the same key. Provider keys are write-only: no read endpoint returns them.