Skip to main content
Published Spaces let organization administrators expose configured as standalone HTTP chat endpoints. External applications, customer portals, internal bots, or automated workflows can send multi-turn conversations to a published Space and receive responses grounded in the Space’s instructions, configured model, and Space knowledge.
Before calling this endpoint, an administrator must publish the Space in Team Settings > Published Spaces and copy its unique endpoint URL. Learn more in Published Spaces.
Capability URL & Privacy Notice:
  • Authentication via {endpointId}: POST /v1/endpoints/{endpointId}/chat does not require or check X-API-Key. Possession of the {endpointId} UUID authorizes requests to that published Space. Keep the endpoint URL secret on your server and never embed it directly in public client-side code.
  • Privacy Filter Disabled: The Omnifact Privacy Filter is disabled on Published Space endpoints so external integrations receive raw completions.

Endpoint

POST /v1/endpoints/{endpointId}/chat

Path Parameters

Request Headers

Request Body (application/json)

Message Sequence Rules

The API strictly validates conversation history on every request:
  1. messages must contain at least one message, and every content string must be non-empty.
  2. Only "user" and "assistant" roles are accepted ("system" is rejected; configure system behavior in the Space’s Space Instructions).
  3. Both the first message and the last message in messages must have role: "user".
  4. Roles must strictly alternate (user → assistant → user). Consecutive messages with the same role return 400 (unexpected_message_order).

Response Formats

1. Standard JSON Response (streaming: false)

When streaming is false, the endpoint completes generation and returns a single JSON object containing id, content, tokenUsage, and either references (default) or sources (when omnifact-enable-inline-sources: true).

Example Request

JSON Response (200 OK)


2. SSE Streaming Response (streaming: true)

When streaming is true, the endpoint streams Server-Sent Events (Content-Type: text/event-stream).

SSE Event Types

Example Streaming Request

SSE Stream Output Example


Error Codes & Model Compatibility

Model Compatibility Note: Models that only support tool calling via the OpenAI Responses API, specifically GPT-6.1 Sol (OpenAI and Azure OpenAI), are excluded from Published Space endpoints (invalid_endpoint_setup). Select models such as GPT-6.1 Terra, Claude Sonnet 5.5, Gemini 4 Argon, or Mistral Large 4 when publishing a Space.

Code Examples

Next Steps