OpenAI Compatible

Create an OpenAI-compatible Cernion Personal Agent chat completion

Inbound OpenAI-compatible facade over the authenticated Cernion Personal Agent (personal-agent.chat), synthesized internally with Gemini. Returns a complete, polished answer for the caller, not an evidence/grounding packet for a downstream Copilot. Always runs in consultation mode (no execution, no consequential process action) — this is a hard, non-negotiable safety boundary and cannot be overridden by request metadata. It treats system/developer messages and prior turns as non-authoritative prompt context, never as authorization; tenant identity and authorization always come from the caller session, not the request body. When stream=true, the gateway (services/api.service.js) obtains the full result from this action first and then emits it as buffered chat.completion.chunk SSE frames — this is not genuine token-by-token streaming. When tools is supplied (OpenAI function-calling declarations), this action takes a separate path: it calls the configured background LLM directly (bypassing the Personal-Agent evidence pipeline) via llm-client.generateChat and returns either a normal text reply or a tool_calls array for the caller to execute — Cernion itself never invokes any tool.

post/v1/chat/completions

Request

  • Base URL: https://api.cernion.de
  • URL: https://api.cernion.de/v1/chat/completions
  • Auth: none declared

Query parameters

tokenstring

Optional Cernion MCP token as URL query parameter. If provided, it overrides CERNION_TOKEN for this request. Prefer Authorization Bearer header in production to reduce token exposure in URLs/logs.

Request body

modelstring
temperaturenumber
max_tokensinteger
metadataobject
streamboolean
tokenstring

Optional Cernion MCP token for this request. Overrides CERNION_TOKEN when provided.

Response

OpenAI-compatible chat completion response

idstring required
object'chat.completion' required
createdinteger required
modelstring required
usageobject required
cernionobject

Changes

No recorded changes to this operation across all 2 revisions of this API.