cerebras-cloud-sdk
The official Python library for the cerebras API
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, uses a permissive license, and offers low install friction. It is the canonical way to access Cerebras Cloud's inference API from Python. Install it if you have a Cerebras API key and need to integrate their inference service into a Python application.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a valid CEREBRAS_API_KEY environment variable from cloud.cerebras.ai; Python 3.9 or later.
- Low install friction with a pure-Python wheel distribution.
- The package is actively maintained with a recent release (29 days old) and no known vulnerabilities.
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions beyond attribution and liability disclaimers.
last release 2026-07-16 (29 days) · last repo commit 2026-07-16 · 152 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,819,486 downloads/mo, #3,518 on PyPI
Alternatives
Verify before relying
pip install cerebras_cloud_sdk
import os
from cerebras.cloud.sdk import Cerebras
client = Cerebras(api_key=os.environ.get("CEREBRAS_API_KEY"))
chat_completion = client.chat.completions.create(
messages=[{"role": "user", "content": "Why is fast inference important?"}],
model="gpt-oss-120b"
)
print(chat_completion)- Performance characteristics and latency benchmarks for inference requests compared to other providers.
- Rate limiting and quota policies for the Cerebras Cloud API.
- Whether the TCP warming mechanism on client construction has measurable impact on typical workloads.
What it is and what it does
This is the official Python client library for the Cerebras Cloud API, generated using Stainless. It provides typed, synchronous and asynchronous interfaces to Cerebras's inference services, built on httpx for HTTP transport. The library includes full type definitions for request parameters and response fields, enabling IDE autocomplete and static type checking.
The package is designed for applications that need to send chat or text completion requests to Cerebras's inference infrastructure. It supports both one-shot and streaming responses, with optional asynchronous execution via AsyncCerebras. The library includes a TCP warming mechanism (enabled by default) to reduce time-to-first-token, though this can be disabled if repeated client construction is necessary.
Use it for
- Build a chatbot or conversational AI application using Cerebras's inference backend with full async support.
- Stream large language model responses token-by-token in a web application or CLI tool.
- Integrate Cerebras inference into an existing Python application with type-safe request/response handling.
- Run batch text completions with high throughput using Cerebras's clustered supercomputer infrastructure.
- Develop a multi-tenant SaaS service that delegates inference to Cerebras Cloud via this SDK.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no known vulnerabilities, uses a permissive license, and offers low install friction. It is the canonical way to access Cerebras Cloud's inference API from Python. Install it if you have a Cerebras API key and need to integrate their inference service into a Python application.
Install
cerebras-cloud-sdk on PyPI
Before you install
Low install friction with a pure-Python wheel distribution. The package is actively maintained with a recent release (29 days old) and no known vulnerabilities. Requires Python 3.9 or later.
Requires a valid CEREBRAS_API_KEY environment variable from cloud.cerebras.ai; Python 3.9 or later.
License in practice
Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions beyond attribution and liability disclaimers.
Quickstart
pip install cerebras_cloud_sdk
import os
from cerebras.cloud.sdk import Cerebras
client = Cerebras(api_key=os.environ.get("CEREBRAS_API_KEY"))
chat_completion = client.chat.completions.create(
messages=[{"role": "user", "content": "Why is fast inference important?"}],
model="gpt-oss-120b"
)
print(chat_completion)
Verify before relying
- Performance characteristics and latency benchmarks for inference requests compared to other providers.
- Rate limiting and quota policies for the Cerebras Cloud API.
- Whether the TCP warming mechanism on client construction has measurable impact on typical workloads.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 6 packagesanyiodistrohttpxpydanticsniffiotyping-extensions |
| Maintenance | Actively maintained 29 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,819,486 / month, #3,518 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed |
Evidence: cerebras_cloud_sdk-1.91.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “cerebras api client”
- cerebras-cloud-sdkProvides a Python client library for accessing the Cerebras Cloud…
- langchain-cerebrasIntegrates Cerebras AI inference services with LangChain, enabling…
- livekit-plugins-openaiIntegrates OpenAI's Realtime, Responses, LLM, TTS, and STT APIs into…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also langchain-cerebras · writer-sdk · sambanova · perplexityai · together · llama-api-client · retell-sdk · openai · fireworks-ai · pydo