AI エージェント向け: ドキュメントインデックスは https://www.mongodb.com/ja-jp/docs/llms.txt で利用できます。すべてのページの markdown バージョンは、いずれかの URL パスに .md を追加することで利用できます。
Docs Menu

モデルAPIキー

モデルAPIキーは、埋め込み API および再ランクAPIの認証および承認メカニズムとして機能し、 APIからVoyage AIモデルにアクセスできるようにします。このページでは、 Atlas UIでAPIキーを作成および管理する方法について説明します。

注意

Atlas の他のAPIキーと区別するために、モデルAPIキー という名前が付けられています。このキーは、他のモデルプロバイダーのAPIキーと同じ方法で使用します。

Atlas UIから組織とプロジェクトレベルでモデルAPIキーを作成および管理できます。レート制限は、APIキーに対して、組織レベルまたはプロジェクトレベルで作成されたかどうかに基づいて適用されます。

モデルAPIキーを作成、更新、削除するには、次の手順に従います。

モデルAPIキーを表示するには:

  • Organization Read Only組織レベルとプロジェクトレベルで、Atlas への 以上のアクセス権が必要です。

  • Project Read Onlyプロジェクトレベルのみで、Atlas への 以上のアクセス権が必要です。

各ロールの権限の完全なリストについては、「組織とプロジェクトのアクセス」を参照してください。

組織レベルでモデルAPIキーを作成したら、そのキーをプロジェクトにリンクします。キーを作成した後は、キーがリンクされているプロジェクトを変更することはできません。レート制限は、プロジェクト内の各キーに適用されます。

注意

If you create a model API key through Atlas, as described in the following procedure, the key authenticates requests to the ai.mongodb.com endpoints. Conversely, if you create a key through VoyageAI directly, it will authenticate requests to https://api.voyageai.com/v1/embeddings.

You also set the key's scope when you create it. To learn more, see Key Scope.

組織レベルでモデルAPIキーを作成するには、次の手順を実行します。

1
2
  1. まだ表示されていない場合は、以下から目的の組織を選択しますナビゲーション バーのOrganizationsメニュー

  2. 組織レベルで、ナビゲーション バーの Services ヘッダーの下の Model API Keys をクリックします。

3
  1. [Create new model API key] をクリックします。

  2. キーの名前を入力します。

    モデルAPIキーは、250 文字を超えることはできません。

  3. ドロップダウンから、 APIキーにリンクするプロジェクトを選択します。

  4. Select a cloud provider from the Cloud provider dropdown.

    Select any to leave the cloud dimension unscoped.

  5. Optional. Select a geography from the Geography dropdown.

    Most keys don't need a Geography. Select any to leave the geography dimension unscoped.

    Atlas displays the read-only API Endpoint for the scope that you select. The key authenticates against this endpoint.

  6. [Create] をクリックします。

4
  1. モデルAPIキーをコピーし、安全なロケーションに保存します。

    キーが表示されているページを離れた後は、再度表示できなくなります。紛失した場合は、新しいものを作成してください。

  2. [Done] をクリックします。

プロジェクトレベルでモデルAPIキーを作成するには、次の手順を実行します。

1
2
  1. まだ表示されていない場合は、以下から目的の組織を選択しますナビゲーション バーのOrganizationsメニュー

  2. まだ表示されていない場合は、ナビゲーション バーのProjectsメニューから目的のプロジェクトを選択します。

  3. プロジェクトレベルで、ナビゲーション バーの Services ヘッダーの下の AI Model APIs をクリックします。

3
  1. まだ表示されていない場合は、ナビゲーション バーから [Model API Keys] を選択します。

  2. [Create model API key] をクリックします。

  3. キーの名前を入力します。

    モデルAPIキーは、250 文字を超えることはできません。

  4. Select a cloud provider from the Cloud provider dropdown.

    Select any to leave the cloud dimension unscoped.

  5. Optional. Select a geography from the Geography dropdown.

    Most keys don't need a Geography. Select any to leave the geography dimension unscoped.

    Atlas displays the read-only API Endpoint for the scope that you select. The key authenticates against this endpoint.

  6. [Create] をクリックします。

