PHPackages                             goed/cerebras-php - 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. [API Development](/categories/api)
4. /
5. goed/cerebras-php

ActiveLibrary[API Development](/categories/api)

goed/cerebras-php
=================

A PHP adapter for the Cerebras AI API

v0.1.0(8mo ago)1157MITPHPPHP &gt;=8.1CI passing

Since Oct 15Pushed 8mo agoCompare

[ Source](https://github.com/Good-by-WLBT/cerebras-php)[ Packagist](https://packagist.org/packages/goed/cerebras-php)[ RSS](/packages/goed-cerebras-php/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Made with ❤️ by [Goed.email](https://goed.email)

Cerebras PHP Client
===================

[](#cerebras-php-client)

A PHP client library for interacting with the Cerebras AI API, providing easy access to chat completions and other endpoints.

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

[](#installation)

Install the package via Composer:

```
composer require goed/cerebras-php
```

Usage
-----

[](#usage)

### Setup

[](#setup)

Set your API key as an environment variable:

```
export CEREBRAS_API_KEY=your_api_key_here
```

### Basic Chat Completion

[](#basic-chat-completion)

Create a non-streaming chat completion:

```
