PHPackages                             aisdk/baseten - 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/baseten

ActiveLibrary

aisdk/baseten
=============

Official Baseten provider for the PHP AI SDK.

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

Since Jul 22Compare

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

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

aisdk/baseten
=============

[](#aisdkbaseten)

[![GitHub Workflow Status](https://camo.githubusercontent.com/6d4f543964b6ab1b5dd1d34d83c103d9bd7d4f2e7314caebd46ed6fcd593a6b8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f706870616973646b2f6261736574656e2f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d5465737473)](https://github.com/phpaisdk/baseten/actions)[![Latest Version](https://camo.githubusercontent.com/b7e5ca95c26473c4371cb3569e02897f0d6667cb696618e8319e36162dd52837/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616973646b2f6261736574656e)](https://packagist.org/packages/aisdk/baseten)[![License](https://camo.githubusercontent.com/c0957b0d1080136511bc64ac67ff153d37b7edf6bcb80c04e1402117107f2b2d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f616973646b2f6261736574656e)](https://packagist.org/packages/aisdk/baseten)

---

Official Baseten provider for the PHP AI SDK. Uses Baseten Model APIs' OpenAI-compatible chat endpoint.

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

[](#installation)

```
composer require aisdk/baseten
```

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

[](#basic-usage)

```
use AiSdk\Baseten;
use AiSdk\Generate;

Baseten::create(['apiKey' => $_ENV['BASETEN_API_KEY']]);

$result = Generate::text('Explain this code briefly.')
    ->model(Baseten::model('deepseek-ai/DeepSeek-V4-Pro'))
    ->run();
```

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

[](#configuration)

VariableDescriptionDefault`BASETEN_API_KEY`API key for authenticationRequired`BASETEN_BASE_URL`Base URL for API requests`https://inference.baseten.co/v1`Supported Capabilities
----------------------

[](#supported-capabilities)

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

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

[](#documentation)

- [Baseten Model APIs documentation](https://docs.baseten.co/inference/model-apis/overview)
- [PHP AI SDK documentation](https://phpaisdk.com/docs/baseten)

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance100

Actively maintained with recent releases

Popularity6

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

aiglmopenai-compatibleaisdkbaseten

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

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

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

PHPackages © 2026

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