Cerebras ↗ 为开发者提供 AI 模型推理的低延迟解决方案。
https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/cerebras-ai
在向 Cerebras 发出请求时,请确保您拥有以下内容:
- 您的 AI 网关账户 ID。
- 您的 AI 网关网关名称。
- 一个有效的 Cerebras API 令牌。
- 您要使用的 Cerebras 模型的名称。
curl https://gateway.ai.cloudflare.com/v1/ACCOUNT_TAG/GATEWAY/cerebras/chat/completions \ --header 'content-type: application/json' \ --header 'Authorization: Bearer CEREBRAS_TOKEN' \ --data '{ "model": "llama3.1-8b", "messages": [ { "role": "user", "content": "What is Cloudflare?" } ]}'
You can also use the OpenAI-compatible endpoint (/ai-gateway/chat-completion/
) to access Cerebras models using the OpenAI API schema. To do so, send your requests to:
https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/compat/chat/completions
Specify:
{"model": "cerebras/{model}"}
- @2025 Cloudflare Ubitools
- Cf Repo