Groq
Advertisement
Free Models
| Model ID | Context | Modalities | RPM | RPD |
|---|---|---|---|---|
llama-3.1-70b-versatile | 131K | text | 30 | — |
llama-3.1-405b-reasoning | 131K | text | 30 | — |
mixtral-8x7b-32768 | 33K | text | 30 | — |
Quick Start
Python (OpenAI SDK)
from openai import OpenAI
client = OpenAI(
base_url="https://api.groq.com/openai/v1",
api_key="YOUR_API_KEY", # get at https://console.groq.com/keys
)
response = client.chat.completions.create(
model="llama-3.1-70b-versatile",
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content) curl
curl https://api.groq.com/openai/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "llama-3.1-70b-versatile",
"messages": [{"role": "user", "content": "Hello!"}]
}' Advertisement