Skip to main content
The chat completions endpoint is fully compatible with the OpenAI chat completions API. Lilac serves models via a customized fork of vLLM tuned for idle-GPU scheduling and shared warm endpoints, so you get access to both standard OpenAI parameters and vLLM-specific extras.

Endpoint

Basic Example

Request Parameters

Required

Sampling

Output

Penalties

Log Probabilities

Tool Calling

Structured Output

Reasoning

Some models (like Kimi K2.6 and GLM 5.2) include chain-of-thought reasoning by default. When reasoning is active, the model’s chain-of-thought is returned in a separate reasoning field on the response message. Reasoning tokens are included in completion_tokens and count toward your usage — including all reasoning controls below. These are model-specific chat-template controls, not universal OpenAI parameters. The exact key and accepted values depend on each model’s chat template.

Per-model reasoning controls

Notes:
  • GLM 5.2 supports reasoning_effort with two levels — high (default) and max. max is the opt-in highest-quality mode for long-horizon agentic and complex problem-solving tasks, at the cost of higher latency and token usage. You can send reasoning_effort either as a top-level field (OpenAI-style) or inside chat_template_kwargs. Disable thinking entirely with chat_template_kwargs.enable_thinking: false; when thinking is disabled, reasoning_effort has no effect.
  • MiniMax M3 does not use a boolean toggle. It accepts thinking_mode with three values: adaptive (default — the model decides), enabled (always think), and disabled (never think).
  • Defaults differ per model: Kimi K2.6 and GLM 5.2 have reasoning on by default; Gemma 4 has reasoning off by default; MiniMax M3 is adaptive by default. See the Models page for per-model details.

Thinking toggle keys

The key that toggles reasoning is defined by each model’s chat template, not by the API, so it differs per model family: Unknown keys inside chat_template_kwargs are silently ignored by chat templates, so the safe, forward-compatible approach is to send both keys. This works across all current Lilac models and any future model whose template uses either convention:
If you’re targeting a single model on purpose (e.g. for minimal payloads) and want to use only the key its template actually honors, see the per-model notes on the Models page.
GLM 5.x chain-of-thought leakage. Even with the correct toggle key, GLM 5.x models on the current vLLM build may still leak chain-of-thought into the content field, terminated by a bare </think> marker — see vllm-project/vllm#31319. Clients that require hard-suppressed output should post-process the response: when reasoning is disabled, discard everything in content up to and including the first </think> marker.
Disabling reasoning can significantly reduce token costs for straightforward queries where chain-of-thought isn’t needed. Reasoning tokens always count toward completion_tokens and your billed usage.

Streaming

Enable streaming to receive tokens as they’re generated:

Vision

Pass images as URLs or base64 data URIs in the content array:

Tool Calling

Structured Output

Force the model to return valid JSON matching a schema:

Response Format

The reasoning field is present when the model uses chain-of-thought reasoning. It is not counted separately in the response — reasoning tokens are included in completion_tokens.