OPENCLAW + DEEPSEEK

OpenClaw で DeepSeek を使う。

DeepSeek V4 は RunAPI を通じて OpenAI 互換と Anthropic 互換の両プロトコルに対応します。スピードには Flash、品質には Pro。組み込みの推論モードはリクエストパラメータで有効化されます——別のモデルスラッグは不要です。RunAPI は DeepSeek トークンを公式の DeepSeek 料金の 50% で価格設定します。

1つの APIキー · OpenAI + Anthropic プロトコル · ストリーミング対応
RunAPI を使って OpenAI 互換のチャット補完エンドポイント経由で DeepSeek V4 Pro を呼び出します。

要件:
- RunAPI のチャット補完エンドポイント https://runapi.ai/v1/chat/completions を呼び出します
- model を "deepseek-v4-pro" に設定します
- 認証には RUNAPI_API_KEY 環境変数を使用します
- レスポンスは同期的です——stream パラメータに応じて、返信は SSE イベントとしてストリーミングされるか、単一の JSON オブジェクトとして返されます
- 推論を有効にするには、リクエストボディで 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
仕組み

OpenClaw で DeepSeek を使う3ステップ

1

Configure RunAPI as provider

Set the RUNAPI_API_KEY environment variable. In OpenClaw, add RunAPI as an OpenAI-compatible provider with baseUrl https://runapi.ai/v1. DeepSeek works through the same provider you use for GPT or Claude — no separate provider entry needed.

export RUNAPI_API_KEY=runapi_xxx
2

Select a DeepSeek model

Set the model to deepseek-v4-pro for quality or deepseek-v4-flash for speed. Both use the /v1/chat/completions endpoint. To enable reasoning, pass thinking.type set to enabled — no model slug change required.

model: deepseek-v4-pro
3

Stream the response

OpenClaw receives the response as an SSE stream in OpenAI chat completions format. Token usage is reported in the final event for billing transparency. The same format works whether you use DeepSeek, GPT, or Claude through RunAPI.

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.

OpenClaw上のDeepSeekとは?

DeepSeek V4はOpenAI互換のLLMで、OpenClawでのGPTのドロップイン代替として機能します——モデル名を変えるだけで残りはそのままです。リクエストパラメーターによる組み込みの思考連鎖推論をサポートし(別のモデルスラッグ不要)、RunAPIはDeepSeekのすでに低い公式価格の50%で提供し、推論能力を持つモデルの中で最低の1トークンあたりコストになります。

DeepSeekの活用例

高ボリュームアプリ向けバジェットフレンドリーな代替

日次数千のリクエストを処理するアプリのGPTやClaudeをDeepSeekに置き換えます。RunAPIを通じてDeepSeekのすでに低い価格の50%で請求され、OpenAI SDKコードを変更せずにトークンコストが大幅に削減されます。

思考連鎖が見える推論集約タスク

数学・論理・コードデバッグ・計画タスクでThinkingモードを有効にして段階的な推論が精度を向上させます。思考トークンがレスポンスに表示され、モデルの作業を示すUIの構築に役立ちます。

コード生成とデバッグ

コード生成・アルゴリズム実装・デバッグにDeepSeek V4 Proを使用します。コーディングベンチマークで高スコアを取り、GPT-5.5よりも1トークンあたりコストがはるかに低いです。

FAQ

DeepSeek + OpenClaw のよくある質問

OpenClaw の基本設定

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

OpenClaw セットアップガイド →

DeepSeek モデルカタログ

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

DeepSeek モデル →

今すぐ OpenClaw で DeepSeek を試す。

無料の RunAPI キーを取得し、OpenClaw で model を deepseek-v4-pro に設定して、利用可能な最低のトークン価格で推論付きのコーディングを始めましょう。