{
"id": "msg_xxxxxxxx",
"type": "message",
"role": "assistant",
"model": "qwen3.8-max",
"content": [
{
"type": "text",
"text": "こんにちは!私は通義千問 Qwen3.8-Max です。"
}
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 12,
"output_tokens": 104,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0
}
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "max_tokens is required"
}
}{
"type": "error",
"error": {
"type": "authentication_error",
"message": "Invalid or expired token"
}
}{
"type": "error",
"error": {
"type": "insufficient_quota",
"message": "Insufficient credits"
}
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
}
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
}
}Qwen3.8-Max - Anthropic 互換インターフェース
- Anthropic Messages プロトコルで Qwen3.8-Max を呼び出します
- システムプロンプト:トップレベルの
systemフィールドで設定(messages 内には置きません) - マルチモーダル入力:
contentに内容ブロック配列を渡し、text/imageに対応 - コンテキストキャッシュ:内容ブロックに
cache_controlを付けて明示的キャッシュを宣言;ヒット / 作成は応答のusage.cache_read_input_tokens/usage.cache_creation_input_tokensを参照 - 思考モード:
thinkingで開始し、思考はthinking内容ブロックとしてストリーミング返却されます - ストリーミング出力:
stream=trueの場合、Anthropic SSE イベント(message_start/content_block_delta/message_deltaなど)で返します
{
"id": "msg_xxxxxxxx",
"type": "message",
"role": "assistant",
"model": "qwen3.8-max",
"content": [
{
"type": "text",
"text": "こんにちは!私は通義千問 Qwen3.8-Max です。"
}
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 12,
"output_tokens": 104,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0
}
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "max_tokens is required"
}
}{
"type": "error",
"error": {
"type": "authentication_error",
"message": "Invalid or expired token"
}
}{
"type": "error",
"error": {
"type": "insufficient_quota",
"message": "Insufficient credits"
}
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
}
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
}
}https://direct.evolink.ai で、テキストモデルへのサポートがより優れ、長時間接続に対応しています;https://api.evolink.ai はマルチモーダル主力アドレスで、画像入力を含む場合はこのアドレスを使用してください。承認
##すべての API で Bearer Token 認証が必要です##
API キーの取得:
API キー管理ページで API キーを取得してください
リクエストヘッダーに追加:
Authorization: Bearer YOUR_API_KEY
ボディ
対話モデル名
qwen3.8-max "qwen3.8-max"
生成内容の最大 token 数。
必須(Anthropic プロトコルの要件)。モデルの生成がこの値を超えると切り捨てられます。
1024
対話メッセージのリスト(system は含みません)。各メッセージには role(user / assistant)と content(文字列または内容ブロック配列)が含まれます。
Show child attributes
Show child attributes
システムプロンプト。プレーンテキストの場合は文字列を渡します;明示的キャッシュを宣言する場合は内容ブロック配列を渡します(ブロックに cache_control を付けます)。
サンプリング温度、値の範囲は [0, 2]。
0 <= x <= 2核サンプリングパラメータ、値の範囲は (0, 1]。
0 <= x <= 1確率が最も高い K 個の token からサンプリングします。
カスタム停止シーケンス、ヒットすると生成を停止します。
Anthropic SSE イベントでストリーミング返却するかどうか。
深い思考の設定。有効にするとモデルは thinking 内容ブロックで思考過程を返します。
Show child attributes
Show child attributes
ツール定義のリスト(Anthropic tools 形式)、Function Calling に使用します。
Show child attributes
Show child attributes
レスポンス
生成に成功しました
"msg_xxxxxxxx"
"message"
"assistant"
"qwen3.8-max"
応答内容ブロックの配列
Show child attributes
Show child attributes
停止理由:end_turn(正常終了)、max_tokens(上限に到達)、stop_sequence(停止シーケンスにヒット)、tool_use(ツール呼び出しが必要)
"end_turn"
Token 使用統計(Anthropic のセマンティクス:input_tokens はキャッシュを含まず、cache フィールドと排他的に加算)。
Show child attributes
Show child attributes