GET

/v1/schemas/cerebras/chat/v1%2Fchat%2Fcompletions

kind inputactivity chathash 19d23c8d…extracted Nov 18, 2026version currentsource upstream spec ↗

Request body

28 properties · 2 required · 4 $defs
propertytypedescriptionconstraints
messages*ChatMessage[]A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text and images. <br/>
model*stringThe model or endpoint ID to use for generating a response. For Shared Inference, use a model ID from the [model catalog](/models/overview). For [Dedicated Inference](/dedicated/overview#supported-models), use the endpoint ID assigned to your organization.
frequency_penaltynumberA number between -2.0 and 2.0. Positive values reduce the likelihood of the model repeating tokens by applying a penalty proportional to how frequently each token has already appeared in the generated output.-2 ≤ n ≤ 2 · default: 0
logit_biasobjectModify the likelihood of specified tokens appearing in the completion. Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated…default: null
logprobsbooleanWhether to return log probabilities of the output tokens.default: false
max_completion_tokensintegerThe maximum number of tokens that can be generated in the completion, including reasoning tokens. The total length of input tokens and generated tokens is limited by the model's context length.
max_tokensintegerAn alias for `max_completion_tokens`. Do not send both parameters in the same request.
min_completion_tokensintegerThe minimum number of tokens to generate. If omitted or set to 0, the model decides when to stop. Setting this value to -1 requests generation up to the maximum sequence length.
min_tokensintegerAn alias for `min_completion_tokens`. Do not send both parameters in the same request.
nenumThe number of completion choices to generate. Cerebras currently supports only `1`.1 · default: 1
parallel_tool_callsbooleanWhether to enable parallel function calling during tool use. When enabled (default), the model can request multiple tool calls simultaneously in a single response. When disabled, only one tool call is made at a time.default: true
predictionobjectConfiguration for a [Predicted Output](/dedicated/predicted-outputs), which can greatly speed up response times when large parts of the model response are known in advance. Most common when regenerating a file with mostly minor changes. Available by request on…
presence_penaltynumberA number between -2.0 and 2.0. Positive values reduce the likelihood of the model repeating tokens that have already appeared in the output, encouraging the model to introduce new topics.-2 ≤ n ≤ 2 · default: 0
prompt_cache_keystringAn opaque identifier that groups related requests so they reuse the same [prompt cache](/capabilities/prompt-caching). Requests sharing the same `prompt_cache_key` are routed together, which increases cache hits and reduces time to first token.length ≤ 1024 · default: null
reasoning_effortenumSelects a model-specific reasoning level. Effort levels don't reserve or guarantee an exact reasoning-token budget.low | medium | high | max | none
reasoning_formatenumSelects how the API returns reasoning. Support varies by model.parsed | raw | hidden | none
clear_thinkingbooleanControls whether historical assistant reasoning is removed from the conversation before prompting the model. Assistant final-answer content is retained.default: false
response_formatText | JSON Schema | JSON ObjectAn object that controls the format of the model response.
seedintegerIf specified, the system will make a best effort to sample deterministically so repeated requests with the same `seed` and parameters return the same result. Determinism is not guaranteed.
service_tierenumControls request prioritization. `default` uses the request's standard priority and quota. `priority` attempts the configured higher priority and can retry at the standard priority. `auto` starts with standard priority and quota, then can fall back to `flex`. …priority | default | auto | flex · default: "default"
stopstring | string[]Up to four sequences that cause the API to stop generating further tokens. The returned text does not contain the stop sequence.
streambooleanStreams partial message deltas when set to `true`.
temperaturenumberSampling temperature between 0 and 2. Higher values, such as 0.8, make output more random; lower values, such as 0.2, make it more focused and deterministic. We recommend changing either this value or `top_p`, but not both.0 ≤ n ≤ 2
tool_choiceenum | objectControls which (if any) tool is called by the model.
toolsobject[]A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.
top_logprobsintegerAn integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. If using this parameter, `logprobs` must also be set to `true`.0 ≤ n ≤ 20
top_pnumberNucleus sampling parameter between 0 and 1. The model considers only tokens comprising the top `top_p` probability mass. For example, 0.1 means only tokens comprising the top 10% probability mass are considered. We recommend changing either this value or `temp…0 ≤ n ≤ 1
userstringA unique identifier representing your end-user, which can help monitor and detect abuse.

Validate a payload

before you spend tokens
shell
$ curl -X POST https://modelschemas.com/v1/validate \
    -d '{"provider":"cerebras","endpointId":"v1/chat/completions","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}