> This is a page from the ElevenLabs documentation. For a complete page index, fetch https://elevenlabs.io/docs/llms.txt. For the full documentation in a single file, fetch https://elevenlabs.io/docs/llms-full.txt.

# Together AI

## 概要

[Together AI](https://www.together.ai/)はAIアクセラレーションクラウドを提供しており、AIモデルのトレーニング、微調整、推論を高速かつ低コストで、本番環境のスケールで実行できます。

DeepSeek、Llama3、Mixtral、Stable Diffusionを含む[200以上のモデル](https://together.xyz/models)を、レイテンシー、スループット、コンテキスト長を最適化した状態で、すぐに実行できます。

## モデルの選択

ElevenLabs Agentsの機能を最大限に活用するには、ツール使用と構造化出力をサポートするモデルを使用する必要があります。Together AIは、[以下のモデル](https://docs.together.ai/docs/function-calling)で関数呼び出しをサポートしています。

* meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo
* meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo
* meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo
* meta-llama/Llama-3.3-70B-Instruct-Turbo
* mistralai/Mixtral-8x7B-Instruct-v0.1
* mistralai/Mistral-7B-Instruct-v0.1

そのため、ElevenLabs Agentsのエージェントには少なくとも`meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo`を使用することをおすすめします。

## Together AIでLlama 3.1をセットアップする

[api.together.xyz/settings/api-keys](https://api.together.xyz/settings/api-keys)に移動し、新しいAPIキーを作成します。

![シークレットを追加](/docs/_fern-img/97323ef6ffb761b54a7b5c4183054bc1fd621d1069a38cbeb474444e84de75f4.webp)

APIキーを取得したら、以下のcurlコマンドを実行してテストできます。

```bash
curl https://api.together.xyz/v1/chat/completions -s \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <API_KEY>" \
-d '{
"model": "meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo",
"messages": [{
    "role": "user",
    "content": "Hello, how are you?"
}]
}'
```

[AIエージェント](https://elevenlabs.io/app/agents)に移動し、「Secrets」セクションまでスクロールして「Add Secret」を選択します。シークレットを追加したら、必ず「Save」をクリックしてエージェントで使用できるようにしてください。

![シークレットを追加](/docs/_fern-img/43e5478a3c62f31d2d9f66f9919e7c4c1b5878e3b79681d08741221ce3e689d8.webp)

ドロップダウンメニューから「Custom LLM」を選択します。

![カスタムLLMを選択](/docs/_fern-img/45ec75f558a5c8e5070bd3170d96cbc54ef63e15d9f04ac472a45854a22a17ac.webp)

Server URLには、Together AIのOpenAI互換APIエンドポイントである`https://api.together.xyz/v1`を指定します。Model IDには、前述の`meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo`を指定し、ドロップダウンメニューからAPIキーを選択します。

![URLを入力](/docs/_fern-img/94d7f96a16d483327751195b306431b5d7c0e4df237510b74d7e98f28b58efe1.webp)

これで「Test AI Agent」をクリックすると、カスタムLlama 3.1モデルとチャットできます。