Cerebras
Advertisement
Free Models
| Model ID | Context | Modalities | RPM | RPD |
|---|---|---|---|---|
llama-3.1-70b | 131K | text | — | — |
llama-3.2-90b | 131K | text | — | — |
Quick Start
Python (OpenAI SDK)
from openai import OpenAI
client = OpenAI(
base_url="https://api.cerebras.ai/v1",
api_key="YOUR_API_KEY", # get at https://cloud.cerebras.ai/
)
response = client.chat.completions.create(
model="llama-3.1-70b",
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content) curl
curl https://api.cerebras.ai/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "llama-3.1-70b",
"messages": [{"role": "user", "content": "Hello!"}]
}' Advertisement