Messages
Create a message
Creates a message using the Anthropic-compatible Messages API. The request follows the Anthropic Messages API format with model, max_tokens, messages, optional system, tools, and streaming support.
Not every provider implements the Messages API. Requests routed to a provider that does not support it return 400 Bad Request with an explanatory error message; use /chat/completions for those providers.
post/messages
Query parameters
provider'ollama' | 'ollama_cloud' | 'groq' | 'llamacpp' | 'openai' | 'cloudflare' | 'cohere' | 'anthropic' | 'deepseek' | 'google' | 'mistral' | 'minimax' | 'moonshot' | 'nvidia' | 'zai'
Specific provider to use (default determined by model)
Request body
Response
Successful response