> 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

## Panoramica

[Together AI](https://www.together.ai/) offre un cloud di accelerazione IA che ti consente di addestrare, eseguire il fine-tuning e l'inferenza su modelli IA in modo ultrarapido, a basso costo e su scala di produzione.

Esegui subito oltre [200 modelli](https://together.xyz/models), tra cui DeepSeek, Llama3, Mixtral e Stable Diffusion, ottimizzati per latenza, throughput e lunghezza del contesto ai massimi livelli.

## Scegliere un modello

Per sfruttare appieno ElevenLabs Agents, devi usare un modello che supporti l'uso di strumenti e output strutturati. Together AI supporta il function calling per [questi modelli](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

Per questo motivo, per il tuo agente ElevenLabs Agents ti consigliamo di usare almeno `meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo`.

## Configurare Llama 3.1 su Together AI

Vai a [api.together.xyz/settings/api-keys](https://api.together.xyz/settings/api-keys) e crea una nuova chiave API.

![Aggiungi secret](/docs/_fern-img/97323ef6ffb761b54a7b5c4183054bc1fd621d1069a38cbeb474444e84de75f4.webp)

Una volta ottenuta la chiave API, puoi testarla eseguendo il seguente comando 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?"
}]
}'
```

Vai al tuo [agente IA](https://elevenlabs.io/app/agents), scorri fino alla sezione "Secrets" e seleziona "Add Secret". Dopo aver aggiunto il secret, assicurati di selezionare "Save" per renderlo disponibile al tuo agente.

![Aggiungi secret](/docs/_fern-img/43e5478a3c62f31d2d9f66f9919e7c4c1b5878e3b79681d08741221ce3e689d8.webp)

Scegli "Custom LLM" dal menu a discesa.

![Scegli LLM personalizzato](/docs/_fern-img/45ec75f558a5c8e5070bd3170d96cbc54ef63e15d9f04ac472a45854a22a17ac.webp)

Per l'URL del server, specifica l'endpoint API compatibile con OpenAI di Together AI: `https://api.together.xyz/v1`. Per l'ID del modello, specifica `meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo` come indicato sopra e seleziona la tua chiave API dal menu a discesa.

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

Ora puoi fare clic su "Test AI Agent" per chattare con il tuo modello Llama 3.1 personalizzato.