--- id: cerebras-cloud-sdk version: "1.91.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # cerebras-cloud-sdk — The official Python library for the cerebras API License: permissive · Maintenance: active · Downloads: 1.8M/mo ## 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 above — verify before relying. Provides a Python client library for accessing the Cerebras Cloud API, supporting both synchronous and asynchronous chat and text completion requests with streaming capabilities. 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 pip install cerebras-cloud-sdk uv add cerebras-cloud-sdk poetry add cerebras-cloud-sdk ## Installing cerebras-cloud-sdk 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. 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) Requires a valid CEREBRAS_API_KEY environment variable from cloud.cerebras.ai; Python 3.9 or later. 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_current - Install friction: low - Maintenance: active - Downloads: 1.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags cerebras api client, cerebras inference sdk, llm api client python, chat completion library, async http client for ai, cerebras cloud python, generative ai api wrapper, llm-inference, async-http-client, api-wrapper [View on SkillFed](https://skillfed.io/packages/cerebras-cloud-sdk) · [View on PyPI](https://pypi.org/project/cerebras-cloud-sdk/)