Parameters¶
You can tune the model's output with the request parameters on {base_url}/v1/chat/completions. This page covers Macaron-V1.1 (macaron-v1.1, macaron-v1.1-venti, macaron-v1.1-coding-venti) and glm-5.3.
Macaron-V1.1 is post-trained from GLM-5.3 and uses the same base model, so its parameters match GLM-5.3. The original Macaron-V1 models and glm-5.2 follow the parameters of their own base models. For model IDs, see Models.
Quick reference¶
| Parameter | Type | Default | Description |
|---|---|---|---|
thinking |
object | {"type": "enabled"} |
Thinking configuration. Thinking is always on; clear_thinking controls whether earlier reasoning is kept. |
reasoning_effort |
string | max |
Reasoning depth: low, high, or max. |
do_sample |
boolean | true |
Whether to sample. false always picks the most likely token. |
temperature |
float | 1.0 |
Sampling randomness, [0.0, 1.0]. |
top_p |
float | 0.95 |
Nucleus sampling threshold, [0.01, 1.0]. |
max_tokens |
integer | 65536 |
Maximum tokens to generate, up to 131072. |
stream |
boolean | false |
Stream the response as Server-Sent Events. |
tool_stream |
boolean | false |
Stream function-call arguments as they are generated. |
tools |
array | none | Functions the model can call, up to 128. |
stop |
array | none | Up to 4 stop strings. |
response_format |
object | {"type": "text"} |
text or json_object. |
Parameter details¶
thinking¶
thinking controls the model's chain-of-thought reasoning. On Macaron-V1.1 and GLM-5.3, thinking is always on, and reasoning depth is set with reasoning_effort.
- Type: object
Properties:
type(string):enabled(default). Thinking cannot be turned off. Requests that setdisabledfail. For faster responses, keepenabledand setreasoning_efforttolow.clear_thinking(boolean): whether to dropreasoning_contentfrom earlier turns. It only affects reasoning from previous turns and does not change whether the model thinks in the current turn.true(default): reasoning from earlier turns is ignored, and only visible content, tool calls, and tool results are used as context. This keeps context length and cost down for chat and light tasks.false: preserved thinking. Reasoning from earlier turns is kept in the context. You must pass back the fullreasoning_contentfrom earlier turns inmessages, unmodified and in the original order. Missing, trimmed, rewritten, or reordered reasoning reduces quality or disables the feature. Recommended for coding and agent workloads.
{
"model": "macaron-v1.1-venti",
"thinking": {"type": "enabled", "clear_thinking": false},
"reasoning_effort": "max"
}
Best practices:
- Thinking supports interleaved reasoning: the model can reason between tool calls and after it receives tool results. When you use tools, return the assistant's
reasoning_contenttogether with the tool results. - For multi-turn coding or agent sessions, set
clear_thinking: falseand pass reasoning back unchanged to keep the reasoning continuous and improve cache hits.
reasoning_effort¶
reasoning_effort controls how deeply the model reasons.
- Type: string
- Values:
low,high,maxlow: light reasoning.high: enhanced reasoning.max(default): deep reasoning.
Best practices:
- Use
maxfor complex tasks such as coding. - Use
lowwhen you need faster responses and less reasoning, for example simple Q&A or rewriting text.
curl <BASE_URL>/v1/chat/completions \
-H "Authorization: Bearer <MACARON_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "macaron-v1.1-venti",
"messages": [
{"role": "user", "content": "Design and implement a personal blog site with a home page, post list, and post detail page."}
],
"thinking": {"type": "enabled"},
"reasoning_effort": "max",
"max_tokens": 65536,
"temperature": 1.0
}'
do_sample¶
do_sample decides whether the output is sampled.
true(default): sample from each token's probability distribution usingtemperatureandtop_p. Output is more varied. Suited to writing and conversation.false: always choose the most likely next token.temperatureandtop_pare ignored. Output is more deterministic.
Best practices:
- For tasks that need consistent, repeatable output, such as code generation or translation, set
false. - For more varied output, keep
trueand tunetemperatureortop_p.
temperature¶
temperature controls output randomness.
- Range:
[0.0, 1.0], up to two decimal places. Default1.0. - Lower values (such as
0.2) make output more focused and deterministic. Suited to factual Q&A. - Higher values (such as
0.8) make output more random and creative. Suited to creative writing and brainstorming.
Best practices:
- Adjust either
temperatureortop_p, not both.
top_p¶
top_p (nucleus sampling) samples from the smallest set of tokens whose cumulative probability reaches the threshold.
- Range:
[0.01, 1.0], up to two decimal places. Default0.95. - Lower values (such as
0.2) narrow the candidates and make output more focused. - Higher values (such as
0.9) widen the candidates and make output more varied.
Best practices:
- Adjust either
temperatureortop_p, not both.
max_tokens¶
max_tokens limits how many tokens the model generates in one call. Reasoning tokens count toward this limit.
- Default:
65536. Maximum:131072(128K). A value of at least1024is recommended. max_tokenslimits only generated content, not the input.- If the model finishes before the limit, it stops normally. If it reaches the limit, the output is truncated and
finish_reasonislength. max_completion_tokensis accepted as an alias.
A token is the basic unit of text. One token is roughly 0.75 English words or 1.5 Chinese characters.
Best practices:
- Leave room for reasoning. With thinking always on, a small
max_tokenscan be used up before the answer starts.
stream¶
stream controls how the response is returned.
false(default): return the complete response at once.true: stream the response as Server-Sent Events (SSE).
When streaming, reasoning arrives in delta.reasoning_content chunks before the answer's delta.content chunks. The stream ends with data: [DONE].
Best practices:
- For chat interfaces and real-time code generation, set
true.
tool_stream¶
tool_stream streams function-call arguments as they are generated, instead of returning each call only once it is complete. It requires stream: true.
false(default): each tool call arrives once it is complete.true: tool-call arguments arrive incrementally.
tools¶
tools lists the functions the model can call. Up to 128 functions are supported. tool_choice controls how the model chooses a tool; it defaults to and supports only auto.
{
"tools": [{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get weather for a city",
"parameters": {
"type": "object",
"properties": {"city": {"type": "string"}},
"required": ["city"]
}
}
}],
"tool_choice": "auto"
}
Calls are returned in choices[0].message.tool_calls with finish_reason: "tool_calls". Return each result as a tool message with the matching tool_call_id, together with the assistant message and its reasoning_content.
stop¶
stop is a list of up to 4 strings. Generation stops as soon as one of them appears in the output, for example ["stop_word1"].
response_format¶
response_format sets the output format.
{"type": "text"}(default): plain text.{"type": "json_object"}: JSON output. Describe the expected fields in the prompt.
Reading the response¶
- The answer is in
choices[0].message.content, and reasoning is inchoices[0].message.reasoning_content. usage.prompt_tokensandusage.completion_tokensreport input and output tokens. Output tokens include reasoning tokens, reported separately inusage.completion_tokens_details.reasoning_tokens.
Related concepts¶
Token usage
A token is the basic unit the model processes. Usage includes input tokens (the text you send) and output tokens (the text the model generates, including reasoning). Billing is based on both. See Usage for the fields the dashboard tracks.
Maximum output tokens
Maximum output tokens is the most the model can generate in one request: 128K for Macaron-V1.1 and GLM-5.3. It differs from max_tokens, which is the limit you set per request.
Context window
The context window is the total number of tokens the model can handle in one interaction, including input and generated text. Macaron-V1.1 and GLM-5.3 support a 1M context window with text input. In long conversations or with long documents, keep the total within this limit.
Concurrency and rate limits
Your account's RPM and concurrency quota are shown in the dashboard. Requests beyond the limit may fail or wait. See Authentication.