PHPackages                             php-client/ollama - 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. php-client/ollama

ActiveLibrary[API Development](/categories/api)

php-client/ollama
=================

PHP Client for Ollama API

v0.1.0(1y ago)269MITPHPPHP ^8.3

Since Feb 13Pushed 1y agoCompare

[ Source](https://github.com/php-client/ollama)[ Packagist](https://packagist.org/packages/php-client/ollama)[ RSS](/packages/php-client-ollama/feed)WikiDiscussions master Synced 1mo ago

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

PHP client for Ollama API.
==========================

[](#php-client-for-ollama-api)

This is a PHP client for the [Ollama API](https://github.com/ollama/ollama/blob/main/docs/api.md).

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

[](#installation)

Install the package via composer:

```
composer require php-client/ollama
```

Usage
-----

[](#usage)

Simple example:

```
use PhpClient\Ollama\Ollama;

$ollama = new Ollama('http://localhost:11434');

$response = $ollama->generation()->generateCompletion([
    'model' => 'llama3.2:latest',
    'prompt' => 'Hello!',
    // Wait for end of generation before getting response:
    'stream' => false,
]);

echo $response->json('response');
```

More information available in comments and PhpDocs in the code.

Also please check the official [Ollama API docs](https://github.com/ollama/ollama/blob/main/docs/api.md).

List of available API actions
-----------------------------

[](#list-of-available-api-actions)

- Generation
    - Generate completions
    - Generate chat completions
    - Generate embeddings
- Management
    - List local models
    - List running models
    - Show model information
    - Load|Unload model
    - Pull|Push model
    - Create|Copy|Delete model
    - Check blob exists
- Version

License
-------

[](#license)

This package is released under the [MIT License](LICENSE.md).

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance44

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

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

Unknown

Total

1

Last Release

458d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/31df2ea335c3dda0ced87001849611067f9107484dd487ddfc5971311ccd6222?d=identicon)[sentosango](/maintainers/sentosango)

---

Top Contributors

[![sentosango](https://avatars.githubusercontent.com/u/72351912?v=4)](https://github.com/sentosango "sentosango (14 commits)")

---

Tags

apiclientollamaphpsaloonsdkapiclientsaloonollama

### Embed Badge

![Health badge](/badges/php-client-ollama/health.svg)

```
[![Health](https://phpackages.com/badges/php-client-ollama/health.svg)](https://phpackages.com/packages/php-client-ollama)
```

###  Alternatives

[saloonphp/laravel-plugin

The official Laravel plugin for Saloon

765.7M125](/packages/saloonphp-laravel-plugin)[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

47073.9k5](/packages/deepseek-php-deepseek-php-client)[modelflow-ai/ollama

Client for ollama API.

131.3k4](/packages/modelflow-ai-ollama)

PHPackages © 2026

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