curl --request POST \
--url https://direct.evolink.ai/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kimi-k3.1-pro",
"max_tokens": 1024,
"output_config": {
"effort": "low"
},
"messages": [
{
"role": "user",
"content": "Reply with OK."
}
]
}
'{
"id": "<string>",
"type": "message",
"role": "assistant",
"model": "kimi-k3.1-pro",
"content": [
{
"type": "text",
"text": "<string>"
}
],
"stop_reason": "end_turn",
"stop_sequence": "<string>",
"usage": {
"input_tokens": 123,
"cache_creation_input_tokens": 123,
"cache_read_input_tokens": 123,
"output_tokens": 123,
"output_tokens_details": {
"thinking_tokens": 123
},
"cache_creation": {
"ephemeral_5m_input_tokens": 1,
"ephemeral_1h_input_tokens": 1
},
"server_tool_use": {
"web_search_requests": 1
}
}
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
},
"request_id": "<string>"
}Kimi API(全モデル)- Messages 完全リファレンス
公開エンドポイントは POST /v1/messages です。推論強度は output_config.effort で設定します。トップレベルの cache_control は 5m/1h の書き込みを制御します(K3.1 シリーズのみ)。thinking、signature、tool_use、サーバー側の検索結果ブロックを完全に保持してください。
curl --request POST \
--url https://direct.evolink.ai/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kimi-k3.1-pro",
"max_tokens": 1024,
"output_config": {
"effort": "low"
},
"messages": [
{
"role": "user",
"content": "Reply with OK."
}
]
}
'{
"id": "<string>",
"type": "message",
"role": "assistant",
"model": "kimi-k3.1-pro",
"content": [
{
"type": "text",
"text": "<string>"
}
],
"stop_reason": "end_turn",
"stop_sequence": "<string>",
"usage": {
"input_tokens": 123,
"cache_creation_input_tokens": 123,
"cache_read_input_tokens": 123,
"output_tokens": 123,
"output_tokens_details": {
"thinking_tokens": 123
},
"cache_creation": {
"ephemeral_5m_input_tokens": 1,
"ephemeral_1h_input_tokens": 1
},
"server_tool_use": {
"web_search_requests": 1
}
}
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
},
"request_id": "<string>"
}https://direct.evolink.ai で、テキストモデルと長時間接続をより適切にサポートします。https://api.evolink.ai はマルチモーダルサービスの主要エンドポイントで、テキストモデルの代替アドレスとして使用されます。承認
##すべての API で Bearer Token 認証が必要です##
API キーの取得:
API キー管理ページで API キーを取得してください
リクエストヘッダーに追加:
Authorization: Bearer YOUR_API_KEY
ボディ
呼び出すモデル:
| モデル ID | 位置付け | 推論強度 |
|---|---|---|
kimi-k3.1-pro | 最新世代モデル(推奨) | low / high / max, デフォルト max |
kimi-k3.1-pro-highspeed | Pro と同じパラメータで、より高速に生成 | kimi-k3.1-pro と同じ |
kimi-k3 | 前世代モデル | max のみ |
3 モデルともコンテキストウィンドウは 1,048,576 tokens で、推論は常に有効です。
構造化出力(output_config.format)、停止シーケンス(stop_sequences)、キャッシュ書き込み TTL(cache_control)は K3.1 シリーズのみ対応し、kimi-k3 は対応しません。kimi-k3 のレスポンスには text ブロックのみが含まれ、thinking ブロックが返らない場合があります。
kimi-k3.1-pro, kimi-k3.1-pro-highspeed, kimi-k3 thinking と最終テキストを含む、この生成で使用できる最大 token 数。
1 <= x <= 1048576Anthropic Messages のメッセージ一覧。複数ターンの会話では、assistant の完全なコンテンツブロックを変更せずに返してください。
1Show child attributes
Show child attributes
文字列または text ブロック配列のシステムプロンプト。
Anthropic SSE イベントストリームを返すかどうか。
カスタム関数またはサーバー側 Web 検索。内蔵検索は type=web_search_20250305、name=web_search を使用し、実際の呼び出し回数で課金されます。
- Option 1
- Option 2
Show child attributes
Show child attributes
Show child attributes
Show child attributes
停止シーケンス。完全一致すると出力を停止し、一致したシーケンス自体は出力しません。最大 5 個、各 32 バイト以下です。一致時は stop_reason が end_turn、stop_sequence が null になります。
kimi-k3.1-pro / kimi-k3.1-pro-highspeed のみ対応し、kimi-k3 は対応しません。
5トップレベルのキャッシュ書き込み設定。kimi-k3.1-pro / kimi-k3.1-pro-highspeed のみ対応し、kimi-k3 はこのパラメータに対応しません。書き込み TTL はトップレベルの cache_control のみで制御され、メッセージブロック内のキャッシュマーカーでは代替できません。省略時は 5m です。
Show child attributes
Show child attributes
出力設定:推論強度と構造化出力。
Show child attributes
Show child attributes
サンプリング温度。モデル側で 1 に固定されているため、指定は不要です。kimi-k3.1-pro / kimi-k3.1-pro-highspeed はこのフィールドを自動的に無視し、kimi-k3 は未対応の値に対してエラーを返します。
核サンプリングの閾値。モデル側で 0.95 に固定されているため、指定は不要です。kimi-k3.1-pro / kimi-k3.1-pro-highspeed はこのフィールドを自動的に無視し、kimi-k3 は未対応の値に対してエラーを返します。
レスポンス
Message 応答。ストリーミングリクエストでは Anthropic SSE イベントストリームを返します
message assistant "kimi-k3.1-pro"
テキスト、画像、推論、ツール呼び出し、またはツール結果を表す Anthropic コンテンツブロック。
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
Show child attributes
Show child attributes
end_turn, max_tokens, tool_use, refusal, null Show child attributes
Show child attributes