OpenAI-compatible
Chat completions
POST
One turn with the agent model names, in OpenAI's request and answer shapes, so an OpenAI SDK works with its base URL set to /api/v1/openai. The request carries the whole conversation and its last message is the user's. stream: true answers as chat.completion.chunk events ending with data: [DONE]. The agent's own tools run on SynapseOrch's side, so a request cannot bring tools. Errors are in OpenAI's shape. See OpenAI-compatible API.
apiKeyheader
AuthorizationBearer <token>An API key, sk-syn- and 32 characters. On SynapseOrch Cloud an owner or admin makes it under Settings → Developer; on a self-hosted install, under Settings → API Keys.
application/json- body
model?stringmessages?array<>A chat completion; with stream true, server-sent chat.completion.chunk events ending with data: [DONE].
- response
id?stringobject?stringcreated?integermodel?stringchoices?array<>usage?curl -X POST "https://api.synapseorch.com/api/v1/openai/chat/completions" \ -H "Authorization: Bearer sk-syn-..." \ -H "Content-Type: application/json" \ -d '{ "model": "Support Bot", "messages": [ { "role": "user", "content": "Where is my order 4417?" } ] }'{ "id": "chatcmpl-5c1e9a7b3d2f4e6a8b0c1d2e", "object": "chat.completion", "created": 1726412345, "model": "Support Bot", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "Order 4417 shipped on Monday; it should arrive by Thursday." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 812, "completion_tokens": 21, "total_tokens": 833 }}