GET
/v1/schemas/cerebras/chat/v1%2Fchat%2Fcompletions
Accept:
Request body
28 properties · 2 required · 4 $defs| property | type | description | constraints |
|---|---|---|---|
| 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* | string | The 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_penalty | number | A 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_bias | object | Modify 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 |
| logprobs | boolean | Whether to return log probabilities of the output tokens. | default: false |
| max_completion_tokens | integer | The 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_tokens | integer | An alias for `max_completion_tokens`. Do not send both parameters in the same request. | |
| min_completion_tokens | integer | The 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_tokens | integer | An alias for `min_completion_tokens`. Do not send both parameters in the same request. | |
| n | enum | The number of completion choices to generate. Cerebras currently supports only `1`. | 1 · default: 1 |
| parallel_tool_calls | boolean | Whether 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 |
| prediction | object | Configuration 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_penalty | number | A 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_key | string | An 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_effort | enum | Selects a model-specific reasoning level. Effort levels don't reserve or guarantee an exact reasoning-token budget. | low | medium | high | max | none |
| reasoning_format | enum | Selects how the API returns reasoning. Support varies by model. | parsed | raw | hidden | none |
| clear_thinking | boolean | Controls whether historical assistant reasoning is removed from the conversation before prompting the model. Assistant final-answer content is retained. | default: false |
| response_format | Text | JSON Schema | JSON Object | An object that controls the format of the model response. | |
| seed | integer | If 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_tier | enum | Controls 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" |
| stop | string | string[] | Up to four sequences that cause the API to stop generating further tokens. The returned text does not contain the stop sequence. | |
| stream | boolean | Streams partial message deltas when set to `true`. | |
| temperature | number | Sampling 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_choice | enum | object | Controls which (if any) tool is called by the model. | |
| tools | object[] | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | |
| top_logprobs | integer | An 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_p | number | Nucleus 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 |
| user | string | A unique identifier representing your end-user, which can help monitor and detect abuse. |
Validate a payload
before you spend tokensshell
$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"cerebras","endpointId":"v1/chat/completions","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}