Create a Message
Create a message using the Anthropic-compatible Messages API.
Authorizations
ShuYou API key sent as x-api-key (Anthropic-compatible).
Headers
Anthropic API version. Currently only 2023-06-01 is supported.
"2023-06-01"
Optional beta features (comma-separated). code-execution-2025-08-25 is not supported on ShuYou.
Body
Model ID (provider/model_name), e.g. from List Models.
"anthropic/claude-sonnet-4.6"
Maximum tokens to generate (including thinking tokens when enabled).
x >= 11024
Conversation history. Roles alternate user / assistant; up to 100,000 messages.
1System prompt (no system role in messages).
Not supported on ShuYou.
Custom sequences that stop generation (stop_reason: stop_sequence).
Stream the response via server-sent events.
Sampling temperature (0 = more deterministic, 1 = more creative).
0 <= x <= 1Nucleus sampling. Prefer tuning either temperature or top_p.
0 <= x <= 1Sample only from the top K tokens (advanced).
x >= 0Extended thinking configuration.
- Option 1
- Option 2
- Option 3
- Option 1
- Option 2
Tools the model may call (client tools and supported server tools).
- Option 1
- Option 2
Output configuration such as structured JSON.
Container identifier for reuse across requests (e.g. code execution).
Geographic region for inference processing.
Not supported on ShuYou.
auto, standard_only Response
Message object, or SSE stream when stream is true