ModelParameters

Updated at:

Parameter

Type

Description

Example

object

The model generation parameters used to control the output length, randomness, sampling range, repetition penalty, and stop sequences.

temperature

number

The temperature parameter that controls the randomness of the output, with a range of 0 to 2.

0.7

maxTokens

integer

The maximum number of output tokens.

1024

topP

number

The Top P sampling parameter, with a range of 0 to 1.

0.9

topK

integer

The Top K sampling parameter, with a range of 1 to 100.

50

frequencyPenalty

number

The frequency penalty where positive values reduce repetition, with a range of -2.0 to 2.0.

0.2

presencePenalty

number

The presence penalty where positive values encourage new topics, with a range of -2.0 to 2.0.

0.1

stopSequences

array

The stop sequences that immediately halt generation when encountered.

["END"]

string

The individual stop sequence.

END

responseFormat

object

The response content format, which defaults to text if not specified.

{"type":"json_schema","jsonSchema":{"name":"answer","strict":true,"schema":"{\"type\":\"object\",\"properties\":{\"answer\":{\"type\":\"string\"}},\"required\":[\"answer\"]}"}}

type

string

The format type. Valid values: text, json_object, and json_schema. When using json_object, the prompt must explicitly request JSON output.

json_object

jsonSchema

object

The JSON Schema constraint, which is required when the type is json_schema.

{"name":"answer","strict":true,"schema":"{\"type\":\"object\",\"properties\":{\"answer\":{\"type\":\"string\"}},\"required\":[\"answer\"]}"}

name

string

The schema name.

answer

strict

boolean

Specifies whether to strictly adhere to the schema structure. Set this to true.

true

schema

string

The JSON Schema definition, which is a serialized string of a JSON object.

{"type":"object","properties":{"answer":{"type":"string"}},"required":["answer"]}

repetitionPenalty

number

The repetition penalty that controls the repetition of consecutive sequences. The value must be greater than 0. A value of 1.0 indicates no penalty, and a larger value results in less repetition.

1.05

seed

integer

The random seed, with a range of 0 to 2147483647, which attempts to return the same result for the same input and parameters.

1234

enableThinking

boolean

Specifies whether to enable thinking mode. This takes effect only for hybrid thinking models and defaults to false if not specified.

true

maxCompletionTokens

integer

The maximum number of output tokens, including the chain-of-thought and the response. This is recommended for thinking models.

4096

thinkingBudget

integer

The maximum number of tokens for the thinking process. This takes effect only when thinking mode is enabled and cannot be set simultaneously with reasoningEffort.

2048

reasoningEffort

string

The reasoning effort level. This takes effect only when thinking mode is enabled. For the Qwen3.8 series, valid values are low, medium, and xhigh. This cannot be set simultaneously with thinkingBudget.

low

enableCacheControl

boolean

Specifies whether to enable explicit caching for system messages.

true

extraBody

string

The extended parameters, which are a serialized string of a JSON object. These are merged into the top level of the model request body to pass through other Model Studio parameters.

{"enable_search":false}