Groq
带免费套餐的快速 AI 推理 API,支持 Llama、Mixtral、Gemma 模型
- 认证方式
- API Key
- HTTPS
- Yes
- CORS
- Yes
- 分类
- 机器学习
简介
Groq 提供超快 LLM 推理——Llama、Mixtral 和其他开源模型,速度远超典型 GPU 云——通过 OpenAI 兼容 API 提供。认证是免费 API 密钥(无效密钥返回 401,已实测)。
快速开始
模型列表(替换 YOUR_KEY):
curl "https://api.groq.com/openai/v1/models" \
-H "Authorization: Bearer YOUR_KEY"
聊天补全(OpenAI 兼容):
curl "https://api.groq.com/openai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "llama-3.3-70b-versatile",
"messages": [{"role": "user", "content": "Explain quantum computing in one sentence"}]
}'
认证方式
- 在 console.groq.com 注册 → 免费 API 密钥。
- 通过
Authorization: Bearer YOUR_KEY发送(无效密钥返回 401——已实测)。
速率限制与注意事项
- 免费层包含各模型的月度 token 额度(见控制台)——非常适合原型。
- OpenAI 兼容:在 OpenAI SDK 中把 base URL 换成
https://api.groq.com/openai/v1。 - 模型 ID 会随时间变化——用
/models获取当前列表。 - 以极低的延迟/token 著称——适合代理和流式 UI。
常见问题
Groq 免费吗? 免费层带月度 token 额度;付费档可扩展。
如何获取密钥? 在 console.groq.com 注册——密钥在控制台。
是 OpenAI 兼容的吗?
是的——把 OpenAI SDK 指向 https://api.groq.com/openai/v1。
机器学习 分类更多
| API | Auth | HTTPS | CORS | |
|---|---|---|---|---|
| AI Economics Tools Token cost, LLM energy, agent-hour and Proof-Adjusted Autonomy calculators by Michał Piszczek | No auth | Yes | Yes | ↗ |
| AI For Thai Free Various Thai AI API | API Key | Yes | Yes | ↗ |
| BRAINIALL PT-BR and Spanish audio transcription with diarization and SRT/VTT | API Key | Yes | Yes | ↗ |
| Clarifai Computer Vision | OAuth | Yes | Unknown | ↗ |
| Cloudmersive Image captioning, face recognition, NSFW classification | API Key | Yes | Yes | ↗ |