Claude ネイティブ形式
Claude シリーズ向けの Anthropic Messages ネイティブ形式 API です。/v1/messages と互換性があります。
Anthropic Messages API と互換性があります。Anthropic 公式 SDK anthropic をそのまま使用し、base_url を https://api.covanexus.com に設定できます。
POST
/v1/messages
https://api.covanexus.com
認証
ボディ
認証
Authorization BearerAuth
Authorization Bearer <token>
Bearer トークン認証を使用します:Authorization: Bearer $COVA_NEXUS_API_KEY。Anthropic 形式のリクエストヘッダー x-api-key: $COVA_NEXUS_API_KEY にも対応します。anthropic-version: 2023-06-01 は x-api-key を使用する場合に必須です。
場所:ヘッダー
リクエストボディ
application/json
model* string
モデル ID(例:claude-sonnet-4-5)
messages* array[object]
会話メッセージの一覧。各要素には
role(user/assistant)と、メッセージ本文の contentmax_tokens* integer
生成トークンの最大数
system? string | array[object]
システムプロンプト
temperature? number
サンプリング温度
デフォルト:1 | 範囲:0 ≤ 値 ≤ 1
top_p? number
nucleus sampling(核サンプリング)のパラメータ
top_k? integer
Top-K サンプリング
stream? boolean
ストリーミング出力を有効にします(SSE イベントストリーム)
デフォルト:false
stop_sequences? array[string]
停止シーケンス
tools? array[object]
利用可能なツールの一覧(ツール呼び出し)
tool_choice? object
ツールの選択方法
thinking? object
対応する Claude モデル向けの拡張思考設定
metadata? object
カスタムメタデータ
レスポンスボディ
| ステータスコード | コンテンツタイプ |
|---|---|
| 200 | application/json |
| 400 | application/json |
| 429 | application/json |
curl -X POST "https://api.covanexus.com/v1/messages" \
-H "Authorization: Bearer $COVA_NEXUS_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-5",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "一文で自己紹介してください"}
]
}'200
400
429
{
"id": "msg_xxx",
"type": "message",
"role": "assistant",
"model": "claude-sonnet-4-5",
"content": [
{
"type": "text",
"text": "string"
}
],
"stop_reason": "end_turn",
"stop_sequence": null,
"usage": {
"input_tokens": 0,
"output_tokens": 0,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0
}
}BearerAuth