Skip to main content
POST
Create chat completion

Authorizations

Authorization
string
header
required

Session JWT from Ageneral sign-in. Send as Authorization: Bearer <token>.

Headers

Ageneral-Project-Id
string
required

Project id. You must be a member with access.

Ageneral-Session-Id
string

Existing platform chat session to continue. Omit to create a new session on first non-/new turn.

Body

application/json

Aligned with OpenAI Create chat completion. The server may override or fill model and merges prior turns from storage.

messages
object[]
required
model
string

Optional provider/model; a default applies when omitted.

Example:

"openai/gpt-4o-mini"

stream
boolean
temperature
number
max_tokens
integer
tools
object[]

Response

Success. JSON completion object or text/event-stream when streaming.

OpenAI-compatible chat completion object when not streaming.