Broomva

Chat API

Call the OpenAI-compatible chat-completions endpoint.

Chat API

The supported external surface is POST /api/v1/chat/completions. It uses the OpenAI Chat Completions request and response shapes. The in-app /api/chat route is an internal UI-message stream and is not the public SDK contract.

Authentication

Send a current Broomva bearer token. Anonymous requests are rejected. Tokens are issued only after current Terms, Privacy, processing-authorization, and age confirmation are recorded, and are invalidated when the policy manifest changes.

Authorization: Bearer <BROOMVA_API_TOKEN>
Content-Type: application/json

Request

{
  "model": "claude-sonnet-4",
  "messages": [
    { "role": "user", "content": "Explain event sourcing in three sentences." }
  ],
  "stream": true
}
FieldTypeRequiredCurrent behavior
modelstringYesMust resolve in the deployed edge model registry
messagesarrayYesOpenAI-compatible message history
streambooleanNotrue returns OpenAI-compatible SSE; false returns JSON
toolsarrayNoOpenAI tool definitions; support depends on the deployed runtime

A familiar provider model name is not proof that a backend is enabled. Unsupported model IDs return a model error. Image inputs and n &gt; 1 choices are not supported by this endpoint.

Response and errors

With stream: true, the response is OpenAI-compatible data: SSE chunks and ends with data: [DONE]. With stream: false, the response is an OpenAI-style chat-completion JSON object.

StatusMeaning
400Invalid request or unsupported model
401Missing, expired, or stale-policy token
403Current legal acceptance is required
429Rate limit exceeded
503Life gateway is not configured or available
5xxRuntime or upstream failure

Model availability, tool support, limits, and credits depend on the deployed configuration and authenticated account. File attachments and generated-image storage are currently disabled pending private signed storage.

On this page