messages
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
post/v1/messages
Request body
Response
Successful chat message
Changes
No recorded changes to this endpoint across all 1 revision of this API.