Skip to main content
POST
Create an Anthropic-format message

Authorizations

Authorization
string
header
required

Nscale bearer token supplied in the Authorization header.

Headers

X-Organization-Id
string

Selects the caller's public-cloud organization. Required when the caller belongs to multiple public-cloud organizations and the URL does not select an organization; omission then returns 400. With one public-cloud organization, omission selects it automatically. An explicitly supplied value, including an empty value, that is not one of the caller's public-cloud organizations returns 403. On /organizations/{organization_id}/endpoints, the path organization_id takes precedence over this header.

Minimum string length: 1
X-Request-Id
string

Optional correlation identifier. Use the X-Request-Id returned in the response when contacting support. The response ID may differ from this value. Supplying this header does not make a request idempotent.

Body

application/json

Supported Messages request fields. Tool results support text only; is_error and non-text results do not affect the response. Only custom function tools are supported; disable_parallel_tool_use does not control parallel tool calls. Cache controls, metadata, top_k, hosted tools, thinking controls and reasoning-history blocks are not supported. Unknown fields may be accepted and ignored.

model
string
required
Minimum string length: 1
max_tokens
integer
required
Required range: x >= 1
messages
object[]
required
system
stop_sequences
string[]
stream
boolean
default:false
temperature
number
top_p
number
tools
object[]
tool_choice
object

Response

Successful response as JSON, or server-sent events when streaming is supported and requested.

id
string
required
type
string
required
Allowed value: "message"
role
string
required
Allowed value: "assistant"
content
object[] | null
required
model
string
required
stop_reason
enum<string> | null
Available options:
end_turn,
max_tokens,
tool_use,
refusal
stop_sequence
string | null
usage
object