How to hit the Cerebras API

Cerebras Inference at https://api.cerebras.ai/v1 runs open models on Cerebras wafer-scale chips, behind an OpenAI-compatible API.

Authentication

Create a key at cloud.cerebras.ai. Send it as Authorization: Bearer <key>. In the examples it's written {{CEREBRAS_API_KEY}}.

Full reference: https://inference-docs.cerebras.ai/api-reference/chat-completions

Chat completion

curl https://api.cerebras.ai/v1/chat/completions \
  -H "Authorization: Bearer {{CEREBRAS_API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{"model": "gpt-oss-120b", "messages": [{"role": "user", "content": "Explain what a webhook is in two sentences."}]}'
Run in PostTaco

List models

curl https://api.cerebras.ai/v1/models \
  -H "Authorization: Bearer {{CEREBRAS_API_KEY}}"
Run in PostTaco