4
  1. モデルAPIキーをコピーし、安全なロケーションに保存します。

    キーが表示されているページを離れた後は、再度表示できなくなります。紛失した場合は、新しいものを作成してください。

  2. [Done] をクリックします。

注意

パブリック プレビュー

ヨーロッパ地理とそのエンドポイントである eu.ai.mongodb.com は、パブリック プレビュー機能として利用できます。機能および関連するドキュメントは、プレビュー期間中にいつでも変更される可能性があります。

When you create a model API key, you supply a cloud and a geography. Together these set the key's scope, which determines the endpoint that the key authenticates against.

Set either value to any to leave that dimension unscoped. A key with cloud and geography both set to any is an unscoped key and works against ai.mongodb.com.

エンドポイント
地理

ai.mongodb.com

スコープが設定されていない。 Atlas はどの地域からのリクエストも処理できます。

eu.ai.mongodb.com

ヨーロッパ

us.ai.mongodb.com

米国

スコープ付きエンドポイントはパターン <geography>.ai.mongodb.com に従います。ここでは、<geography> はリクエストで送信したモデルAPIキーの geography 値です。

To learn what a Geography is and when to scope a key to one, see Geographies for Voyage AI Inference.

Consider the following when you scope a key:

  • The scope is fixed when you create the key. To use a different cloud or Geography, delete the key and create a new one. A PATCH request to a model API key changes only the key's name.

  • The key prefix encodes the scope. For example, a key scoped to Europe begins with al-eu-. Use the prefix to identify a key's scope without recreating it.

  • Scoped keys require a paid usage tier. You can't scope a key on the free trial. To learn more, see Usage Tiers.

model API keys that you created before Geographies were available read as cloud=any and geography=any. These keys keep working against ai.mongodb.com and are not migrated. To use a scope, create a new key.

You can configure a resource policy at the organization level to require that new model API keys be created in a given cloud, a given Geography, or both. To do this, add a forbid rule written in Cedar that targets the Embedding and Reranking API action.

The policy governs key creation. It does not constrain where an existing key is used. If you configure this policy, users can't create keys outside the scope you allow. However, the policy doesn't revoke or re-scope keys that already exist. Those keys keep working. To remove a key that predates the policy, see Delete an API Key.

You can allow specific scopes by using the unless clause in the forbid rule.

Example: Restrict Model API Key Scope with Exceptions
forbid (principal, action == ResourcePolicy::Action::"project.aiModelAPI.modify", resource) unless { <exception> };

To learn more about setting the resource policy, see Atlas Resource Policies.

組織の所有者は、組織のすべてのモデルAPIキーを組織レベルで表示および編集できます。プロジェクト所有者は、アクセス権を持つプロジェクトのモデルAPIキーのみを表示および編集できます。

組織レベルでモデルAPIキーを表示するには、次の手順を実行します。

1
2
  1. まだ表示されていない場合は、以下から目的の組織を選択しますナビゲーション バーのOrganizationsメニュー

  2. 組織レベルで、ナビゲーション バーの Services ヘッダーの下の Model API Keys をクリックします。

各モデルAPIキーについて、ページには以下が表示されます:

列名
列の値の説明
Name
モデル API キーの名前。

Secret Key

モデル API キー名に関連するモデル API キーを隠しました。

Created On (UTC)

ユーザーがモデル API キーを作成した時の UTC での日付。

Last Used (UTC)

モデル API キーが最後に使用された日付(UTC)。キーが新規であるか、または使用されたことがない場合、値は Never です。

Project

モデル API キーにリンクされているプロジェクトの名前。

Created By

キーを作成したユーザーの名前。

Actions

キーで実行できるアクション。次のコマンドをクリックできます。

  • モデルAPIキーを編集する

  • モデル API キーを削除するには、

