> 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.

# Groq Cloud

## 概述

[Groq Cloud](https://console.groq.com/) 可让你轻松使用快速 AI 推理，只需几次点击即可获得与 OpenAI 兼容的 API 端点。

只需几个简单步骤，即可使用 Llama、Mixtral 和 Gemma 等领先的[开放可用模型](https://console.groq.com/docs/overview/models)，作为 ElevenLabs 智能体的大脑。

## 选择模型

要充分发挥 ElevenLabs 智能体的功能，需要使用支持工具使用和结构化输出的模型。Groq 基于多功能性和性能，推荐以下 Llama-3.3 模型：

* meta-llama/llama-4-scout-17b-16e-instruct（1000 万 token 上下文窗口），支持 12 种语言（阿拉伯语、英语、法语、德语、印地语、印尼语、意大利语、葡萄牙语、西班牙语、他加禄语、泰语和越南语）
* llama-3.3-70b-versatile（128k 上下文窗口 | 最多 32,768 个输出 token）
* llama-3.1-8b-instant（128k 上下文窗口 | 最多 8,192 个输出 token）

因此，建议为 ElevenLabs Agents 智能体使用 `meta-llama/llama-4-scout-17b-16e-instruct`。

## 在 Groq Cloud 上设置 Llama 3.3

前往 [console.groq.com/keys](https://console.groq.com/keys)，创建新的 API 密钥。

![添加密钥](/docs/_fern-img/2dc1bdac30871fb4059a394b8edfedd4cf953f8e1f787ca8b807a9f195e7fdf3.webp)

获取 API 密钥后，可通过运行以下 curl 命令进行测试：

```bash
curl https://api.groq.com/openai/v1/chat/completions -s \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $GROQ_API_KEY" \
-d '{
"model": "llama-3.3-70b-versatile",
"messages": [{
    "role": "user",
    "content": "Hello, how are you?"
}]
}'
```

前往 [AI Agent](https://elevenlabs.io/app/agents)，向下滚动至 "Secrets" 部分并选择 "Add Secret"。添加密钥后，务必点击 "Save"，让智能体可以使用该密钥。

![添加密钥](/docs/_fern-img/464e123d926fbd9e6986a382af8da55d9f3861d1e593bb1f4b41ba33bed67ae1.webp)

从下拉菜单中选择 "Custom LLM"。

![选择自定义 LLM](/docs/_fern-img/45ec75f558a5c8e5070bd3170d96cbc54ef63e15d9f04ac472a45854a22a17ac.webp)

在 Server URL 中指定 Groq 与 OpenAI 兼容的 API 端点：`https://api.groq.com/openai/v1`。在 Model ID 中指定上文所述的 `meta-llama/llama-4-scout-17b-16e-instruct`，然后从下拉菜单选择 API 密钥。

![输入 URL](/docs/_fern-img/70555982e71101023f8e988102ab505c964fd6796a190a9bce74f3c0ed1b56be.webp)

现在点击 "Test AI Agent"，即可与自定义的 Llama 3.3 模型对话。