---
title: "Validate Messages Request"
method: POST
path: "/v1/messages/validate"
tags: ["Messages", "Messages"]
---

# Validate Messages Request

`POST /v1/messages/validate`

Validate a chat completion request without executing it.

This endpoint performs a dry-run validation of the chat request,
checking for:

* Message structure and content validation
* Tool definitions and tool_choice compatibility
* Parameter ranges and combinations
* Conversation flow and message ordering
* Response format compatibility with other options

Returns detailed validation results including errors. Use this endpoint to
validate requests before sending them to the main chat endpoint.

Notes:
* No tokens are consumed during validation
* All validation rules match the main /messages endpoint
* Warnings indicate potential issues but don't prevent execution
* Request summary provides insights into the parsed request structure

## Request body

- ChatBody — Chat request body model for handling chat interactions.
  - `model` string, required — Model identifier or alias.
  - `messages` MessageInput[], required — Conversation messages for the request.
    - `role` 'system' | 'user' | 'assistant', required — The role of the message sender
    - `content` union, required — The message content
      - string
      - union[]
        - union
          - TextBlock — Plain-text content block.
            - `type` 'text', required — type field.
            - `start_timestamp` string, date-time, nullable — start timestamp field.
            - `stop_timestamp` string, date-time, nullable — stop timestamp field.
            - `_meta` object — meta field.
            - `cache_control` CacheControlEphemeral — CacheControlEphemeral schema.
              - …
            - `text` string — Text payload for this block.
            - `citations` ZylonCitation[], nullable — citations field.
              - …
          - ImageBlock — Anthropic-compatible image content block.
            - `type` 'image', required — type field.
            - `start_timestamp` string, date-time, nullable — start timestamp field.
            - `stop_timestamp` string, date-time, nullable — stop timestamp field.
            - `_meta` object — meta field.
            - `cache_control` CacheControlEphemeral — CacheControlEphemeral schema.
              - …
            - `source` union, required — Anthropic image source payload
              - …
          - AudioBlock — Anthropic-compatible audio content block.
            - `type` 'audio', required — type field.
            - `start_timestamp` string, date-time, nullable — start timestamp field.
            - `stop_timestamp` string, date-time, nullable — stop timestamp field.
            - `_meta` object — meta field.
            - `cache_control` CacheControlEphemeral — CacheControlEphemeral schema.
              - …
            - `source` union, required — Audio source payload
              - …
          - BinaryBlock — Arbitrary binary payload (PDF, ZIP, …) encoded as base64.
            - `type` 'binary', required — type field.
            - `start_timestamp` string, date-time, nullable — start timestamp field.
            - `stop_timestamp` string, date-time, nullable — stop timestamp field.
            - `_meta` object — meta field.
            - `filename` string, nullable — filename field.
            - `source` union, required — Binary source payload
              - …
          - LocalResourceBlock — Reference to a local file produced by code execution.
            - `type` 'local_resource', required — type field.
            - `start_timestamp` string, date-time, nullable — start timestamp field.
            - `stop_timestamp` string, date-time, nullable — stop timestamp field.
            - `_meta` object — meta field.
            - `file_path` string, required — Absolute path to the file inside the execution environment
            - `file_id` string, nullable — Base64url-encoded storage file ID used to download the file via the files API
            - `name` string, required — Human-readable file name (stem, without extension)
            - `mime_type` string, required — MIME type of the file
          - ResourceLinkBlock — Reference to an external resource by URI (not embedded).
            - `type` 'resource_link', required — type field.
            - `start_timestamp` string, date-time, nullable — start timestamp field.
            - `stop_timestamp` string, date-time, nullable — stop timestamp field.
            - `_meta` object — meta field.
            - `uri` string, required — URI of the external resource
            - `name` string, required — Human-readable resource name
            - `description` string, nullable — description field.
            - `mime_type` string, nullable — mime type field.
          - ResourceBlock — Embedded resource with metadata.
            - `type` 'resource', required — type field.
            - `start_timestamp` string, date-time, nullable — start timestamp field.
            - `stop_timestamp` string, date-time, nullable — stop timestamp field.
            - `_meta` object — meta field.
            - `resource` Resource, required — Resource schema.
              - …
          - SourceBlock — Document chunks surfaced as RAG context attribution.
            - `type` 'source', required — type field.
            - `start_timestamp` string, date-time, nullable — start timestamp field.
            - `stop_timestamp` string, date-time, nullable — stop timestamp field.
            - `_meta` object — meta field.
            - `sources` union[], required — Document chunks used as context for this response
              - …
          - ThinkingBlock — Extended thinking block containing the model's reasoning process.
            - `type` 'thinking', required — type field.
            - `start_timestamp` string, date-time, nullable — start timestamp field.
            - `stop_timestamp` string, date-time, nullable — stop timestamp field.
            - `_meta` object — meta field.
            - `cache_control` CacheControlEphemeral — CacheControlEphemeral schema.
              - …
            - `thinking` string — Thinking payload
            - `signature` string, required — Anthropic reasoning signature required for extended thinking compatibility
            - `citations` ZylonCitation[], nullable — citations field.
              - …
          - RedactedThinkingBlock — Redacted thinking block returned when thinking content is encrypted.
            - `type` 'redacted_thinking', required — type field.
            - `start_timestamp` string, date-time, nullable — start timestamp field.
            - `stop_timestamp` string, date-time, nullable — stop timestamp field.
            - `_meta` object — meta field.
            - `cache_control` CacheControlEphemeral — CacheControlEphemeral schema.
              - …
            - `data` string, required — Encrypted thinking payload
          - ToolUseBlock — Represents a model-initiated tool call.
            - `type` 'tool_use', required — type field.
            - `start_timestamp` string, date-time, nullable — start timestamp field.
            - `stop_timestamp` string, date-time, nullable — stop timestamp field.
            - `_meta` object — meta field.
            - `cache_control` CacheControlEphemeral — CacheControlEphemeral schema.
              - …
            - `id` string, required — Unique identifier for this tool use
            - `name` string, required — Name of the tool being called
            - `input` object, required — Input payload for the tool call
            - `caller` union — caller field.
              - …
          - ServerToolUseBlock — Represents a server-side (built-in) tool call initiated by the model.
            - `type` 'server_tool_use', required — type field.
            - `start_timestamp` string, date-time, nullable — start timestamp field.
            - `stop_timestamp` string, date-time, nullable — stop timestamp field.
            - `_meta` object — meta field.
            - `cache_control` CacheControlEphemeral — CacheControlEphemeral schema.
              - …
            - `id` string, required — Unique identifier for this server tool use
            - `name` 'web_search' | 'web_fetch' | 'code_execution' | 'bash_code_execution' | 'text_editor_code_execution' | 'tool_search_tool_regex' | 'tool_search_tool_bm25', required — Name of the server tool being called
            - `input` object, required — Input payload for the server tool call
            - `caller` union — caller field.
              - …
          - ContainerUploadBlock — References a file that was uploaded to an Anthropic container.
            - `type` 'container_upload', required — type field.
            - `start_timestamp` string, date-time, nullable — start timestamp field.
            - `stop_timestamp` string, date-time, nullable — stop timestamp field.
            - `_meta` object — meta field.
            - `cache_control` CacheControlEphemeral — CacheControlEphemeral schema.
              - …
            - `file_id` string, required — Container file identifier
          - DocumentBlock — Anthropic document block (used for document-grounded generation).
            - `type` 'document', required — type field.
            - `start_timestamp` string, date-time, nullable — start timestamp field.
            - `stop_timestamp` string, date-time, nullable — stop timestamp field.
            - `_meta` object — meta field.
            - `cache_control` CacheControlEphemeral — CacheControlEphemeral schema.
              - …
            - `source` union, required — Document source payload
              - …
            - `title` string, nullable — title field.
            - `context` string, nullable — context field.
            - `citations` ZylonCitation[], nullable — citations field.
              - …
          - SearchResultBlock — Anthropic search result block.
            - `type` 'search_result', required — type field.
            - `start_timestamp` string, date-time, nullable — start timestamp field.
            - `stop_timestamp` string, date-time, nullable — stop timestamp field.
            - `_meta` object — meta field.
            - `cache_control` CacheControlEphemeral — CacheControlEphemeral schema.
              - …
            - `source` string, required — Search result source payload
            - `title` string, required — Search result title
            - `content` TextBlock[], required — Search result content
              - …
            - `citations` ZylonCitation[], nullable — citations field.
              - …
          - MidConvSystemBlock — System instructions injected at a specific point mid-conversation.
            - `type` 'mid_conv_system', required — type field.
            - `start_timestamp` string, date-time, nullable — start timestamp field.
            - `stop_timestamp` string, date-time, nullable — stop timestamp field.
            - `_meta` object — meta field.
            - `cache_control` CacheControlEphemeral — CacheControlEphemeral schema.
              - …
            - `content` TextBlock[], required — System instruction text blocks.
              - …
          - TLDRBlock — Condensed summary block.
            - `type` 'tldr', required — type field.
            - `start_timestamp` string, date-time, nullable — start timestamp field.
            - `stop_timestamp` string, date-time, nullable — stop timestamp field.
            - `_meta` object — meta field.
            - `content` union[] — content field.
              - …
            - `tldr_side` 'left' | 'right' — tldr side field.
          - ToolResultBlock — Result produced by a prior tool_use block.
            - `type` 'tool_result', required — type field.
            - `start_timestamp` string, date-time, nullable — start timestamp field.
            - `stop_timestamp` string, date-time, nullable — stop timestamp field.
            - `_meta` object — meta field.
            - `cache_control` CacheControlEphemeral — CacheControlEphemeral schema.
              - …
            - `tool_use_id` string, required — ID of the ToolUseBlock this result answers
            - `content` union — Tool execution result
              - …
            - `is_error` boolean — Whether the tool result indicates an error.
  - `system` System[] — System prompt input. Accepts str, list[str], System, list[System], or null. It is normalized internally to list[System].
    - `use_default_prompt` boolean — Deprecated: legacy toggle for built-in default prompt injection. Use system.prompt to control per-category prompt injection.
    - `text` string, nullable — System prompt to use for the chat completion
    - `citations` Citations — Configuration for citation generation in AI responses.
      - `enabled` boolean — Enable citations in responses
      - `known_citations` ZylonCitation[], nullable — List of known citations to use in the response
        - `id` string, nullable — Unique identifier for the citation
        - `index` integer, nullable — Index of the citation in the document
        - `artifact_id` string, nullable — Identifier of the artifact associated with the citation
        - `source_id` string, nullable — Identifier of the source document from which the citation is derived
    - `extensions` SystemExtensions[] — Set of enabled extensions
    - `blob_visibility` 'binary' | 'internal' | 'public' — Controls visibility and storage mode for binary large objects (blobs).
    - `prompt` PromptConfig — Controls which platform-level prompt features are injected. These flags represent optional AI features adding internal instructions to the system prompt. All flags default to ``False`` — opt-in explicitly.
      - `tools` boolean — Enable per-tool instruction injection for all available tools.
      - `citations` boolean — Enable citation formatting guidelines injection.
      - `thinking` boolean — Enable thinking/reasoning guidelines when thinking is enabled.
      - `code_execution` boolean — Enable code execution environment instructions (filesystem layout, available paths) when any code execution tool is present.
      - `skills` boolean — Enable skill management instructions (when to load/unload skills, workflow guidance) when any skill management tool is present.
  - `tools` ToolSpecBody[], nullable — Optional tool definitions.
    - `name` string, required — Unique name identifier for the tool
    - `type` string, nullable — Type of the tool, use to identify internal tools database_query_v1 or semantic_search_v1
    - `description` string, nullable — Human-readable description of what the tool does
    - `inputSchema` object, nullable — JSON schema defining the input parameters the tool accepts
    - `context` union[], nullable — Additional context or metadata for the tool
      - union
        - FileArtifact — Input for base64 encoded files.
          - `type` 'file' — Input type discriminator
          - `value` string, required — Base64 encoded file content
        - UriArtifact — Input for remote URIs.
          - `type` 'uri' — Input type discriminator
          - `value` string, required — URI to download from
        - TextArtifact — Input for plain text content.
          - `type` 'text' — Input type discriminator
          - `value` string, required — Plain text content
        - IngestedArtifact — Input for already ingested content.
          - `type` 'ingested_artifact' — Input type discriminator
          - `context_filter` ContextFilter, required — Filter by collection, artifacts and metadata in the ingested context. The main filter is the collection the context is part of. All artifacts ids are ensured to be part of the context. If any of the ids is not usable in the context (i.e. doesn't exist), the related task will fail. The metadata filter will look for all context matching the metadata, if any, and add it to the context. The filter is a dictionary of key-value pairs. The key is the metadata key, and the value is the metadata value. If both artifacts and metadata filters are provided, the result will be the intersection of the two filters.
            - `collection` string — The name of the collection to filter on.
            - `artifacts` string[], nullable — Artifacts ids to filter on.
            - `metadata_filter` object[], nullable — Metadata filter to apply on the context.
              - …
        - SqlDatabaseArtifact — Input for SQL database content.
          - `type` 'sql_database' — Input type discriminator
          - `connection_string` string, required — SQL database connection string
          - `schemas` string[], nullable — List of specific schemas to include, if None includes all non-system schemas
          - `ssl` boolean — Whether to use SSL for the database connection
          - `enable_tables` boolean — Whether to include tables in the inspection
          - `enable_views` boolean — Whether to include views in the inspection
          - `enable_functions` boolean — Whether to include functions in the inspection
          - `enable_procedures` boolean — Whether to include stored procedures in the inspection
          - `description` string — Optional description of the database
        - SkillArtifact — Input for skill activation using SkillFilter.
          - `type` 'skill' — Input type discriminator
          - `skill_filter` SkillFilter, required — Collection-scoped filter used to resolve active skills and versions.
            - `collection` string, required — Tenant collection boundary used to recover skills.
            - `skill_or_version_ids` string[], nullable — Optional whitelist of identifiers inside collection. Each item may be a skill id (resolved to latest version) or a skill version id.
    - `deferLoading` boolean — When true, hide this tool from the model until at least one skill is loaded in the current conversation.
    - `instructions` string, nullable — Optional instructions injected into the system prompt when this tool is available. For internal tools a default template is used; providing a value here overrides that default. Set to an empty string to disable.
  - `thinking` Thinking — Configuration for AI reasoning and step-by-step thinking capabilities.
    - `enabled` boolean — Enable reasoning capabilities for the model, allowing it to think step-by-step
    - `effort` 'low' | 'medium' | 'high' | 'max' | 'xhigh', nullable — Deprecated. Use output_config.effort instead. Kept for backward compatibility with legacy clients.
  - `tool_choice` ToolChoice — Configuration for tool selection behavior during AI interactions.
    - `type` 'auto' | 'any' | 'tool' | 'none' — Tool selection strategy
    - `name` string, nullable — Name of the tool to use if not auto-selecting
    - `disable_parallel_tool_use` boolean — When true, prevents the AI from using multiple tools simultaneously
    - `validation_mode` 'eager' | 'lazy' — Tool validation mode. 'eager' validates tool calls before execution, 'lazy' validates if tool call is made.
  - `output_config` OutputConfigInput — Output configuration shared across Anthropic-compatible request models.
    - `effort` 'low' | 'medium' | 'high' | 'max' | 'xhigh', nullable — Reasoning effort level for output generation.
    - `format` JsonObjectFormat — Structured JSON object format compatible with Anthropic output_config.format.
      - `type` 'json_schema', required — Output format type. Always "json_schema".
      - `schema` object, required — JSON schema used to constrain the model output.
  - `cache_control` CacheControlEphemeral — CacheControlEphemeral schema.
    - `type` 'ephemeral', required — type field.
    - `ttl` '5m' | '1h' — ttl field.
  - `stream` boolean — Whether to stream the response back to the client.
  - `tool_context` union[], nullable — Context to provide to the tools, such as documents, databases connection strings, or data relevant to tool usage.
    - union
      - FileArtifact — Input for base64 encoded files.
        - `type` 'file' — Input type discriminator
        - `value` string, required — Base64 encoded file content
      - UriArtifact — Input for remote URIs.
        - `type` 'uri' — Input type discriminator
        - `value` string, required — URI to download from
      - TextArtifact — Input for plain text content.
        - `type` 'text' — Input type discriminator
        - `value` string, required — Plain text content
      - IngestedArtifact — Input for already ingested content.
        - `type` 'ingested_artifact' — Input type discriminator
        - `context_filter` ContextFilter, required — Filter by collection, artifacts and metadata in the ingested context. The main filter is the collection the context is part of. All artifacts ids are ensured to be part of the context. If any of the ids is not usable in the context (i.e. doesn't exist), the related task will fail. The metadata filter will look for all context matching the metadata, if any, and add it to the context. The filter is a dictionary of key-value pairs. The key is the metadata key, and the value is the metadata value. If both artifacts and metadata filters are provided, the result will be the intersection of the two filters.
          - `collection` string — The name of the collection to filter on.
          - `artifacts` string[], nullable — Artifacts ids to filter on.
          - `metadata_filter` object[], nullable — Metadata filter to apply on the context.
      - SqlDatabaseArtifact — Input for SQL database content.
        - `type` 'sql_database' — Input type discriminator
        - `connection_string` string, required — SQL database connection string
        - `schemas` string[], nullable — List of specific schemas to include, if None includes all non-system schemas
        - `ssl` boolean — Whether to use SSL for the database connection
        - `enable_tables` boolean — Whether to include tables in the inspection
        - `enable_views` boolean — Whether to include views in the inspection
        - `enable_functions` boolean — Whether to include functions in the inspection
        - `enable_procedures` boolean — Whether to include stored procedures in the inspection
        - `description` string — Optional description of the database
      - SkillArtifact — Input for skill activation using SkillFilter.
        - `type` 'skill' — Input type discriminator
        - `skill_filter` SkillFilter, required — Collection-scoped filter used to resolve active skills and versions.
          - `collection` string, required — Tenant collection boundary used to recover skills.
          - `skill_or_version_ids` string[], nullable — Optional whitelist of identifiers inside collection. Each item may be a skill id (resolved to latest version) or a skill version id.
  - `mcp_servers` McpServerConfig[] — List of MCP servers to use for tool retrieval. Each server can have its own configuration.
    - `name` string, nullable — A name for the MCP server configuration.
    - `url` string, required — The URL of the MCP server to connect to.
    - `authorization_token` string, nullable — The authorization token to use when connecting to the MCP server.
    - `tool_configuration` McpServerToolConfig — Configuration for tool filtering from the MCP server.
      - `enabled` boolean — Enable tool filtering for the MCP server.
      - `allowed_tools` string[], nullable — List of enabled tools to filter from the MCP server.
  - `container` string, nullable — Container identifier for reuse across requests.
  - `mounts` MountEntry[], nullable — Mount entries requesting files or folders to be available inside the sandbox.
    - `namespace` string, required — Registered namespace name (e.g. 'session', 'skills', or a custom namespace).
    - `scope` string, required — Opaque scope id within the namespace (e.g. thread-id).
    - `path` string, required — Relative path within the scope.
    - `target` string, required — Absolute container path where the content should be visible.
    - `mode` 'rw' | 'ro' — Access mode.
    - `etag` string, nullable — Optional content checksum.
    - `uri` string, nullable — Content origin: s3://, https://, data: or a local disk path. When set, the mount is lazy — content is fetched only if the backing folder is absent or empty.
  - `response_format` ResponseFormat — Deprecated response format model. Use JsonObjectFormat.
    - `type` 'text' | 'json_schema' — Enumeration of supported response formats.
    - `json_schema` object, nullable — JSON schema definition when type is 'json_schema'
  - `priority` integer, nullable — Priority of the request, used for prioritizing responses.
  - `seed` integer, nullable — Random seed for reproducibility.
  - `min_p` number, nullable — Minimum probability threshold for token selection. Tokens with probability below this value are filtered out.
  - `top_p` number — Nucleus sampling parameter. Only tokens with cumulative probability up to this value are considered.
  - `temperature` number — Controls randomness in generation. Higher values make output more random, lower values more deterministic.
  - `top_k` integer — Limits token selection to the top K most likely tokens at each step.
  - `repetition_penalty` number, nullable — Penalty applied to tokens that have already appeared in the sequence to reduce repetition.
  - `presence_penalty` number, nullable — Penalty applied based on whether a token has appeared in the text, encouraging topic diversity.
  - `frequency_penalty` number, nullable — Penalty applied based on how frequently a token appears in the text, reducing repetitive content.
  - `max_tokens` integer, required — Maximum number of tokens to generate in the response.
  - `stop_sequences` string[] — Custom stop sequences that stop generation when matched.
  - `metadata` CompletionMetadata — CompletionMetadata schema.
    - `user_id` string, nullable — Opaque user identifier for request attribution.
  - `service_tier` 'auto' | 'standard_only' — Service tier preference (for example, "auto" or "standard_only").
  - `inference_geo` string, nullable — Geographic region hint for inference processing.
  - `correlation_id` string, nullable — Correlation ID for tracking the request across systems.
  - `maximum_loaded_skills` integer, nullable — Optional cap for concurrently loaded skills in a conversation. When exceeded, the oldest loaded skill is evicted.
  - `context_management` unknown

## Response `200`

Validation completed

- ChatValidationResult — Result of chat request validation.
  - `valid` boolean — Is the request valid
  - `errors` string[], nullable — List of validation errors if any

## Other responses

- `400` — Validation completed
- `401` — Unauthorized
- `422` — Request body validation error

## Changes

- **2026-08-27** `4e828cf153c4` — 1 info
  - added the new optional request property `mounts`
- …earlier changes not shown

[Full history](https://skmtc.dev/zylon-ai/apis/private-gpt-api/changes/v1/messages/validate/post.md)

---

[API](https://skmtc.dev/zylon-ai/apis/private-gpt-api.md) · [All operations](https://skmtc.dev/zylon-ai/apis/private-gpt-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/zylon-ai/private-gpt-api/revisions/4e828cf153c4/schema)
