Skip to main content

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

    vendor stringrequired

    Possible values: [qwen]

    The model vendor. Currently available: qwen.

    model stringrequired

    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

    culture string

    Use this param to override the culture of the response. Options: - en (default) - es

Body

required

    messages

    object[]

    nullable

    required

  • Array [

  • oneOf

    name stringnullable

    content

    object

    required

  • ]

  • model stringnullablerequired
    audio nullable
    frequency_penalty floatnullable
    function_call nullabledeprecated
    functions undefined[]nullabledeprecated

    logit_bias

    object

    nullable

    property name* int32
    logprobs booleannullable
    max_completion_tokens int32nullable
    max_tokens int32nullabledeprecated

    metadata

    object

    nullable

    property name* string
    modalities string[]nullable
    n int32nullable
    parallel_tool_calls booleannullable
    prediction nullable
    presence_penalty floatnullable
    prompt_cache_key stringnullable
    reasoning_effort stringnullable

    response_format

    object

    text

    object

    jsonSchema

    object

    json_schema

    object

    required

    name stringnullablerequired
    description stringnullable
    schema required
    strict booleannullable

    jsonObject

    object

    safety_identifier stringnullable
    seed int64nullable
    service_tier stringnullable

    stop

    object

    store booleannullable
    stream booleannullable
    stream_options nullable
    temperature floatnullable

    tool_choice

    object

    allowedTools

    object

    allowed_tools

    object

    required

    mode stringnullablerequired

    tools

    object[]

    nullable

    required

  • Array [

  • type stringnullablerequired

    function

    object

    name stringnullablerequired
  • ]

  • functionTool

    object

    function

    object

    required

    name stringnullablerequired

    customTool

    object

    custom

    object

    required

    name stringnullablerequired

    tools

    object[]

    nullable

  • Array [

  • oneOf

    function

    object

    required

    name stringnullablerequired
    description stringnullable
    parameters nullable
    strict booleannullable
  • ]

  • top_logprobs int32nullable
    top_p floatnullable
    verbosity stringnullable
    web_search_options nullable

Responses​

OK

Loading...