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

# Messages

`POST /v1/messages`

Generate a chat completion from a conversation history.

This endpoint enables multi-turn conversations with the AI model, with
optional tool support and comprehensive message validation.

Key Features:
* Multi-turn conversations: Support for system, user, and assistant
  messages
* Tool Support: Full tool use/result validation with automatic or manual
  selection
* Citations: Enable `system.citations.enabled` to include references in
  responses
* Streaming: Enable `stream` for partial updates in real-time
* Default Prompts: Enable `system.use_default_prompt` for using Zylon
  prompts
* Thinking: Enable `thinking.enabled` for step-by-step reasoning
  capabilities
* Sampling Parameters: Control randomness with temperature, top_p,
  top_k, etc.

Notes:
* Tool use/result blocks must be properly paired within assistant
  messages
* Tool choice type must be 'auto', 'tool', or 'none'
* When tool_choice.type is 'tool', tool_choice.name must specify a
  valid tool
* All message content is validated for completeness and proper structure
* Last message must be from user or assistant for proper conversation
  flow
* MCP servers provide external tool capabilities via Model Context
  Protocol
* Sampling parameters control response randomness and token selection

## 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`

Successful chat message

- Message — Anthropic-compatible message response.
  - `id` string — Message identifier.
  - `type` 'message' — Object type.
  - `role` 'assistant' — Message author role.
  - `content` union[] — Assistant content blocks.
    - 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.
          - `type` 'ephemeral', required — type field.
          - `ttl` '5m' | '1h' — ttl field.
        - `text` string — Text payload for this block.
        - `citations` ZylonCitation[], nullable — citations field.
          - `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
      - 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.
          - `type` 'ephemeral', required — type field.
          - `ttl` '5m' | '1h' — ttl field.
        - `source` union, required — Anthropic image source payload
          - Base64ImageSource — Anthropic base64 image source payload.
            - `type` 'base64', required — type field.
            - `data` string, byte, required — Base64-encoded image bytes
            - `media_type` 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp', required — media type field.
          - URLSource — Shared URL source payload (accepts url/uri input).
            - `type` 'url', required — type field.
            - `url` string, required — Publicly reachable URL
      - 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.
          - `type` 'ephemeral', required — type field.
          - `ttl` '5m' | '1h' — ttl field.
        - `source` union, required — Audio source payload
          - Base64AudioSource — Anthropic-style base64 audio source payload.
            - `type` 'base64', required — type field.
            - `data` string, required — Base64-encoded audio bytes
            - `media_type` string, required — Audio MIME type, e.g. 'audio/mpeg'
          - URLSource — Shared URL source payload (accepts url/uri input).
            - `type` 'url', required — type field.
            - `url` string, required — Publicly reachable URL
      - 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
          - Base64BinarySource — Base64 source payload for arbitrary binary data.
            - `type` 'base64', required — type field.
            - `data` string, required — Base64-encoded binary data
            - `media_type` string, required — MIME type, e.g. 'application/pdf'
          - URIBinarySource — URI source payload for arbitrary binary data.
            - `type` 'url', required — type field.
            - `uri` string, required — Publicly reachable URI
      - 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.
          - `uri` string, required — uri field.
          - `name` string, required — name field.
          - `description` string, nullable — description field.
          - `mime_type` string, nullable — mime type field.
      - 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
          - union
            - Chunk — Represents a chunk of text content from an ingested document.
              - …
            - Website — Represents a website URL source.
              - …
      - 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.
          - `type` 'ephemeral', required — type field.
          - `ttl` '5m' | '1h' — ttl field.
        - `thinking` string — Thinking payload
        - `signature` string, required — Anthropic reasoning signature required for extended thinking compatibility
        - `citations` ZylonCitation[], nullable — citations field.
          - `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
      - 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.
          - `type` 'ephemeral', required — type field.
          - `ttl` '5m' | '1h' — ttl field.
        - `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.
          - `type` 'ephemeral', required — type field.
          - `ttl` '5m' | '1h' — ttl field.
        - `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.
          - DirectCaller — DirectCaller schema.
            - `type` 'direct', required — type field.
          - ServerToolCaller — ServerToolCaller schema.
            - `tool_id` string, required — Server tool identifier.
            - `type` 'code_execution_20250825', required — Caller type discriminator.
          - ServerToolCaller20260120 — ServerToolCaller20260120 schema.
            - `tool_id` string, required — Server tool identifier.
            - `type` 'code_execution_20260120', required — Caller type discriminator.
      - 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.
          - `type` 'ephemeral', required — type field.
          - `ttl` '5m' | '1h' — ttl field.
        - `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.
          - DirectCaller — DirectCaller schema.
            - `type` 'direct', required — type field.
          - ServerToolCaller — ServerToolCaller schema.
            - `tool_id` string, required — Server tool identifier.
            - `type` 'code_execution_20250825', required — Caller type discriminator.
          - ServerToolCaller20260120 — ServerToolCaller20260120 schema.
            - `tool_id` string, required — Server tool identifier.
            - `type` 'code_execution_20260120', required — Caller type discriminator.
      - 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.
          - `type` 'ephemeral', required — type field.
          - `ttl` '5m' | '1h' — ttl field.
        - `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.
          - `type` 'ephemeral', required — type field.
          - `ttl` '5m' | '1h' — ttl field.
        - `source` union, required — Document source payload
          - Base64Source — Base64Source schema.
            - `type` 'base64' — type field.
            - `data` string, byte, required — data field.
            - `media_type` string, required — media type field.
          - PlainTextSource — PlainTextSource schema.
            - `type` 'text' — type field.
            - `data` string, required — data field.
            - `media_type` 'text/plain', required — media type field.
          - ContentSource — ContentSource schema.
            - `type` 'content' — type field.
            - `content` union, required — content field.
              - …
          - URLDocumentSource — URLDocumentSource schema.
            - `type` 'url' — type field.
            - `url` string, required — url field.
        - `title` string, nullable — title field.
        - `context` string, nullable — context field.
        - `citations` ZylonCitation[], nullable — citations field.
          - `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
      - 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.
          - `type` 'ephemeral', required — type field.
          - `ttl` '5m' | '1h' — ttl field.
        - `source` string, required — Search result source payload
        - `title` string, required — Search result title
        - `content` TextBlock[], required — Search result content
          - `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.
            - `type` 'ephemeral', required — type field.
            - `ttl` '5m' | '1h' — ttl field.
          - `text` string — Text payload for this block.
          - `citations` ZylonCitation[], nullable — citations field.
            - `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
        - `citations` ZylonCitation[], nullable — citations field.
          - `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
      - 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.
          - `type` 'ephemeral', required — type field.
          - `ttl` '5m' | '1h' — ttl field.
        - `content` TextBlock[], required — System instruction text blocks.
          - `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.
            - `type` 'ephemeral', required — type field.
            - `ttl` '5m' | '1h' — ttl field.
          - `text` string — Text payload for this block.
          - `citations` ZylonCitation[], nullable — citations field.
            - `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
      - 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.
          - union
            - TextBlock — Plain-text content block.
              - …
            - ImageBlock — Anthropic-compatible image content block.
              - …
            - AudioBlock — Anthropic-compatible audio content block.
              - …
            - BinaryBlock — Arbitrary binary payload (PDF, ZIP, …) encoded as base64.
              - …
            - LocalResourceBlock — Reference to a local file produced by code execution.
              - …
            - ResourceLinkBlock — Reference to an external resource by URI (not embedded).
              - …
            - ResourceBlock — Embedded resource with metadata.
              - …
            - SourceBlock — Document chunks surfaced as RAG context attribution.
              - …
            - ThinkingBlock — Extended thinking block containing the model's reasoning process.
              - …
            - RedactedThinkingBlock — Redacted thinking block returned when thinking content is encrypted.
              - …
            - ToolUseBlock — Represents a model-initiated tool call.
              - …
            - ServerToolUseBlock — Represents a server-side (built-in) tool call initiated by the model.
              - …
            - ContainerUploadBlock — References a file that was uploaded to an Anthropic container.
              - …
            - DocumentBlock — Anthropic document block (used for document-grounded generation).
              - …
            - SearchResultBlock — Anthropic search result block.
              - …
            - MidConvSystemBlock — System instructions injected at a specific point mid-conversation.
              - …
        - `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.
          - `type` 'ephemeral', required — type field.
          - `ttl` '5m' | '1h' — ttl field.
        - `tool_use_id` string, required — ID of the ToolUseBlock this result answers
        - `content` union — Tool execution result
          - string
          - union[]
            - union
              - …
        - `is_error` boolean — Whether the tool result indicates an error.
  - `model` string — Model name used.
  - `container` Container — Container handle for request reuse.
    - `id` string, required — Container identifier.
    - `expires_at` string, date-time, required — Container expiration timestamp.
  - `stop_details` RefusalStopDetails — Additional metadata when generation stops due to refusal.
    - `type` 'refusal', required — Stop-details discriminator.
    - `category` 'cyber' | 'bio', nullable — Optional refusal category.
    - `explanation` string, nullable — Optional human-readable refusal explanation.
  - `stop_reason` string, nullable — Message stop reason.
  - `stop_sequence` string, nullable — Matched stop sequence, if any.
  - `usage` Usage — Token usage statistics.
    - `cache_creation` CacheCreation — Token counts cached by ephemeral policy.
      - `ephemeral_1h_input_tokens` integer, required — Input tokens cached with 1-hour TTL.
      - `ephemeral_5m_input_tokens` integer, required — Input tokens cached with 5-minute TTL.
    - `cache_creation_input_tokens` integer, nullable — Number of input tokens written to cache.
    - `cache_read_input_tokens` integer, nullable — Number of input tokens read from cache.
    - `inference_geo` string, nullable — Inference region code, when available.
    - `input_tokens` integer, nullable — Input token count for this response.
    - `output_tokens` integer, nullable — Output token count for this response.
    - `output_tokens_details` OutputTokensDetails — Breakdown of output tokens by category.
      - `reasoning_tokens` integer, nullable — Output tokens spent on internal reasoning.
    - `server_tool_use` ServerToolUsage — Usage counters for server-side tools.
      - `web_fetch_requests` integer, required — Number of web fetch requests used.
      - `web_search_requests` integer, required — Number of web search requests used.
    - `service_tier` 'standard' | 'priority' | 'batch', nullable — Service tier used for this response.

## Other responses

- `401` — Unauthorized
- `422` — Validation Error - Invalid request parameters

## 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/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)
