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

ActiveLibrary

aisdk/vercel
============

Official Vercel AI Gateway provider for the PHP AI SDK.

v0.8.1(yesterday)00MITPHP ^8.3

Since Jul 22Compare

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

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

aisdk/vercel
============

[](#aisdkvercel)

[![GitHub Workflow Status](https://camo.githubusercontent.com/055735337e168a62866f44bf917f4181b1c53197b04e08e5d2f2b5163181650b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f706870616973646b2f76657263656c2f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d5465737473)](https://github.com/phpaisdk/vercel/actions)[![Latest Version](https://camo.githubusercontent.com/c30adee765c8807b381057330a5d1de87247674afc34cce21ffe8d8b34183c4a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616973646b2f76657263656c)](https://packagist.org/packages/aisdk/vercel)[![License](https://camo.githubusercontent.com/6609a7adb496d85f41d3c10d6da2f37e7fa1d5a4c40b931f0c4ffda4e4cf7aa7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f616973646b2f76657263656c)](https://packagist.org/packages/aisdk/vercel)

---

Official Vercel AI Gateway provider for the PHP AI SDK. Uses Vercel's OpenAI-compatible Chat Completions API.

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

[](#installation)

```
composer require aisdk/vercel
```

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

[](#basic-usage)

```
use AiSdk\Generate;
use AiSdk\Vercel;

Vercel::create(['apiKey' => $_ENV['AI_GATEWAY_API_KEY']]);

$result = Generate::text('Explain this code briefly.')
    ->model(Vercel::model('anthropic/claude-sonnet-4.5'))
    ->run();
```

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

[](#configuration)

VariableDescriptionDefault`AI_GATEWAY_API_KEY`Vercel AI Gateway API keyRequired`VERCEL_BASE_URL`Base URL for API requests`https://ai-gateway.vercel.sh/v1`Supported Capabilities
----------------------

[](#supported-capabilities)

CapabilitySupportText generation and streamingNative OpenAI-compatible chatTool calling, structured output, reasoningPassed through for selected gateway modelsImage inputPassed through for compatible gateway modelsProvider Options
----------------

[](#provider-options)

Use `providerOptions('vercel', ['raw' => [...]])` for documented AI Gateway fields outside the portable SDK surface. Model IDs use Vercel's `provider/model` form and remain opaque strings.

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

[](#documentation)

- [Vercel AI Gateway documentation](https://vercel.com/docs/ai-gateway)
- [PHP AI SDK documentation](https://phpaisdk.com/docs/vercel)

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

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

aivercelopenai-compatibleai-gatewayaisdk

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

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

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

PHPackages © 2026

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