> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 推論プロキシの概要

> project のルーティング、プロバイダーの認証情報、トレースの取得に 1 つの OpenAI-compatible エンドポイントを使用します。

推論プロキシは、アプリケーションのオンライン パス上の唯一のコンポーネントです。以下を公開します：

```text theme={"system"}
POST https://proxy.training.wandb.ai/v1/chat/completions
Authorization: Bearer <wandb-api-key>
```

既存の OpenAI クライアントは引き続き動作します。`model` の値によって、リクエストが project のルーティングを使用するか、登録済みのプロバイダーを直接呼び出すかが決まります。

<h2 id="what-the-proxy-adds">
  プロキシが追加するもの
</h2>

<CardGroup cols={2}>
  <Card title="OpenAI-compatible のトランスポート" icon="code">
    非ストリーミングおよびストリーミングのチャット補完応答の動作を保持します。
  </Card>
</CardGroup>

<h2 id="supported-routes">
  サポートされるルート
</h2>

| `model` 値 | 結果 |
| - | - |
| `proxy-model-name` | project バージョン 1 の重み付けルーティング |
| `proxy-model-name@v2` | バージョン 2 に固定された重み付けルーティング |
| `provider/model-id` | 登録済みプロバイダーへのCall |

project リクエストは自動的にトレースされます。Direct プロバイダーへのCall は、`metadata["wandb.project"]` が送信先を選択しない限りトレースされません。

ストリーミングしない project リクエストは、`wandb-cache-mode` ヘッダーを使用して [exact-response キャッシュ](/ja/model-distillation/proxy/response-caching) にオプトインすることもできます。これにより、プロバイダーを呼び出す代わりに同一の以前の応答を再生します。

<Accordion title="API: project ルーティングされたリクエストを送信する (POST /chat/completions)">
  ```bash theme={"system"}
  curl --request POST \
    --url "https://proxy.training.wandb.ai/v1/chat/completions" \
    --header "Authorization: Bearer $WANDB_API_KEY" \
    --header "Content-Type: application/json" \
    --data '{
      "model": "ticket-classifier",
      "messages": [{"role": "user", "content": "Classify this request"}],
      "metadata": {"wandb.entity": "your-team"}
    }'
  ```

  ルーティングされたチャット補完の作成については、[Create a routed chat completion](/ja/model-distillation/reference/proxy/chat-completions/create-a-routed-chat-completion) を参照してください。
</Accordion>

<h2 id="fail-closed-behavior">
  Fail closed 動作
</h2>

プロキシは、任意のエンドポイントを呼び出す前に、不明な W\&B key、entity、project、バージョン、およびプロバイダーを拒否します。プロバイダー URL と認証情報は、サーバー管理のマテリアライゼーションからのみ提供されます。呼び出し元は、リクエストヘッダーまたはトークンでそれらを指定できません。


## Related topics

- [API の概要](/ja/model-distillation/reference/overview.md)
