HERMES + DEEPSEEK

Hermes Agent で DeepSeek を使う。

DeepSeek V4 は RunAPI を通じて OpenAI チャット補完と Anthropic messages の両プロトコルに対応します。Hermes Agent は custom:runapi プロバイダー経由で接続します——他のモデルに使用するのと同じベース URL とキーを使用します。リクエストパラメータで推論モードを有効化します。RunAPI は DeepSeek を公式料金の 50% で価格設定します。

1つの APIキー · OpenAI + Anthropic プロトコル · ストリーミング対応
RunAPI を使って Hermes Agent の custom:runapi プロバイダー経由で DeepSeek V4 Pro を呼び出します。

要件:
- Hermes Agent ですでに設定されている custom:runapi プロバイダーを使用します
- RunAPI のチャット補完エンドポイント https://runapi.ai/v1/chat/completions を呼び出します
- model を "deepseek-v4-pro" に設定します
- RUNAPI_API_KEY 環境変数が認証を提供します
- レスポンスは OpenAI チャット補完形式の SSE イベントとしてストリーミングされます
- 推論を有効にするには、リクエストボディで thinking.type を "enabled" に設定します
curl -X POST https://runapi.ai/v1/chat/completions \
  -H "Authorization: Bearer $RUNAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-pro",
    "messages": [
      {"role": "system", "content": "You are a helpful coding assistant."},
      {"role": "user", "content": "Write a Python function that finds the longest palindromic substring in O(n) time using Manacher algorithm."}
    ],
    "stream": true,
    "max_tokens": 4096
  }'
{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "model": "deepseek-v4-pro",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Here is Manacher's algorithm implementation..."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 42,
    "completion_tokens": 356,
    "total_tokens": 398
  }
}
curlコマンドをコピーしてテスト deepseek
仕組み

Hermes Agent で DeepSeek を使う3ステップ

1

Configure RunAPI provider

Set the RUNAPI_API_KEY environment variable. If you already added RunAPI as custom:runapi in Hermes Agent, the same provider and key work for DeepSeek — no extra configuration. If not, add RunAPI with base_url https://runapi.ai/v1 and api_mode chat_completions.

export RUNAPI_API_KEY=runapi_xxx
2

Select a DeepSeek model

Switch the model to deepseek-v4-pro for quality or deepseek-v4-flash for speed. Both use the /v1/chat/completions endpoint through the custom:runapi provider. Enable reasoning by passing thinking.type set to enabled — no separate model entry needed.

model: deepseek-v4-pro
3

Stream the response

Hermes Agent receives the response as an SSE stream in OpenAI chat completions format. Token usage appears in the final event. Switch between DeepSeek, GPT, and Claude models without changing the provider config — only the model field changes.

stream: true
パラメータ

DeepSeek チャット補完パラメータ

パラメータ 説明
model string Required. deepseek-v4-pro or deepseek-v4-flash.
messages array Required. Array of message objects with role (system, user, assistant) and content fields.
stream boolean Optional. Set to true for SSE streaming. Default false.
max_tokens integer Optional. Maximum number of tokens to generate.
temperature number Optional. Sampling temperature between 0 and 2. Lower values are more deterministic.
thinking object Optional. Set type to "enabled" to activate DeepSeek's built-in reasoning mode.

Hermes AgentのDeepSeekとは?

DeepSeek V4はバジェットフレンドリーなLLMで、RunAPIではOpenAIとAnthropicの両プロトコルサーフェスで動作します。Hermes AgentはGPTやClaudeと同じcustom:runapi provider経由で呼び出します——modelパラメーターを変えるだけです。RunAPIはDeepSeekのすでに低い価格の50%で提供し、単一のAPIキーで利用できる最低コストの推論能力モデルになります。

DeepSeekの活用例

セルフホスティング代替の評価

オープンソースウェイトをセルフホストするかどうかを決める前に、RunAPIのAPIでDeepSeekをテストします。APIコストがインフラの損益分岐点を下回れば、ホステッドバージョンを使い続けます。

思考連鎖を表示する推論UIの構築

Thinkingモードを有効にして思考トークンをUIに表示し、モデルがどのように問題を解いたかユーザーに見せます。チュータリングアプリ・コードデバッグツール・意思決定サポートシステムに適しています。

最低コストの大量バッチ処理

大量ドキュメントセット・分類タスク・データ抽出ジョブに対してDeepSeek Flashで高速低コスト処理を行い、1トークンあたりコストがピーク品質より重要なシナリオに最適です。

FAQ

DeepSeek + Hermes Agent のよくある質問

Hermes Agent の基本設定

まだ設定していませんか?Hermes Agent の RunAPI セットアップガイドから始めましょう。

Hermes Agent セットアップガイド →

DeepSeek モデルカタログ

DeepSeek V4 のバリアント、価格、API ドキュメントを確認できます。

DeepSeek モデル →

今すぐ Hermes Agent で DeepSeek を試す。

無料の RunAPI キーを取得し、Hermes Agent で model を deepseek-v4-pro に設定して、DeepSeek に直接アクセスする半分のコストで推論を始めましょう。