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

# CometAPI で IntelliJ Translation Plugin を使う

> base URL、API key、model または provider オプションを設定して、IntelliJ Translation Plugin を CometAPI で構成するためのガイドです。

[IntelliJ Translation Plugin](https://plugins.jetbrains.com/plugin/8579-translation) は、JetBrains IDE に AI 翻訳機能を直接追加します。CometAPI に接続すれば、エディタを離れることなくコードやテキストを翻訳できます。

## 前提条件

* [IntelliJ IDEA](https://www.jetbrains.com/idea/) または他の JetBrains IDE

* Translation Plugin がインストールされていること — JetBrains Marketplace で **Translation** を検索してください

  <Frame>
    <img src="https://mintcdn.com/cometapi/mA1ovj6s0e3RM42l/images/integrations/810968_352994.png?fit=max&auto=format&n=mA1ovj6s0e3RM42l&q=85&s=3ea7331394d52a903c9b550830689eef" alt="Translation プラグインを表示している JetBrains Marketplace" width="972" height="806" data-path="images/integrations/810968_352994.png" />
  </Frame>

* 有効な API key を持つ [CometAPI](https://www.cometapi.com) アカウント

## セットアップ

<Steps>
  <Step title="CometAPI API キーを取得する">
    [CometAPI ダッシュボード](https://www.cometapi.com/console)にログインします。**Add API Key** をクリックして、キーをコピーします。

    <Frame>
      <img src="https://mintcdn.com/cometapi/E4FFvyMYmaOZoldp/images/integrations/810968_360264.png?fit=max&auto=format&n=E4FFvyMYmaOZoldp&q=85&s=686b18e5eda53581cd92f39b18683c01" alt="CometAPI ダッシュボード — API キーセクション" width="1920" height="1005" data-path="images/integrations/810968_360264.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/cometapi/E4FFvyMYmaOZoldp/images/integrations/810968_360265.png?fit=max&auto=format&n=E4FFvyMYmaOZoldp&q=85&s=4a5a528f1fbbeb3da7ace18066b73bd1" alt="CometAPI コンソールの Add API Key ダイアログ" width="1914" height="999" data-path="images/integrations/810968_360265.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/cometapi/E4FFvyMYmaOZoldp/images/integrations/810968_360266.png?fit=max&auto=format&n=E4FFvyMYmaOZoldp&q=85&s=8462dfff1cf0a880c44effc7dccbc131" alt="CometAPI API キーとベース URL" width="1920" height="975" data-path="images/integrations/810968_360266.png" />
    </Frame>
  </Step>

  <Step title="翻訳エンジンを設定する">
    IDE ツールバーの Translation Plugin アイコンをクリックし、**Settings** → **Translation** の順に進みます。エンジンとして **OpenAI Translation** を選択します。右側の設定パネルで、**API Endpoint** フィールドに `https://api.cometapi.com` を入力します（2 番目のフィールドはデフォルトで `/v1/chat/completions` です）。**API Key** に CometAPI キーを貼り付け、**Confirm** をクリックします。

    <Frame>
      <img src="https://mintcdn.com/cometapi/SZhlxZhCnMLn__BW/images/overview/810968_364191.png?fit=max&auto=format&n=SZhlxZhCnMLn__BW&q=85&s=aef81a83f29f8eb16655ed4060425f50" alt="CometAPI ダッシュボード — Add API Key ボタンとキー一覧" width="3824" height="1892" data-path="images/overview/810968_364191.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/cometapi/HhtmQffktazbxUvS/images/overview/810968_364193.png?fit=max&auto=format&n=HhtmQffktazbxUvS&q=85&s=d893f659267150d0faf45f99eb5dffc1" alt="CometAPI API キーの詳細" width="2434" height="1232" data-path="images/overview/810968_364193.png" />
    </Frame>
  </Step>

  <Step title="連携をテストする">
    プラグイン設定で **Test Service** をクリックします。検証が成功すれば、セットアップが正しく機能していることを確認できます。

    <Frame>
      <img src="https://mintcdn.com/cometapi/mA1ovj6s0e3RM42l/images/integrations/810968_352997.png?fit=max&auto=format&n=mA1ovj6s0e3RM42l&q=85&s=2acec03c1fcd4584cf8448d588cf5d68" alt="IntelliJ Translation Plugin のテスト — 成功結果" width="1092" height="944" data-path="images/integrations/810968_352997.png" />
    </Frame>
  </Step>
</Steps>

<Tip>
  カスタムモデルを追加するには、プラグインのモデル設定フィールドに現在の model ID を入力します。

  <Frame>
    <img src="https://mintcdn.com/cometapi/mA1ovj6s0e3RM42l/images/integrations/810968_352998.png?fit=max&auto=format&n=mA1ovj6s0e3RM42l&q=85&s=1138ce4ff04851f6db1ff996ea91f667" alt="カスタムモデルが追加された IntelliJ Translation Plugin のモデル設定" width="1215" height="874" data-path="images/integrations/810968_352998.png" />
  </Frame>
</Tip>

<script type="application/ld+json">
  {`
    {
    "@context": "https://schema.org",
    "@graph": [
      {
        "@type": "HowTo",
        "@id": "https://apidoc.cometapi.com/integrations/intellij-translation-plugin#howto",
        "name": "CometAPI で IntelliJ Translation Plugin を使う",
        "description": "このガイドでは、ベース URL、API キー、model またはプロバイダーのオプションを設定して、CometAPI で IntelliJ Translation Plugin を構成する方法を説明します。",
        "step": [
          {
            "@type": "HowToStep",
            "@id": "https://apidoc.cometapi.com/integrations/intellij-translation-plugin#step-1",
            "position": 1,
            "name": "CometAPI API キーを取得する",
            "text": "CometAPI アカウントを作成または開き、ダッシュボードから有効な API キーをコピーします。"
          },
          {
            "@type": "HowToStep",
            "@id": "https://apidoc.cometapi.com/integrations/intellij-translation-plugin#step-2",
            "position": 2,
            "name": "翻訳エンジンを設定する",
            "text": "CometAPI で IntelliJ Translation Plugin を使うガイドの「翻訳エンジンを設定する」手順を完了します。"
          },
          {
            "@type": "HowToStep",
            "@id": "https://apidoc.cometapi.com/integrations/intellij-translation-plugin#step-3",
            "position": 3,
            "name": "連携をテストする",
            "text": "CometAPI で IntelliJ Translation Plugin を使うガイドの「連携をテストする」手順を完了します。"
          }
        ]
      },
      {
        "@type": "BreadcrumbList",
        "itemListElement": [
          {
            "@type": "ListItem",
            "position": 1,
            "name": "CometAPI ドキュメント",
            "item": "https://apidoc.cometapi.com/"
          },
          {
            "@type": "ListItem",
            "position": 2,
            "name": "連携",
            "item": "https://apidoc.cometapi.com/integrations"
          },
          {
            "@type": "ListItem",
            "position": 3,
            "name": "CometAPI で IntelliJ Translation Plugin を使う",
            "item": "https://apidoc.cometapi.com/integrations/intellij-translation-plugin"
          }
        ]
      }
    ]
    }
    `}
</script>
