/v1/schemas/mistral/chat/v1/agents/completions
| field | recorded source |
|---|---|
| schema | Source linked above. upstream-spec Source trace7b344504336785172c86cd826ce4b1cbfd12be228a8432cf046b2b8fdafacf72{
"fetchedAt": 1793856071,
"extractorVersion": "1",
"verifiedAt": null
} |
Request body
27 properties · 2 required · 46 $defs| property | type | description | constraints |
|---|---|---|---|
| messages* | SystemMessage | UserMessage | AssistantMessage[] | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | |
| agent_id* | string | The ID of the agent to use for this completion. | |
| 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[] | nullable | |
| tool_choice | ToolChoice | enum | 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 | 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 |
Types
46 $defsAPIKeyAuthobject
| type | enum | api-key · default: "api-key" | |
| value* | string |
AssistantMessageobject
| role | const | "assistant" · default: "assistant" | |
| content | string | ContentChunk[] | nullable | |
| tool_calls | ToolCall[] | nullable | |
| prefix | boolean | Set this to `true` when adding an assistant message as prefix to condition the model response. The role of the prefix message is to force the model to start its answer by the content of the message. | default: false |
AudioChunkobject
| type | const | "input_audio" · default: "input_audio" | |
| input_audio* | string | string |
BuiltInConnectorsenum
web_search | web_search_premium | code_interpreter | image_generation | document_library | mistral_mcp
ContentChunkTextChunk | ImageURLChunk | DocumentURLChunk | …
CustomConnectorobject
| type | enum | connector · default: "connector" | |
| connector_id* | string | ||
| authorization | OAuth2TokenAuth | APIKeyAuth | Deprecated: per-request connector credentials will be removed. Authenticate the connector through the Connectors API instead. | nullable · deprecated |
| tool_configuration | ToolConfiguration | nullable |
DocumentLibraryToolobject
| tool_configuration | ToolConfiguration | nullable | |
| type | enum | document_library · default: "document_library" | |
| library_ids* | string[] | Ids of the library in which to search. | items ≥ 1 |
DocumentURLChunkobject
| type | const | "document_url" · default: "document_url" | |
| document_url* | string | ||
| document_name | string | The filename of the document | nullable |
FileChunkobject
| type | const | "file" · default: "file" | |
| file_id* | string | format: uuid |
Functionobject
| name* | string | ||
| description | string | default: "" | |
| strict | boolean | default: false | |
| parameters* | object |
FunctionCallobject
| name* | string | ||
| arguments* | object | string |
FunctionNameobject
this restriction of `Function` is used to select a specific function to call
| name* | string |
GuardrailConfigobject
| block_on_error | boolean | If true, return HTTP 403 and block request in the event of a server-side error | default: false |
| moderation_llm_v1 | ModerationLLMV1Config | nullable | |
| moderation_llm_v2 | ModerationLLMV2Config | nullable |
ImageDetailenum
low | auto | high
ImageGenerationToolobject
| tool_configuration | ToolConfiguration | nullable | |
| type | enum | image_generation · default: "image_generation" |
ImageURLobject
| url* | string | ||
| detail | enum | low | auto | high · nullable |
ImageURLChunkobject
{"type":"image_url","image_url":"data:image/png;base64,iVBORw0"}
| type | const | "image_url" · default: "image_url" | |
| image_url* | ImageURL | string |
JsonSchemaobject
| name* | string | ||
| description | string | nullable | |
| schema* | object | ||
| strict | boolean | default: false |
MistralPromptModeenum
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
ModerationLLMActionenum
none | block
ModerationLLMV1CategoryThresholdsobject
| sexual | number | nullable | |
| hate_and_discrimination | number | nullable | |
| violence_and_threats | number | nullable | |
| dangerous_and_criminal_content | number | nullable | |
| selfharm | number | nullable | |
| health | number | nullable | |
| financial | number | nullable | |
| law | number | nullable | |
| pii | number | nullable |
ModerationLLMV1Configobject
| model_name | string | Override model name. Should be omitted in general. | default: "mistral-moderation-2411" |
| custom_category_thresholds | ModerationLLMV1CategoryThresholds | nullable | |
| ignore_other_categories | boolean | If true, only evaluate categories in custom_category_thresholds; others are ignored. | default: false |
| action | enum | Action to take if any score is above the threshold for any category. | none | block |
ModerationLLMV2CategoryThresholdsobject
| sexual | number | nullable | |
| hate_and_discrimination | number | nullable | |
| violence_and_threats | number | nullable | |
| dangerous | number | nullable | |
| criminal | number | nullable | |
| selfharm | number | nullable | |
| health | number | nullable | |
| financial | number | nullable | |
| law | number | nullable | |
| pii | number | nullable | |
| jailbreaking | number | nullable |
ModerationLLMV2Configobject
| model_name | string | Override model name. Should be omitted in general. | default: "mistral-moderation-2603" |
| custom_category_thresholds | ModerationLLMV2CategoryThresholds | nullable | |
| ignore_other_categories | boolean | If true, only evaluate categories in custom_category_thresholds; others are ignored. | default: false |
| action | enum | Action to take if any score is above the threshold for any category. | none | block |
OAuth2TokenAuthobject
| type | enum | oauth2-token · default: "oauth2-token" | |
| value* | string |
Predictionobject
Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content.
| type | const | "content" · default: "content" | |
| content | string | default: "" |
ReasoningEffortenum
none | minimal | low | medium | high | xhigh · +1 more
ReferenceChunkobject
| type | const | "reference" · default: "reference" | |
| reference_ids* | integer | string[] |
RequestedServiceTierenum
auto | standard_only
ResourceChunkobject
| type | const | "resource" · default: "resource" | |
| uri* | string | ||
| content* | TextChunk | ImageURLChunk |
ResourceLinkChunkobject
| type | const | "resource_link" · default: "resource_link" | |
| uri* | string | ||
| metadata | object | nullable |
ResponseFormatobject
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…
| type | enum | text | json_object | json_schema | |
| json_schema | JsonSchema | nullable |
ResponseFormatsenum
text | json_object | json_schema
SystemMessageobject
| role | const | "system" · default: "system" | |
| content* | string | SystemMessageContentChunks[] |
SystemMessageContentChunksTextChunk | ThinkChunk
TextChunkobject
| type | const | "text" · default: "text" | |
| text* | string |
ThinkChunkobject
| type | const | "thinking" · default: "thinking" | |
| thinking* | TextChunk | ToolReferenceChunk | ReferenceChunk[] | ||
| signature | string | Signature to replay some reasoning blocks across turns. | nullable |
| closed | boolean | Whether the thinking chunk is closed or not. Currently only used for prefixing. | default: true |
Toolobject
| type | enum | function | |
| function* | Function |
ToolCallobject
| id | string | default: "null" | |
| type | enum | function | |
| function* | FunctionCall | ||
| index | integer | default: 0 |
ToolChoiceobject
ToolChoice is either a ToolChoiceEnum or a ToolChoice
| type | enum | function | |
| function* | FunctionName | this restriction of `Function` is used to select a specific function to call |
ToolChoiceEnumenum
auto | none | any | required
ToolConfigurationobject
| exclude | string[] | nullable | |
| include | string[] | nullable | |
| requires_confirmation | string[] | nullable |
ToolMessageobject
| role | const | "tool" · default: "tool" | |
| content* | string | ContentChunk[] | nullable | |
| tool_call_id | string | nullable | |
| name | string | nullable |
ToolReferenceChunkobject
| type | const | "tool_reference" · default: "tool_reference" | |
| tool* | enum | string | ||
| title* | string | ||
| url | string | nullable | |
| favicon | string | nullable | |
| description | string | nullable |
ToolTypesenum
function
UserMessageobject
| role | const | "user" · default: "user" | |
| content* | string | ContentChunk[] | nullable |
Validate a payload
before you spend tokens$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"mistral","endpointId":"v1/agents/completions","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}