GET
/v1/schemas/mistral/chat/v1%2Fchat%2Fcompletions
Accept:
Request body
30 properties · 2 required · 46 $defs| property | type | description | constraints |
|---|---|---|---|
| model* | string | ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions. | |
| messages* | SystemMessage | UserMessage | AssistantMessage[] | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | |
| temperature | number | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | 0 ≤ n ≤ 1.5 · nullable |
| top_p | number | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | 0 < n ≤ 1 · nullable |
| max_tokens | integer | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | n ≥ 0 · nullable |
| stream | boolean | Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until com… | default: false |
| stop | string | string[] | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | nullable |
| random_seed | integer | The seed to use for random sampling. If set, different calls will generate deterministic results. | n ≥ 0 · nullable |
| metadata | object | nullable | |
| response_format | ResponseFormat | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the m… | |
| tools | Tool | ImageGenerationTool | DocumentLibraryTool[] | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | nullable |
| tool_choice | ToolChoice | enum | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model m… | default: "auto" |
| presence_penalty | number | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | -2 ≤ n ≤ 2 · nullable |
| frequency_penalty | number | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | -2 ≤ n ≤ 2 · nullable |
| min_tokens | integer | n ≥ 0 · nullable | |
| repetition_penalty | number | 0 < n ≤ 2 · nullable | |
| top_k | integer | n ≥ -1 · nullable | |
| logprobs | boolean | nullable | |
| top_logprobs | integer | nullable | |
| prompt_logprobs | boolean | nullable | |
| top_prompt_logprobs | integer | nullable | |
| n | integer | Number of completions to return for each request, input tokens are only billed once. | n ≥ 1 · nullable |
| prediction | Prediction | Enable users to specify expected results, optimizing response times by leveraging known or predictable content. This approach is especially effective for updating text documents or code files with minimal changes, reducing latency while maintaining high-qualit… | |
| parallel_tool_calls | boolean | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | default: true |
| reasoning_effort | enum | none | minimal | low | medium | high | xhigh · +1 more · nullable | |
| prompt_mode | enum | Available options to the prompt_mode argument on the chat completion endpoint. Values represent high-level intent. Assignment to actual SPs is handled internally. System prompt may include knowledge cutoff date, model capabilities, tone to use, safety guidelin… | reasoning · nullable |
| guardrails | GuardrailConfig[] | nullable | |
| prompt_cache_key | string | nullable | |
| service_tier | enum | Determines whether to serve the request using priority or standard capacity. | auto | standard_only · nullable |
| safe_prompt | boolean | Whether to inject a safety prompt before all conversations. | default: false |
Validate a payload
before you spend tokensshell
$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"mistral","endpointId":"v1/chat/completions","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}