Validate Messages Request
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
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.

