PHPackages                             labsllm/llm-wrapper - 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. labsllm/llm-wrapper

ActiveLibrary[API Development](/categories/api)

labsllm/llm-wrapper
===================

PHP library that integrates different LLM services (ChatGPT, Claude, Gemini) into a single wrapper

v2.2.1(1y ago)1593[1 issues](https://github.com/HimAndRobot/labsllm/issues)[1 PRs](https://github.com/HimAndRobot/labsllm/pulls)MITPHPPHP &gt;=8.1

Since May 4Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/HimAndRobot/labsllm)[ Packagist](https://packagist.org/packages/labsllm/llm-wrapper)[ RSS](/packages/labsllm-llm-wrapper/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (3)Versions (23)Used By (0)

LLM Wrapper
===========

[](#llm-wrapper)

A simple PHP library that provides a unified interface for interacting with various Large Language Models like OpenAI, Anthropic, and Google.

For complete documentation, visit [labsllm.geanpedro.com.br](https://labsllm.geanpedro.com.br/)

Install
-------

[](#install)

```
composer require labsllm/llm-wrapper
```

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

[](#basic-usage)

```
$execute = LabsLLM::text()
    ->using(new OpenAI('SK-***', 'gpt-4o-mini'))
    ->executePrompt('Your question here');

$response = $execute->getResponseData();

echo $response->response;
```

Switching Providers
-------------------

[](#switching-providers)

Just change the provider in the `using()` method:

```
// Using Google
$execute = LabsLLM::text()
    ->using(new Google('API-KEY', 'gemini-pro'))
    ->executePrompt('Your question here');

// Using Anthropic
$execute = LabsLLM::text()
    ->using(new Anthropic('API-KEY', 'claude-3-opus'))
    ->executePrompt('Your question here');
```

Provider Support Status
-----------------------

[](#provider-support-status)

Legend:

- ✅ Supported
- 🚧 In Development
- 📅 Planned
- ❌ Not Supported

FeatureOpenAIGoogleAnthropicText Prompts✅✅📅System Instructions✅✅📅Chat✅✅📅Tools/Functions✅✅❌Structure Output✅✅❌Streaming✅✅❌Embeddings📅❌❌Voice📅❌❌Image Generation📅❌📅

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance40

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~12 days

Recently: every ~53 days

Total

19

Last Release

201d ago

Major Versions

1.1.2 → v2.0.02025-05-10

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/36330402?v=4)[Gean Pedro da Silva](/maintainers/HimAndRobot)[@HimAndRobot](https://github.com/HimAndRobot)

---

Top Contributors

[![HimAndRobot](https://avatars.githubusercontent.com/u/36330402?v=4)](https://github.com/HimAndRobot "HimAndRobot (69 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/labsllm-llm-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/labsllm-llm-wrapper/health.svg)](https://phpackages.com/packages/labsllm-llm-wrapper)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k9.5M89](/packages/openai-php-laravel)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.7k409.0k6](/packages/theodo-group-llphant)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1943.1k5](/packages/aimeos-prisma)

PHPackages © 2026

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