> 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

## Omówienie

[Together AI](https://www.together.ai/) oferuje AI Acceleration Cloud, która pozwala błyskawicznie, tanio i na skalę produkcyjną trenować modele AI, dostrajać je i uruchamiać inferencję.

Od razu uruchamiaj [ponad 200 modeli](https://together.xyz/models), w tym DeepSeek, Llama3, Mixtral i Stable Diffusion, zoptymalizowanych pod kątem opóźnień, przepustowości i długości kontekstu.

## Wybór modelu

Aby w pełni wykorzystać ElevenLabs Agents, potrzebujesz modelu obsługującego narzędzia i ustrukturyzowane dane wyjściowe. Together AI obsługuje wywoływanie funkcji w [tych modelach](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

Dlatego do agenta ElevenLabs Agents zalecamy co najmniej `meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo`.

## Konfiguracja Llama 3.1 w Together AI

Przejdź do [api.together.xyz/settings/api-keys](https://api.together.xyz/settings/api-keys) i utwórz nowy klucz API.

![Dodaj sekret](/docs/_fern-img/97323ef6ffb761b54a7b5c4183054bc1fd621d1069a38cbeb474444e84de75f4.webp)

Gdy masz już klucz API, możesz go przetestować, uruchamiając poniższe polecenie 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?"
}]
}'
```

Przejdź do swojego [agenta AI](https://elevenlabs.io/app/agents), przewiń do sekcji „Sekrety” i wybierz „Dodaj sekret”. Po dodaniu sekretu kliknij „Zapisz”, aby był dostępny dla agenta.

![Dodaj sekret](/docs/_fern-img/43e5478a3c62f31d2d9f66f9919e7c4c1b5878e3b79681d08741221ce3e689d8.webp)

Wybierz „Własny LLM” z menu rozwijanego.

![Wybierz własny LLM](/docs/_fern-img/45ec75f558a5c8e5070bd3170d96cbc54ef63e15d9f04ac472a45854a22a17ac.webp)

W polu URL serwera podaj punkt końcowy API Together AI zgodny z OpenAI: `https://api.together.xyz/v1`. W polu ID modelu podaj omówiony wyżej `meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo`, a następnie wybierz swój klucz API z menu rozwijanego.

![Wpisz URL](/docs/_fern-img/94d7f96a16d483327751195b306431b5d7c0e4df237510b74d7e98f28b58efe1.webp)

Teraz możesz kliknąć „Testuj agenta AI”, aby porozmawiać z własnym modelem Llama 3.1.