GET
/v1/schemas/mistral/chat/v1/agents/completions?kind=output
Accept:
| field | recorded source |
|---|---|
| schema | Source linked above. upstream-spec Source trace6c349f3bdef67bbbe43b49973f15825c92e7fcc1ff4fadbcc2d87564ef277a03{
"fetchedAt": 1791869458,
"extractorVersion": "1",
"verifiedAt": null
} |
Response body
0 properties · 0 required · 0 $defsThis schema isn’t a plain object with properties — showing the raw JSON instead.
application/json
{
"provider": "mistral",
"activity": "chat",
"endpointId": "v1/agents/completions",
"kind": "output",
"contentHash": "9a2896ab6eeb8480efb0156f54a094e9881af4bd111350568974a439f74e5b5c",
"specRevision": null,
"provenance": {
"sourceUrl": "https://docs.mistral.ai/openapi.yaml",
"sourceHash": "6c349f3bdef67bbbe43b49973f15825c92e7fcc1ff4fadbcc2d87564ef277a03",
"fetchedAt": 1791869458,
"extractorVersion": "1",
"derivation": "upstream-spec",
"verifiedAt": null
},
"createdAt": 1791869458,
"supersededAt": null,
"schema": {
"allOf": [
{
"$ref": "#/$defs/ChatCompletionResponseBase"
},
{
"type": "object",
"title": "ChatCompletionResponse",
"properties": {
"choices": {
"type": "array",
"items": {
"$ref": "#/$defs/ChatCompletionChoice"
}
}
},
"required": [
"id",
"object",
"data",
"model",
"usage",
"created",
"choices"
]
}
],
"$defs": {
"AssistantMessage": {
"type": "object",
"properties": {
"role": {
"type": "string",
"title": "Role",
"default": "assistant",
"const": "assistant"
},
"content": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/ContentChunk"
}
}
],
"title": "Content"
},
"tool_calls": {
"anyOf": [
{
"type": "array",
"items": {
"$ref": "#/$defs/ToolCall"
}
},
{
"type": "null"
}
],
"title": "Tool Calls"
},
"prefix": {
"type": "boolean",
"title": "Prefix",
"description": "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
}
},
"title": "AssistantMessage",
"additionalProperties": false
},
"AudioChunk": {
"type": "object",
"properties": {
"type": {
"type": "string",
"title": "Type",
"default": "input_audio",
"const": "input_audio"
},
"input_audio": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"format": "binary"
}
],
"title": "Input Audio"
}
},
"title": "AudioChunk",
"required": [
"input_audio"
],
"additionalProperties": false
},
"BuiltInConnectors": {
"type": "string",
"title": "BuiltInConnectors",
"enum": [
"web_search",
"web_search_premium",
"code_interpreter",
"image_generation",
"document_library",
"mistral_mcp"
]
},
"ChatCompletionChoice": {
"title": "ChatCompletionChoice",
"type": "object",
"required": [
"index",
"finish_reason"
],
"properties": {
"index": {
"type": "integer",
"example": 0
},
"message": {
"$ref": "#/$defs/AssistantMessage"
},
"messages": {
"type": "array",
"items": {
"$ref": "#/$defs/DeltaMessage"
}
},
"finish_reason": {
"type": "string",
"enum": [
"stop",
"length",
"model_length",
"error",
"tool_calls"
],
"example": "stop"
},
"logprobs": {
"anyOf": [
{
"$ref": "#/$defs/ChatCompletionResponseChoiceLogprobs"
},
{
"type": "null"
}
]
},
"prompt_logprobs": {
"anyOf": [
{
"$ref": "#/$defs/ChatCompletionResponseChoiceLogprobs"
},
{
"type": "null"
}
]
}
}
},
"ChatCompletionResponseBase": {
"allOf": [
{
"$ref": "#/$defs/ResponseBase"
},
{
"type": "object",
"title": "ChatCompletionResponseBase",
"properties": {
"created": {
"type": "integer",
"example": 1702256327
}
}
}
]
},
"ChatCompletionResponseChoiceLogprobs": {
"title": "ChatCompletionResponseChoiceLogprobs",
"type": "object",
"required": [
"content"
],
"properties": {
"content": {
"type": "array",
"items": {
"$ref": "#/$defs/ChatCompletionResponseTokenLogprobsTopK"
}
}
}
},
"ChatCompletionResponseTokenLogprobs": {
"title": "ChatCompletionResponseTokenLogprobs",
"type": "object",
"required": [
"token",
"logprob",
"bytes",
"token_id"
],
"properties": {
"token": {
"type": "string"
},
"logprob": {
"type": "number"
},
"bytes": {
"type": "array",
"items": {
"type": "integer"
}
},
"token_id": {
"type": "integer"
}
}
},
"ChatCompletionResponseTokenLogprobsTopK": {
"title": "ChatCompletionResponseTokenLogprobsTopK",
"type": "object",
"required": [
"token",
"logprob",
"bytes",
"token_id"
],
"properties": {
"token": {
"type": "string"
},
"logprob": {
"type": "number"
},
"bytes": {
"type": "array",
"items": {
"type": "integer"
}
},
"token_id": {
"type": "integer"
},
"top_logprobs": {
"anyOf": [
{
"type": "array",
"items": {
"$ref": "#/$defs/ChatCompletionResponseTokenLogprobs"
}
},
{
"type": "null"
}
]
}
}
},
"ContentChunk": {
"oneOf": [
{
"$ref": "#/$defs/TextChunk"
},
{
"$ref": "#/$defs/ImageURLChunk"
},
{
"$ref": "#/$defs/DocumentURLChunk"
},
{
"$ref": "#/$defs/ReferenceChunk"
},
{
"$ref": "#/$defs/FileChunk"
},
{
"$ref": "#/$defs/ThinkChunk"
},
{
"$ref": "#/$defs/AudioChunk"
},
{
"$ref": "#/$defs/ResourceChunk"
},
{
"$ref": "#/$defs/ResourceLinkChunk"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"image_url": "#/components/schemas/ImageURLChunk",
"document_url": "#/components/schemas/DocumentURLChunk",
"text": "#/components/schemas/TextChunk",
"reference": "#/components/schemas/ReferenceChunk",
"file": "#/components/schemas/FileChunk",
"thinking": "#/components/schemas/ThinkChunk",
"input_audio": "#/components/schemas/AudioChunk",
"resource": "#/components/schemas/ResourceChunk",
"resource_link": "#/components/schemas/ResourceLinkChunk"
}
},
"title": "ContentChunk"
},
"DeltaMessage": {
"title": "DeltaMessage",
"type": "object",
"properties": {
"role": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"content": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
},
{
"items": {
"$ref": "#/$defs/ContentChunk"
},
"type": "array"
}
]
},
"tool_calls": {
"anyOf": [
{
"type": "null"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/ToolCall"
}
}
]
},
"tool_call_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"index": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null"
}
],
"description": "If the completion returns multiple messages, this is to specify which message this delta is for."
},
"metadata": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
]
}
}
},
"DocumentURLChunk": {
"type": "object",
"properties": {
"type": {
"type": "string",
"title": "Type",
"default": "document_url",
"const": "document_url"
},
"document_url": {
"type": "string",
"title": "Document Url"
},
"document_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Document Name",
"description": "The filename of the document"
}
},
"title": "DocumentURLChunk",
"required": [
"document_url"
],
"additionalProperties": false
},
"FileChunk": {
"type": "object",
"properties": {
"type": {
"type": "string",
"title": "Type",
"default": "file",
"const": "file"
},
"file_id": {
"type": "string",
"title": "File Id",
"format": "uuid"
}
},
"title": "FileChunk",
"required": [
"file_id"
],
"additionalProperties": false
},
"FunctionCall": {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Name"
},
"arguments": {
"title": "Arguments",
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "string"
}
]
}
},
"title": "FunctionCall",
"required": [
"name",
"arguments"
],
"additionalProperties": false
},
"ImageDetail": {
"type": "string",
"title": "ImageDetail",
"enum": [
"low",
"auto",
"high"
]
},
"ImageURL": {
"type": "object",
"properties": {
"url": {
"type": "string",
"title": "Url"
},
"detail": {
"anyOf": [
{
"$ref": "#/$defs/ImageDetail"
},
{
"type": "null"
}
]
}
},
"title": "ImageURL",
"required": [
"url"
],
"additionalProperties": false
},
"ImageURLChunk": {
"type": "object",
"properties": {
"type": {
"type": "string",
"title": "Type",
"default": "image_url",
"const": "image_url"
},
"image_url": {
"anyOf": [
{
"$ref": "#/$defs/ImageURL"
},
{
"type": "string"
}
],
"title": "Image Url"
}
},
"title": "ImageURLChunk",
"required": [
"image_url"
],
"additionalProperties": false,
"description": "{\"type\":\"image_url\",\"image_url\":\"data:image/png;base64,iVBORw0\"}"
},
"ReferenceChunk": {
"type": "object",
"properties": {
"type": {
"type": "string",
"title": "Type",
"default": "reference",
"const": "reference"
},
"reference_ids": {
"type": "array",
"items": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"title": "Reference Ids"
}
},
"title": "ReferenceChunk",
"required": [
"reference_ids"
],
"additionalProperties": false
},
"ResourceChunk": {
"type": "object",
"properties": {
"type": {
"type": "string",
"title": "Type",
"default": "resource",
"const": "resource"
},
"uri": {
"type": "string",
"title": "Uri"
},
"content": {
"oneOf": [
{
"$ref": "#/$defs/TextChunk"
},
{
"$ref": "#/$defs/ImageURLChunk"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"text": "#/components/schemas/TextChunk",
"image_url": "#/components/schemas/ImageURLChunk"
}
},
"title": "Content"
}
},
"title": "ResourceChunk",
"required": [
"uri",
"content"
],
"additionalProperties": false
},
"ResourceLinkChunk": {
"type": "object",
"properties": {
"type": {
"type": "string",
"title": "Type",
"default": "resource_link",
"const": "resource_link"
},
"uri": {
"type": "string",
"title": "Uri"
},
"metadata": {
"anyOf": [
{
"type": "object",
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
}
},
{
"type": "null"
}
],
"title": "Metadata"
}
},
"title": "ResourceLinkChunk",
"required": [
"uri"
],
"additionalProperties": false
},
"ResponseBase": {
"type": "object",
"title": "ResponseBase",
"properties": {
"id": {
"type": "string",
"example": "cmpl-e5cc70bb28c444948073e77776eb30ef"
},
"object": {
"type": "string",
"example": "chat.completion"
},
"model": {
"type": "string",
"example": "mistral-small-latest"
},
"usage": {
"$ref": "#/$defs/UsageInfo"
}
}
},
"TextChunk": {
"type": "object",
"properties": {
"type": {
"type": "string",
"title": "Type",
"default": "text",
"const": "text"
},
"text": {
"type": "string",
"title": "Text"
}
},
"title": "TextChunk",
"required": [
"text"
],
"additionalProperties": false
},
"ThinkChunk": {
"type": "object",
"properties": {
"type": {
"type": "string",
"title": "Type",
"default": "thinking",
"const": "thinking"
},
"thinking": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/$defs/TextChunk"
},
{
"$ref": "#/$defs/ToolReferenceChunk"
},
{
"$ref": "#/$defs/ReferenceChunk"
}
]
},
"title": "Thinking"
},
"signature": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Signature",
"description": "Signature to replay some reasoning blocks across turns."
},
"closed": {
"type": "boolean",
"title": "Closed",
"description": "Whether the thinking chunk is closed or not. Currently only used for prefixing.",
"default": true
}
},
"title": "ThinkChunk",
"required": [
"thinking"
],
"additionalProperties": false
},
"ToolCall": {
"type": "object",
"properties": {
"id": {
"type": "string",
"title": "Id",
"default": "null"
},
"type": {
"$ref": "#/$defs/ToolTypes",
"default": "function"
},
"function": {
"$ref": "#/$defs/FunctionCall"
},
"index": {
"type": "integer",
"title": "Index",
"default": 0
}
},
"title": "ToolCall",
"required": [
"function"
],
"additionalProperties": false
},
"ToolReferenceChunk": {
"type": "object",
"properties": {
"type": {
"type": "string",
"title": "Type",
"default": "tool_reference",
"const": "tool_reference"
},
"tool": {
"anyOf": [
{
"$ref": "#/$defs/BuiltInConnectors"
},
{
"type": "string"
}
],
"title": "Tool"
},
"title": {
"type": "string",
"title": "Title"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Url"
},
"favicon": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Favicon"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Description"
}
},
"title": "ToolReferenceChunk",
"required": [
"tool",
"title"
],
"additionalProperties": false
},
"ToolTypes": {
"type": "string",
"title": "ToolTypes",
"enum": [
"function"
]
},
"UsageInfo": {
"type": "object",
"properties": {
"prompt_tokens": {
"type": "integer",
"title": "Prompt Tokens",
"default": 0
},
"completion_tokens": {
"title": "Completion Tokens",
"default": 0,
"type": "integer"
},
"total_tokens": {
"type": "integer",
"title": "Total Tokens",
"default": 0
},
"prompt_audio_seconds": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Prompt Audio Seconds"
},
"service_tier": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Service Tier",
"description": "The service tier at which the request was processed: standard or priority."
}
},
"title": "UsageInfo",
"additionalProperties": false,
"required": [
"prompt_tokens",
"completion_tokens",
"total_tokens"
]
}
}
}
}Validate a payload
before you spend tokensshell
$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"mistral","endpointId":"v1/agents/completions","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}