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

ActiveLibrary

aisdk/deepinfra
===============

Official DeepInfra provider for the PHP AI SDK.

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

Since Jul 22Compare

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

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

aisdk/deepinfra
===============

[](#aisdkdeepinfra)

[![GitHub Workflow Status](https://camo.githubusercontent.com/f69fcd0ea466e17792a0a9f5ae25cd2eb7292dc04f9c19ab3092dac3fc8e9b1f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f706870616973646b2f64656570696e6672612f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d5465737473)](https://github.com/phpaisdk/deepinfra/actions)[![Latest Version](https://camo.githubusercontent.com/0e520d0f59a32a875bda19a98a5ba1b93d833076409cf472e9c66d1dd27dcde5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616973646b2f64656570696e667261)](https://packagist.org/packages/aisdk/deepinfra)[![License](https://camo.githubusercontent.com/2f35c7c6903fe71bdc18e709885f9eae9a87f1bb706418625015b30e580a41f7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f616973646b2f64656570696e667261)](https://packagist.org/packages/aisdk/deepinfra)

---

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

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

[](#installation)

```
composer require aisdk/deepinfra
```

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

[](#basic-usage)

```
use AiSdk\DeepInfra;
use AiSdk\Generate;

DeepInfra::create(['apiKey' => $_ENV['DEEPINFRA_API_KEY']]);

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

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

[](#configuration)

VariableDescriptionDefault`DEEPINFRA_API_KEY`API key for authenticationRequired`DEEPINFRA_BASE_URL`Base URL for API requests`https://api.deepinfra.com/v1/openai`Supported Capabilities
----------------------

[](#supported-capabilities)

CapabilitySupportText generation and streamingNative OpenAI-compatible APIEmbeddingsNativeImage generationNativeTools, structured output, reasoning, multimodal inputPassed through for supported modelsUse `providerOptions('deepinfra', ['raw' => [...]])` for documented DeepInfra fields outside the portable SDK surface. Model IDs are opaque strings and are validated by DeepInfra.

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

[](#documentation)

- [DeepInfra API reference](https://docs.deepinfra.com/api-reference/introduction)
- [PHP AI SDK documentation](https://phpaisdk.com/docs/deepinfra)

###  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

aiglmopenai-compatibleaisdkdeepinfra

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

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

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

PHPackages © 2026

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