Chat completion (Preview)
POST/api/v2/inference/:vendor/:model/chat/completions
> 🧪 Preview — This endpoint is in preview and its contract may change.
Creates a model completion for the given chat conversation using an OpenAI-compatible Chat Completions API. Serenity Cloud models are exposed as OpenAI-compatible endpoints, so you can call them with the OpenAI SDKs by pointing the base URL at this route and passing your Serenity API key as a Bearer token.
When stream is true, the response is delivered as Server-Sent Events (SSE).
Request​
Path Parameters
Possible values: [qwen]
The model vendor. Currently available: qwen.
Possible values: [qwen3.6, qwen3.6-27b, qwen3.6-35b-a3b]
The model identifier. Currently available models for qwen: qwen3.6, qwen3.6-27b, qwen3.6-35b-a3b. This list grows as models are deployed.
Query Parameters
Use this param to override the culture of the response. Options: - en (default) - es
- application/json
Body
required
Array [
- DeveloperMessage
- SystemMessage
- UserMessage
- AssistantMessage
- ToolMessage
- FunctionMessage
]
Array [
]
Array [
- FunctionTool
- CustomTool
]
messages
object[]
nullable
required
oneOf
content
object
required
content
object
required
content
object
required
content
object
required
content
object
required
content
object
required
logit_bias
object
nullable
metadata
object
nullable
response_format
object
text
object
jsonSchema
object
json_schema
object
required
jsonObject
object
stop
object
tool_choice
object
allowedTools
object
allowed_tools
object
required
tools
object[]
nullable
required
function
object
functionTool
object
function
object
required
customTool
object
custom
object
required
tools
object[]
nullable
oneOf
function
object
required
custom
object
required
format
object
Responses​
- 200
- 400
- 401
- 403
- 500
OK
There was a validation error. Please check your request data.
- application/json
- Schema
- Example (from schema)
Schema
errors
object
nullable
{
"message": "string",
"errors": {}
}
The user is unauthorized or the session expired
The user does not have permission
There was an unexpected error