Skip to main content
POST
OpenAI-compatible chat-completions endpoint routed through an LLM gateway

Authorizations

Authorization
string
header
required

JWT token (USER, AGENT, or SERVICE auth)

Headers

X-Correlation-Id
string

Swarmd correlation id stitched into audit events. The MdcLoggingFilter extracts it from this header (or generates a UUID when absent) and the chain propagates it onto every emitted audit event so multi-agent + multi-LLM workloads are joined by a single id.

Path Parameters

gatewayId
string<uuid>
required

Body

application/json
messages
object[]
required
Minimum array length: 1
model
string
temperature
number<double>
max_tokens
integer<int32>
top_p
number<double>
stream
boolean
metadata
object
tools
object[]
tool_choice
any
response_format
any
parallel_tool_calls
boolean
seed
integer<int32>

Response

200 - application/json

OK

The response is of type object.