PHPackages                             aisdk/cerebras - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. aisdk/cerebras

ActiveLibrary

aisdk/cerebras
==============

Official Cerebras provider for the PHP AI SDK.

v0.8.1(yesterday)03↑2900%MITPHP ^8.3

Since Jul 22Compare

[ Source](https://github.com/phpaisdk/cerebras)[ Packagist](https://packagist.org/packages/aisdk/cerebras)[ Docs](https://github.com/phpaisdk/cerebras)[ Fund](https://opencollective.com/phpaisdk)[ RSS](/packages/aisdk-cerebras/feed)WikiDiscussions Synced today

READMEChangelog (2)Dependencies (7)Versions (3)Used By (0)

aisdk/cerebras
==============

[](#aisdkcerebras)

[![GitHub Workflow Status](https://camo.githubusercontent.com/53d861b3fa6f538e63922b430c0b43045445317be540b37f9e67b5ace10df881/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f706870616973646b2f63657265627261732f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d5465737473)](https://github.com/phpaisdk/cerebras/actions)[![Latest Version](https://camo.githubusercontent.com/954584c174a7c1ffd6a7c85b4154410bc504daa1c8b8cd2478b92113b627b281/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616973646b2f6365726562726173)](https://packagist.org/packages/aisdk/cerebras)[![License](https://camo.githubusercontent.com/6e140179ad5f5c091c10683084db5588bae7f5ae8504ad4581897a2f881f1b3c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f616973646b2f6365726562726173)](https://packagist.org/packages/aisdk/cerebras)

---

Official Cerebras provider for the PHP AI SDK. Uses Cerebras Inference's OpenAI-compatible API.

Installation
------------

[](#installation)

```
composer require aisdk/cerebras
```

Basic Usage
-----------

[](#basic-usage)

```
use AiSdk\Cerebras;
use AiSdk\Generate;

Cerebras::create(['apiKey' => $_ENV['CEREBRAS_API_KEY']]);

$result = Generate::text('Explain this code briefly.')
    ->model(Cerebras::model('gpt-oss-120b'))
    ->run();
```

Configuration
-------------

[](#configuration)

VariableDescriptionDefault`CEREBRAS_API_KEY`API key for authenticationRequired`CEREBRAS_BASE_URL`Base URL for API requests`https://api.cerebras.ai/v1`Supported Capabilities
----------------------

[](#supported-capabilities)

CapabilitySupportText generation and streamingNative OpenAI-compatible chatTool calling, structured output, reasoningPassed through for supported modelsImage inputPassed through for compatible modelsUse `providerOptions('cerebras', ['raw' => [...]])` for documented Cerebras chat-completions fields outside the portable SDK surface. Model IDs are opaque strings and are validated by Cerebras.

Documentation
-------------

[](#documentation)

- [Cerebras OpenAI compatibility documentation](https://inference-docs.cerebras.ai/resources/openai)
- [PHP AI SDK documentation](https://phpaisdk.com/docs/cerebras)

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance100

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ef29d1962da41e7526023f215cf844494e209b2fd163742084cb919a3b508021?d=identicon)[aisdk](/maintainers/aisdk)

---

Tags

aicerebrasglmopenai-compatibleaisdk

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/aisdk-cerebras/health.svg)

```
[![Health](https://phpackages.com/badges/aisdk-cerebras/health.svg)](https://phpackages.com/packages/aisdk-cerebras)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
