Messages

Create message (Anthropic compatible)

Anthropic Messages-compatible endpoint. SandBase uses model and stream for routing, maps the public model name to the selected provider, and otherwise preserves the compatible request and response protocol. Provider compatibility rules may remove or reject unsupported beta fields before an upstream attempt.

post/v1/messages

Request

  • Base URL: https://api.sandbase.ai
  • URL: https://api.sandbase.ai/v1/messages
  • Auth: one of:
    • HTTP bearer
    • API key in header x-api-key

Headers

anthropic-versionstring
Example:2023-06-01

Anthropic API version. Defaults to 2023-06-01 when omitted.

anthropic-betastring

Comma-separated Anthropic beta feature identifiers. Availability is provider-specific.

Request body

modelstring required
max_tokensinteger required
temperaturenumber
top_pnumber
top_kinteger
stop_sequencesstring[]
streamboolean
metadataobject
toolsobject[]
tool_choiceobject
thinkingobject

Extended thinking configuration when supported by the selected model.

Example request

{
  "model": "claude-sonnet-5",
  "max_tokens": 4096
}

Response

Anthropic message response or event stream from the selected provider

idstring
type'message'
role'assistant'
modelstring
contentobject[]
stop_reasonstring nullable
stop_sequencestring nullable

Changes

No recorded changes to this operation across all 1 revision of this API.