HERMES + GPT

Hermes Agent で GPT を使う。

GPT-5.5 は OpenAI のフラッグシップ生成AIで、RunAPI を通じて公式のトークン単価の半額で利用できます。Hermes Agent は chat_completions モードで custom:runapi プロバイダーを介して接続します——1つの設定ブロックですべての GPT バリアント(5.5、5.4、5.4-mini、5.3-codex)がストリーミング、関数呼び出し、構造化出力とともに解放されます。

1つの APIキー · OpenAI 互換 · ストリーミングレスポンス
RunAPI を使って OpenAI 互換の Chat Completions エンドポイント経由で GPT-5.5 を呼び出します。

要件:
- RUNAPI_API_KEY から API キーを読み込みます。
- base_url https://runapi.ai/v1 で custom:runapi プロバイダーを使用します。
- POST https://runapi.ai/v1/chat/completions を呼び出します。
- model を "gpt-5.5" に設定します。
- 少なくとも1つの user メッセージを含む messages 配列を含めます。
- レスポンスは同期的です——補完結果は同じ HTTP レスポンスで返されます。
- ストリーミングには "stream": true を設定して server-sent events を受け取ります。
- Responses API には代わりに POST https://runapi.ai/v1/responses を呼び出します。
curl -X POST https://runapi.ai/v1/chat/completions \
  -H "Authorization: Bearer $RUNAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.5",
    "messages": [
      {"role": "system", "content": "You are a concise coding assistant."},
      {"role": "user", "content": "Write a Python function that merges two sorted lists in O(n) time."}
    ],
    "temperature": 0.3,
    "max_tokens": 1024
  }'
{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "model": "gpt-5.5",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "def merge_sorted(a, b):\n    result = []\n    i = j = 0\n    while i < len(a) and j < len(b):\n        if a[i] <= b[j]:\n            result.append(a[i]); i += 1\n        else:\n            result.append(b[j]); j += 1\n    result.extend(a[i:])\n    result.extend(b[j:])\n    return result"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 38,
    "completion_tokens": 95,
    "total_tokens": 133
  }
}
curlコマンドをコピーしてテスト gpt
仕組み

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

1

Add RunAPI as a custom provider

If the custom:runapi provider is already configured in Hermes Agent, the same key works for GPT. Otherwise, add a custom provider with base_url https://runapi.ai/v1, key_env set to RUNAPI_API_KEY, and api_mode set to chat_completions.

export RUNAPI_API_KEY=runapi_xxx
2

Select a GPT model

Set the default model to gpt-5.5 for the flagship, gpt-5.4 or gpt-5.4-mini for lower cost, or gpt-5.3-codex for code-heavy tasks. The /v1/chat/completions endpoint returns a standard OpenAI response with usage counts and finish_reason.

default: gpt-5.5
3

Use streaming or function calling

Hermes Agent forwards stream, tools, and response_format parameters through the custom:runapi provider. All standard OpenAI Chat Completions parameters work through RunAPI without modification.

"stream": true
パラメータ

GPT Chat Completions パラメータ

パラメータ 説明
model string Required. gpt-5.5, gpt-5.4, gpt-5.4-mini, gpt-5.4-nano, gpt-5.3-codex, or gpt-5.2.
messages array Required. Array of message objects with role (system, user, assistant) and content fields.
temperature number Optional. Sampling temperature between 0 and 2. Lower values produce more deterministic output. Defaults to 1.
max_tokens integer Optional. Maximum number of tokens to generate in the completion.
stream boolean Optional. When true, returns server-sent events with incremental token deltas. Defaults to false.
tools array Optional. Array of tool definitions for function calling. Each tool has a type, function name, description, and parameters schema.
response_format object Optional. Set type to "json_object" or "json_schema" for structured JSON output.
reasoning_effort string Optional. Controls thinking depth for supported models. Accepted values are low, medium, high.

Hermes AgentのGPTとは?

GPTはOpenAIのLLMファミリーで、RunAPIのcustom:runapi providerを通じて公式の1トークンあたり価格の半額で提供されます。Hermes Agentは標準のchat_completions APIモードで接続するため、GPT-5.5・5.4・5.4-mini・5.3-codexすべてがストリーミング・関数呼び出し・構造化JSON出力・ビジョン入力をサポートし——すべてClaudeやGeminiと同じprovider設定で利用できます。

GPTの活用例

CodexモデルによるAgentic Coding

Hermes AgentでGPT-5.3-codexをコード生成・リファクタリング・自動化されたPRワークフローに使用し、フラッグシップモデルより低コストで実行します。

構造化出力によるバッチ処理

GPTのjson_schema応答フォーマットで大量ドキュメントを処理し、RAGパイプライン・請求書解析・コンテンツ分類のために大規模に構造化データを抽出します。

タスク複雑度による動的ルーティング

シンプルなクエリをコスト効率のためGPT-5.4-miniに、複雑な推論タスクを品質のためGPT-5.5にルーティングし——すべて同じcustom:runapi providerとAPIキーを通じて行えます。

FAQ

GPT + Hermes Agent のよくある質問

Hermes Agent の基本設定

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

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

GPT モデルカタログ

すべての GPT バリアント、トークン単価、API ドキュメントを確認できます。

GPT on RunAPI →

今すぐ Hermes Agent で GPT-5.5 を試す。

無料の RunAPI キーを取得し、custom:runapi プロバイダーを設定して、公式 OpenAI トークン価格の半額で GPT-5.5 を呼び出しましょう——ストリーミング、関数呼び出し、構造化出力を含みます。