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.enabledto include references in responses - Streaming: Enable
streamfor partial updates in real-time - Default Prompts: Enable
system.use_default_promptfor using Zylon prompts - Thinking: Enable
thinking.enabledfor 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
Request body for chat completion supporting multi-turn conversations with AI models.
Contains message history, tool definitions, system prompts, and response configuration. Supports both streaming and non-streaming responses with optional tool usage, citations, and advanced sampling parameters.
The request body defines the complete conversation context and AI behavior parameters for generating responses.
System prompt input. Accepts str, list[str], System, list[System], or null. It is normalized internally to list[System].
Optional request-level cache control.
Request metadata (for example, user_id).
Service tier preference (for example, “auto” or “standard_only”).
Deprecated response format. Use output_config.format instead.

