PHPackages                             clarifai/clarifai-php-grpc - 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. clarifai/clarifai-php-grpc

ActiveLibrary[API Development](/categories/api)

clarifai/clarifai-php-grpc
==========================

Clarifai PHP gRPC client

12.5.1(3d ago)1229.6k↓47.3%1[2 issues](https://github.com/Clarifai/clarifai-php-grpc/issues)[1 PRs](https://github.com/Clarifai/clarifai-php-grpc/pulls)Apache-2.0PHPCI passing

Since Jul 29Pushed 2w ago10 watchersCompare

[ Source](https://github.com/Clarifai/clarifai-php-grpc)[ Packagist](https://packagist.org/packages/clarifai/clarifai-php-grpc)[ Docs](https://clarifai.com/)[ RSS](/packages/clarifai-clarifai-php-grpc/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (28)Versions (259)Used By (0)

[![image](https://private-user-images.githubusercontent.com/445122/375428760-895da6c0-874d-45f0-a3b7-26ad07f14a37.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODIwNzMxNzYsIm5iZiI6MTc4MjA3Mjg3NiwicGF0aCI6Ii80NDUxMjIvMzc1NDI4NzYwLTg5NWRhNmMwLTg3NGQtNDVmMC1hM2I3LTI2YWQwN2YxNGEzNy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNjIxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDYyMVQyMDE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PC Client
========================

[](#clarifai-php-grpc-client)

This is the official Clarifai gRPC PHP client for interacting with our powerful recognition [API](https://docs.clarifai.com). Clarifai provides a platform for data scientists, developers, researchers and enterprises to master the entire artificial intelligence lifecycle. Gather valuable business insights from images, video and text using computer vision and natural language processing.

- Try the Clarifai demo at:
- Sign up for a free account at:
- Read the documentation at:

[![Latest Stable Version](https://camo.githubusercontent.com/5c2a8bc1a627fef10e77b964adaded5840621463a42c34752728680c799a8613/68747470733a2f2f706f7365722e707567782e6f72672f636c6172696661692f636c6172696661692d7068702d677270632f76657273696f6e)](https://packagist.org/packages/clarifai/clarifai-php-grpc)

Installation
============

[](#installation)

```
composer require clarifai/clarifai-php-grpc

```

See also [how add gRPC to your PHP installation](https://grpc.io/docs/languages/php/quickstart/).

Versioning
----------

[](#versioning)

This library doesn't use semantic versioning. The first two version numbers (`X.Y` out of `X.Y.Z`) follow the API (backend) versioning, and whenever the API gets updated, this library follows it.

The third version number (`Z` out of `X.Y.Z`) is used by this library for any independent releases of library-specific improvements and bug fixes.

Getting started
---------------

[](#getting-started)

Construct the client and setup your API key or Personal Access Token in the metadata variable.

```
require ‘vendor/autoload.php’;
use Clarifai\ClarifaiClient;

$client = ClarifaiClient::grpc();
$metadata = ['Authorization' => ['Key {MY_CLARIFAI_API_KEY_OR_PAT}']];
```

Predict concepts in an image:

```
use Clarifai\Api\Data;
use Clarifai\Api\Image;
use Clarifai\Api\Input;
use Clarifai\Api\PostModelOutputsRequest;
use Clarifai\Api\Status\StatusCode;

[$response, $status] = $client->PostModelOutputs(
    new PostModelOutputsRequest([
        'model_id' => 'aaa03c23b3724a16a56b629203edc62c',  // This is the ID of the publicly available General model.
        'inputs' => [
            new Input([
                'data' => new Data([
                    'image' => new Image([
                        'url' => 'https://samples.clarifai.com/dog2.jpeg'
                    ])
                ])
            ])
        ]
    ]),
    $metadata
)->wait();

if ($status->code !== 0) throw new Exception("Error: {$status->details}");
if ($response->getStatus()->getCode() != StatusCode::SUCCESS) {
    throw new Exception("Failure response: " . $response->getStatus()->getDescription() . " " .
        $response->getStatus()->getDetails());
}

echo "Predicted concepts:\n";
foreach ($response->getOutputs()[0]->getData()->getConcepts() as $concept) {
    echo $concept->getName() . ": " . number_format($concept->getValue(), 2) . "\n";
}
```

###  Health Score

59

—

FairBetter than 98% of packages

Maintenance92

Actively maintained with recent releases

Popularity34

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 67.7% 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 ~8 days

Total

254

Last Release

3d ago

Major Versions

7.9.0 → 8.6.02022-06-20

8.11.0 → 9.0.02023-01-06

9.11.5 → 10.0.02024-01-08

10.11.2 → 11.0.02025-01-08

11.11.8 → 12.0.02026-01-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/195a278eac0ca9afd0fa4f00d390204d8d962c5f7c642f43aad66afe11b2d428?d=identicon)[clarifai](/maintainers/clarifai)

---

Top Contributors

[![clarifai-prod](https://avatars.githubusercontent.com/u/13002180?v=4)](https://github.com/clarifai-prod "clarifai-prod (212 commits)")[![rok-clarifai](https://avatars.githubusercontent.com/u/61063406?v=4)](https://github.com/rok-clarifai "rok-clarifai (34 commits)")[![aleksander-clarifai](https://avatars.githubusercontent.com/u/72006155?v=4)](https://github.com/aleksander-clarifai "aleksander-clarifai (26 commits)")[![YvetteZ2017](https://avatars.githubusercontent.com/u/30578017?v=4)](https://github.com/YvetteZ2017 "YvetteZ2017 (17 commits)")[![YvetteClarifai](https://avatars.githubusercontent.com/u/60231494?v=4)](https://github.com/YvetteClarifai "YvetteClarifai (13 commits)")[![clarifai-fmarceau](https://avatars.githubusercontent.com/u/108883925?v=4)](https://github.com/clarifai-fmarceau "clarifai-fmarceau (4 commits)")[![tiit-clarifai](https://avatars.githubusercontent.com/u/104068798?v=4)](https://github.com/tiit-clarifai "tiit-clarifai (3 commits)")[![tot-ra](https://avatars.githubusercontent.com/u/445122?v=4)](https://github.com/tot-ra "tot-ra (1 commits)")[![travertischio](https://avatars.githubusercontent.com/u/8041974?v=4)](https://github.com/travertischio "travertischio (1 commits)")[![aruex](https://avatars.githubusercontent.com/u/43998747?v=4)](https://github.com/aruex "aruex (1 commits)")[![jeffreytoffoli](https://avatars.githubusercontent.com/u/59623770?v=4)](https://github.com/jeffreytoffoli "jeffreytoffoli (1 commits)")

---

Tags

aiclarifaiclarifai-clientgrpcphpapiartificial intelligencetext recognitionimage recognitionclarifaivideo recognition

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/clarifai-clarifai-php-grpc/health.svg)

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

###  Alternatives

[google/gax

Google API Core for PHP

267116.3M567](/packages/google-gax)[temporal/sdk

Temporal SDK

4072.9M25](/packages/temporal-sdk)[googleads/google-ads-php

Google Ads API client for PHP

3508.5M12](/packages/googleads-google-ads-php)[clarifai/clarifai-php

Clarifai PHP Client

21133.4k](/packages/clarifai-clarifai-php)[spiral/grpc-client

gRPC client

41491.6k4](/packages/spiral-grpc-client)[metaseller/tinkoff-invest-api-v2-php

Unofficial PHP SDK for T-Invest API v2

256.8k3](/packages/metaseller-tinkoff-invest-api-v2-php)

PHPackages © 2026

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