Create message (Anthropic-compatible)
Anthropic-compatible Messages surface over the same serving pipeline as /chat/completions. Billing, credits, idempotency, rate limits, request-size limits and cached-input pricing follow the same rules. Supports text, base64 image input on compatible models, client tools, thinking controls, structured output and Anthropic event-named streaming. anthropic-beta and Claude Code compatibility headers are accepted and ignored.
Headers
Accepted and echoed back on the response. It does not select a behavior: this endpoint publishes one grammar.
Accepted and ignored for client compatibility.
Binds the outcome to the Anthropic request body sent, so a retry replays instead of generating and billing a second time.
Request body
Example request
{
"model": "deepseek-v4-flash"
}Response
Anthropic Message, or an Anthropic SSE event stream if stream=true
Example response
{
"id": "msg_a1b2c3d4"
}