Create Anthropic Message
client.messages.create(params)/v1/messagesCreate a message through SandBase's Anthropic-compatible Messages endpoint. SandBase maps the model for the selected provider and preserves compatible request and response fields.
Request headers
SandBase API key. Authorization: Bearer is also accepted; x-api-key takes precedence when both are present.
Anthropic API version forwarded upstream. SandBase supplies 2023-06-01 when omitted.
Default: 2023-06-01
Comma-separated beta feature identifiers, subject to provider compatibility.
Request body
MessageCreateParamsAnthropic-compatible model identifier.
User and assistant messages containing text or typed content blocks.
Maximum number of output tokens.
Top-level system instruction.
Sampling temperature from 0 to 1.
Default: 1
Nucleus sampling threshold.
Limit sampling to the top K tokens.
Custom sequences that stop generation.
Return Anthropic-style Server-Sent Events.
Default: false
Request metadata, including an optional user_id.
Tool definitions available to the model.
Controls tool selection behavior.
Extended thinking configuration for supported models.
Authentication
Use x-api-key or Authorization: Bearer. When both are provided, x-api-key takes precedence.
Transparent protocol
Except for model mapping and configured provider compatibility rules, SandBase forwards compatible request fields, non-stream responses, and SSE events without protocol translation.
Beta features
anthropic-beta is forwarded when present. A candidate's compatibility rules may remove unsupported beta fields or skip that candidate.
Errors
Invalid request body or unsupported feature.
Missing or invalid API key.
Organization spending limit reached.
API Key spending limit or organization permission failure.
Model not found or unavailable.
The provider rejected the request as too large.
Provider rate limit exceeded.
Prediction lifecycle or provider error.
Upstream stream ended before usable content.
Routing failed or all provider candidates were unavailable.