プロジェクトレベルでモデルAPIキーを表示するには、次の手順を実行します。

1
2
  1. まだ表示されていない場合は、以下から目的の組織を選択しますナビゲーション バーのOrganizationsメニュー

  2. まだ表示されていない場合は、ナビゲーション バーのProjectsメニューから目的のプロジェクトを選択します。

  3. プロジェクトレベルで、ナビゲーション バーの Services ヘッダーの下の AI Model APIs をクリックします。

モデル API キーごとに、ページにキーに関する次の情報が表示されます。

列名
列の値の説明
Name
モデル API キーの名前。

Secret Key

モデル API キー名に関連するモデル API キーを隠しました。

Created On (UTC)

ユーザーがモデル API キーを作成した時の UTC での日付。

Last Used (UTC)

モデル API キーが最後に使用された日付(UTC)。キーが新規であるか、または使用されたことがない場合、値は Never です。

Project

モデル API キーにリンクされているプロジェクトの名前。

Created By

キーを作成したユーザーの名前。

Actions

キーで実行できるアクション。次のコマンドをクリックできます。

  • モデルAPIキーを編集する

  • モデル API キーを削除するには、

組織レベルでモデルAPIキーを編集するには、次の手順を実行します。

1
2
  1. まだ表示されていない場合は、以下から目的の組織を選択しますナビゲーション バーのOrganizationsメニュー

  2. 組織レベルで、ナビゲーション バーの Services ヘッダーの下の Model API Keys をクリックします。

3
  1. Actions 列で、編集するキーに対応する をクリックします。

  2. Edit Model API Key ページで、モデルAPIキーの名前を変更します。

    モデルAPIキー名はプロジェクトに対して一意である必要があり、長さは最大 250 文字です。

  3. 変更を適用するには、 Saveをクリックします。

プロジェクトレベルでモデルAPIキーを編集するには、次の手順を実行します。

1
2
  1. まだ表示されていない場合は、以下から目的の組織を選択しますナビゲーション バーのOrganizationsメニュー

  2. まだ表示されていない場合は、ナビゲーション バーのProjectsメニューから目的のプロジェクトを選択します。

  3. プロジェクトレベルで、ナビゲーション バーの Services ヘッダーの下の AI Model APIs をクリックします。

3
  1. Actions 列で、編集するキーに対応する をクリックします。

  2. Edit Model API Key ページで、モデルAPIキーの名前を変更します。

    名前はプロジェクト内で一意である必要があり、長さは最大 250 文字です。

  3. 変更を適用するには、 Saveをクリックします。

モデルAPIキーを削除すると、 MongoDB はすぐにキーを無効にし、削除されたキーを使用して行われたAPIリクエストを拒否します。キーを削除すると、表示、復元、または変更することはできません。

組織レベルでモデルAPIキーを削除するには、次の手順を実行します。

1
2
  1. まだ表示されていない場合は、以下から目的の組織を選択しますナビゲーション バーのOrganizationsメニュー

  2. 組織レベルで、ナビゲーション バーの Services ヘッダーの下の Model API Keys をクリックします。

3
  1. Actions 列で、削除するキーに対応する をクリックします。

  2. 確認モーダルで、Delete key をクリックしてキーを削除します。

プロジェクトレベルでモデルAPIキーを削除するには、次の手順を実行します。

1
2
  1. まだ表示されていない場合は、以下から目的の組織を選択しますナビゲーション バーのOrganizationsメニュー

  2. まだ表示されていない場合は、ナビゲーション バーのProjectsメニューから目的のプロジェクトを選択します。

  3. プロジェクトレベルで、ナビゲーション バーの Services ヘッダーの下の AI Model APIs をクリックします。

3
  1. Actions 列で、削除するキーに対応する をクリックします。

  2. 確認モーダルで、Delete key をクリックしてキーを削除します。

モデルAPIキーを作成すると、次のことができます。