Skip to content

OpenAI-compatible API

If your tool speaks the OpenAI Chat Completions protocol, you can query your M365 data without configuring MCP at all. The serve mode runs a local HTTP server that any OpenAI-compatible client can talk to.

Terminal window
npx -y @stuffbucket/workiq-proxy serve

The server starts on port 11435 by default and seeks the next available port if busy.

Terminal window
npx -y @stuffbucket/workiq-proxy serve --port 8080
POST http://localhost:11435/v1/chat/completions
{
"model": "workiq",
"messages": [
{ "role": "user", "content": "What emails did I get today?" }
]
}

Standard OpenAI Chat Completions response format with the Work IQ answer in choices[0].message.content.

Point any tool at http://localhost:11435 as the base URL. No API key required (the server uses your local Work IQ auth tokens).

Terminal window
curl http://localhost:11435/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"workiq","messages":[{"role":"user","content":"What meetings do I have tomorrow?"}]}'
from openai import OpenAI
client = OpenAI(base_url="http://localhost:11435/v1", api_key="unused")
response = client.chat.completions.create(
model="workiq",
messages=[{"role": "user", "content": "Find my recent documents about budgets"}],
)
print(response.choices[0].message.content)