Create Message (Messages)
/v1/messagesCall Nex N2.6 using the Anthropic Messages format. Send the x-api-key: <API Key>, anthropic-version: 2023-06-01, and Content-Type: application/json headers.
Production HTTP requests use https://api.mosi.cn. Before running the examples below, set MOSS_API_ORIGIN to https://api.mosi.cn and MOSS_API_KEY to your MOSS API Key.
Request parameters
Use nex-n2.6 or the pinned snapshot nex-n2.6-2026-11-05.
Pass the conversation messages and relevant history.
Use user or assistant. Send tool results in a user message.
Use a string for text-only input. For images, use a content block with type: image and a URL or Base64 source. Messages does not support video.
Output token budget. The production default is 8192, and the parameter maximum is 131072. The examples pass 1024 explicitly.
Set to true to stream the response.
Supports function tools executed by the client.
Optional. If supplied, use 2026-11-05 and make sure it matches the snapshot selected by model.
Response fields
ID of the snapshot used to generate this response.
Read text from blocks with type set to text. Tool call blocks have type set to tool_use.
Stop reason. tool_use indicates that the client needs to execute a tool.
Usage for this generation.
Anthropic client integration
Send requests to https://api.mosi.cn/v1/messages. Pass your MOSS API key in x-api-key and set anthropic-version: 2023-06-01.